@buoy-gg/assets 7.0.29 → 7.0.31
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.
- package/lib/commonjs/components/AssetDetail.js +10 -1
- package/lib/commonjs/components/AssetDetail.js.map +1 -1
- package/lib/commonjs/components/AssetRow.js +13 -4
- package/lib/commonjs/components/AssetRow.js.map +1 -1
- package/lib/commonjs/components/AssetsFilterBar.js +4 -0
- package/lib/commonjs/components/AssetsFilterBar.js.map +1 -1
- package/lib/commonjs/components/AssetsHeader.js +11 -5
- package/lib/commonjs/components/AssetsHeader.js.map +1 -1
- package/lib/commonjs/components/AssetsListControls.js +5 -3
- package/lib/commonjs/components/AssetsListControls.js.map +1 -1
- package/lib/commonjs/components/AssetsModal.js +10 -0
- package/lib/commonjs/components/AssetsModal.js.map +1 -1
- package/lib/commonjs/components/BaselineBar.js +5 -0
- package/lib/commonjs/components/BaselineBar.js.map +1 -1
- package/lib/commonjs/index.js +53 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/store/assetStore.js +8 -1
- package/lib/commonjs/store/assetStore.js.map +1 -1
- package/lib/commonjs/store/baseline.js +9 -1
- package/lib/commonjs/store/baseline.js.map +1 -1
- package/lib/commonjs/store/insights.js +2 -11
- package/lib/commonjs/store/insights.js.map +1 -1
- package/lib/commonjs/utils/deviceScale.js +50 -0
- package/lib/commonjs/utils/deviceScale.js.map +1 -0
- package/lib/commonjs/utils/testIDs.js +114 -0
- package/lib/commonjs/utils/testIDs.js.map +1 -0
- package/lib/module/components/AssetDetail.js +10 -1
- package/lib/module/components/AssetDetail.js.map +1 -1
- package/lib/module/components/AssetRow.js +13 -4
- package/lib/module/components/AssetRow.js.map +1 -1
- package/lib/module/components/AssetsFilterBar.js +4 -0
- package/lib/module/components/AssetsFilterBar.js.map +1 -1
- package/lib/module/components/AssetsHeader.js +11 -5
- package/lib/module/components/AssetsHeader.js.map +1 -1
- package/lib/module/components/AssetsListControls.js +5 -3
- package/lib/module/components/AssetsListControls.js.map +1 -1
- package/lib/module/components/AssetsModal.js +10 -0
- package/lib/module/components/AssetsModal.js.map +1 -1
- package/lib/module/components/BaselineBar.js +5 -0
- package/lib/module/components/BaselineBar.js.map +1 -1
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/store/assetStore.js +8 -1
- package/lib/module/store/assetStore.js.map +1 -1
- package/lib/module/store/baseline.js +9 -1
- package/lib/module/store/baseline.js.map +1 -1
- package/lib/module/store/insights.js +1 -10
- package/lib/module/store/insights.js.map +1 -1
- package/lib/module/utils/deviceScale.js +46 -0
- package/lib/module/utils/deviceScale.js.map +1 -0
- package/lib/module/utils/testIDs.js +103 -0
- package/lib/module/utils/testIDs.js.map +1 -0
- package/lib/typescript/components/AssetDetail.d.ts.map +1 -1
- package/lib/typescript/components/AssetRow.d.ts.map +1 -1
- package/lib/typescript/components/AssetsFilterBar.d.ts.map +1 -1
- package/lib/typescript/components/AssetsHeader.d.ts.map +1 -1
- package/lib/typescript/components/AssetsListControls.d.ts.map +1 -1
- package/lib/typescript/components/AssetsModal.d.ts.map +1 -1
- package/lib/typescript/components/BaselineBar.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/store/assetStore.d.ts +6 -0
- package/lib/typescript/store/assetStore.d.ts.map +1 -1
- package/lib/typescript/store/baseline.d.ts.map +1 -1
- package/lib/typescript/store/insights.d.ts.map +1 -1
- package/lib/typescript/utils/deviceScale.d.ts +25 -0
- package/lib/typescript/utils/deviceScale.d.ts.map +1 -0
- package/lib/typescript/utils/testIDs.d.ts +75 -0
- package/lib/typescript/utils/testIDs.d.ts.map +1 -0
- package/package.json +5 -6
- package/src/capture/expo.ts +0 -45
- package/src/capture/install.ts +0 -73
- package/src/capture/measure.ts +0 -167
- package/src/capture/metroGraph.ts +0 -146
- package/src/capture/registry.ts +0 -137
- package/src/components/AssetDetail.tsx +0 -207
- package/src/components/AssetRow.tsx +0 -243
- package/src/components/AssetsFilterBar.tsx +0 -99
- package/src/components/AssetsHeader.tsx +0 -75
- package/src/components/AssetsIcon.tsx +0 -9
- package/src/components/AssetsListControls.tsx +0 -101
- package/src/components/AssetsModal.tsx +0 -371
- package/src/components/BaselineBar.tsx +0 -98
- package/src/export.ts +0 -110
- package/src/format.ts +0 -53
- package/src/hooks/useAssetRecords.ts +0 -26
- package/src/index.tsx +0 -87
- package/src/preset.tsx +0 -35
- package/src/remote.ts +0 -65
- package/src/state.ts +0 -84
- package/src/store/assetStore.ts +0 -209
- package/src/store/baseline.ts +0 -152
- package/src/store/insights.ts +0 -145
- package/src/sync/assetsSyncAdapter.ts +0 -151
- package/src/types.ts +0 -160
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["estDecodedBytes","effectivePixelRatio","WEBP_CANDIDATE_BYTES","HEAVY_GIF_BYTES","HEAVY_FONT_BYTES","OVER_DECODE_SCREENS","SCALE_ANOMALY_RATIO","SCALE_ANOMALY_MIN_BYTES","screenPixels","Dimensions","PixelRatio","require","screen","get","ratio","width","height","hasScaleAnomaly","record","sizes","sizesByScale","ordered","Object","entries","map","scale","bytes","Number","filter","e","isFinite","sort","a","b","i","length","computeInsights","list","deviceScale","byHash","Map","r","hash","group","push","set","duplicates","measured","find","sizeBytes","ids","id","wastedBytes","screenPx","scaleGaps","webpCandidates","neverLoaded","overDecode","heavyGifs","heavyFonts","scaleAnomalies","loaded","kind","scales","some","s","type"],"sourceRoot":"../../../src","sources":["store/insights.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,SAASA,eAAe,QAAQ,cAAc;AAC9C,SAASC,mBAAmB,QAAQ,sBAAsB;AAG1D;AACA,MAAMC,oBAAoB,GAAG,EAAE,GAAG,IAAI;AACtC;AACA,MAAMC,eAAe,GAAG,GAAG,GAAG,IAAI;AAClC;AACA,MAAMC,gBAAgB,GAAG,GAAG,GAAG,I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SAAS,IAAI,CAAC,KAAK9C,eAAe,EAAE;MAC7DuD,SAAS,CAACd,IAAI,CAACH,CAAC,CAACU,EAAE,CAAC;IACtB;IACA,IAAIV,CAAC,CAACqB,IAAI,KAAK,MAAM,IAAI,CAACrB,CAAC,CAACQ,SAAS,IAAI,CAAC,KAAK7C,gBAAgB,EAAE;MAC/DuD,UAAU,CAACf,IAAI,CAACH,CAAC,CAACU,EAAE,CAAC;IACvB;IACA,IAAIlC,eAAe,CAACwB,CAAC,CAAC,EAAEmB,cAAc,CAAChB,IAAI,CAACH,CAAC,CAACU,EAAE,CAAC;EACnD;EAEA,OAAO;IACLL,UAAU;IACVQ,SAAS;IACTC,cAAc;IACdC,WAAW;IACXC,UAAU;IACVC,SAAS;IACTC,UAAU;IACVC;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Which scale variant this device would actually use.
|
|
5
|
+
*
|
|
6
|
+
* Shared by the decoded-memory estimate and the scale-gap insight so the two
|
|
7
|
+
* can't disagree about the same asset — they were written apart and did.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { assetsState } from "../state";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* PixelRatio, or the DEVICE's when this store is a dashboard mirror.
|
|
14
|
+
*
|
|
15
|
+
* A desktop dashboard renders another machine's inventory, and its own
|
|
16
|
+
* PixelRatio has nothing to do with which variant the phone will pick.
|
|
17
|
+
*/
|
|
18
|
+
export function effectivePixelRatio() {
|
|
19
|
+
const mirror = assetsState().mirrorPixelRatio;
|
|
20
|
+
if (mirror != null) return mirror;
|
|
21
|
+
try {
|
|
22
|
+
return require("react-native").PixelRatio.get();
|
|
23
|
+
} catch {
|
|
24
|
+
return 2;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The variant React Native would resolve, by AssetSourceResolver's rule: the
|
|
30
|
+
* smallest scale that covers the device, or the largest available when none
|
|
31
|
+
* does.
|
|
32
|
+
*
|
|
33
|
+
* Not simply "the biggest one shipped". An asset with @1x…@4x variants on a
|
|
34
|
+
* @3x phone decodes at 3, and calling it 4 overstates its memory by 78% —
|
|
35
|
+
* on exactly the never-loaded assets this tool exists to point at, since a
|
|
36
|
+
* loaded one carries the scale RN already picked.
|
|
37
|
+
*/
|
|
38
|
+
export function pickScale(scales, deviceScale) {
|
|
39
|
+
if (!scales.length) return 1;
|
|
40
|
+
const ordered = [...scales].sort((a, b) => a - b);
|
|
41
|
+
for (const scale of ordered) {
|
|
42
|
+
if (scale >= deviceScale) return scale;
|
|
43
|
+
}
|
|
44
|
+
return ordered[ordered.length - 1];
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=deviceScale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["assetsState","effectivePixelRatio","mirror","mirrorPixelRatio","require","PixelRatio","get","pickScale","scales","deviceScale","length","ordered","sort","a","b","scale"],"sourceRoot":"../../../src","sources":["utils/deviceScale.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,QAAQ,UAAU;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAAA,EAAW;EAC5C,MAAMC,MAAM,GAAGF,WAAW,CAAC,CAAC,CAACG,gBAAgB;EAC7C,IAAID,MAAM,IAAI,IAAI,EAAE,OAAOA,MAAM;EACjC,IAAI;IACF,OAAOE,OAAO,CAAC,cAAc,CAAC,CAACC,UAAU,CAACC,GAAG,CAAC,CAAC;EACjD,CAAC,CAAC,MAAM;IACN,OAAO,CAAC;EACV;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CAACC,MAAgB,EAAEC,WAAmB,EAAU;EACvE,IAAI,CAACD,MAAM,CAACE,MAAM,EAAE,OAAO,CAAC;EAC5B,MAAMC,OAAO,GAAG,CAAC,GAAGH,MAAM,CAAC,CAACI,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAGC,CAAC,CAAC;EACjD,KAAK,MAAMC,KAAK,IAAIJ,OAAO,EAAE;IAC3B,IAAII,KAAK,IAAIN,WAAW,EAAE,OAAOM,KAAK;EACxC;EACA,OAAOJ,OAAO,CAACA,OAAO,CAACD,MAAM,GAAG,CAAC,CAAC;AACpC","ignoreList":[]}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Automation handles for the Assets tool.
|
|
5
|
+
*
|
|
6
|
+
* Every handle the tool renders is built here rather than inlined at the call
|
|
7
|
+
* site, for the same reason the highlight tool does it: the ids for rows,
|
|
8
|
+
* badges, filter chips and detail fields are DERIVED from data, and a suite
|
|
9
|
+
* that reimplements the derivation is a suite that can drift from the tool
|
|
10
|
+
* without either side failing. `detox-e2e/assets/fixture.js` mirrors these
|
|
11
|
+
* rules in CommonJS (the tests can't import TypeScript) and asserts the two
|
|
12
|
+
* still agree before any flow trusts a handle.
|
|
13
|
+
*
|
|
14
|
+
* Naming: `buoy-assets-<area>[-<detail>]`, one prefix for the whole tool.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Lowercase, hyphen-joined, never empty.
|
|
19
|
+
*
|
|
20
|
+
* Shared by rows, badges, filter chips and detail fields so one asset's row
|
|
21
|
+
* handle and its detail handles are slugged the same way — `back-icon.png`
|
|
22
|
+
* becomes `back-icon-png` everywhere it appears.
|
|
23
|
+
*/
|
|
24
|
+
export function assetSlug(value) {
|
|
25
|
+
return String(value).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "unknown";
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* One inventory row, addressed by filename rather than by store id.
|
|
30
|
+
*
|
|
31
|
+
* The store's numeric ids are assigned in first-sighting order and are NOT
|
|
32
|
+
* stable: clearing the inventory and rescanning renumbers everything, and the
|
|
33
|
+
* order the registry walk and the Metro graph merge in depends on what the app
|
|
34
|
+
* has evaluated so far. A handle built from those makes a test that passes
|
|
35
|
+
* only on the run that recorded it.
|
|
36
|
+
*
|
|
37
|
+
* The tradeoff is that two assets with the same filename in different
|
|
38
|
+
* directories collide. That's a real ambiguity rather than a hidden one —
|
|
39
|
+
* Detox reports it as "multiple elements matched", which names the problem —
|
|
40
|
+
* and it's the same tradeoff the row itself makes, since the row shows the
|
|
41
|
+
* filename and not the path.
|
|
42
|
+
*/
|
|
43
|
+
export function assetRowTestID(name, type) {
|
|
44
|
+
return `buoy-assets-row-${assetSlug(`${name}.${type}`)}`;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** A finding badge inside a row: `…-badge-low-res`, `…-badge-dup`. */
|
|
48
|
+
export function assetBadgeTestID(name, type, label) {
|
|
49
|
+
return `${assetRowTestID(name, type)}-badge-${assetSlug(label)}`;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** A kind/status filter chip: `buoy-assets-filter-font`, `…-filter-unused`. */
|
|
53
|
+
export function assetFilterTestID(filter) {
|
|
54
|
+
return `buoy-assets-filter-${assetSlug(filter)}`;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** One label/value pair in the detail view: `buoy-assets-detail-row-hash`. */
|
|
58
|
+
export function assetDetailRowTestID(label) {
|
|
59
|
+
return `buoy-assets-detail-row-${assetSlug(label)}`;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** A loaded font-family chip: `buoy-assets-font-ionicons`. */
|
|
63
|
+
export function assetFontChipTestID(family) {
|
|
64
|
+
return `buoy-assets-font-${assetSlug(family)}`;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/** Fixed handles — everything that isn't derived from a record. */
|
|
68
|
+
export const ASSETS_TEST_IDS = {
|
|
69
|
+
// header
|
|
70
|
+
title: "buoy-assets-title",
|
|
71
|
+
copy: "buoy-assets-copy",
|
|
72
|
+
clear: "buoy-assets-clear",
|
|
73
|
+
// list chrome
|
|
74
|
+
list: "buoy-assets-list",
|
|
75
|
+
search: "buoy-assets-search",
|
|
76
|
+
sort: "buoy-assets-sort",
|
|
77
|
+
saveBaseline: "buoy-assets-save-baseline",
|
|
78
|
+
filterBar: "buoy-assets-filter-bar",
|
|
79
|
+
notice: "buoy-assets-notice",
|
|
80
|
+
noticeText: "buoy-assets-notice-text",
|
|
81
|
+
fonts: "buoy-assets-fonts",
|
|
82
|
+
fontsTitle: "buoy-assets-fonts-title",
|
|
83
|
+
empty: "buoy-assets-empty",
|
|
84
|
+
emptyTitle: "buoy-assets-empty-title",
|
|
85
|
+
emptyText: "buoy-assets-empty-text",
|
|
86
|
+
// baseline bar
|
|
87
|
+
baseline: "buoy-assets-baseline",
|
|
88
|
+
baselineSummary: "buoy-assets-baseline-summary",
|
|
89
|
+
baselineUpdate: "buoy-assets-baseline-update",
|
|
90
|
+
baselineClear: "buoy-assets-baseline-clear",
|
|
91
|
+
// detail
|
|
92
|
+
detail: "buoy-assets-detail",
|
|
93
|
+
detailScroll: "buoy-assets-detail-scroll",
|
|
94
|
+
detailPreview: "buoy-assets-detail-preview",
|
|
95
|
+
detailFontPreview: "buoy-assets-detail-font-preview",
|
|
96
|
+
detailFindings: "buoy-assets-detail-findings"
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/** One finding sentence in the detail view, by position. */
|
|
100
|
+
export function assetFindingTestID(index) {
|
|
101
|
+
return `buoy-assets-detail-finding-${index}`;
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=testIDs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["assetSlug","value","String","toLowerCase","replace","assetRowTestID","name","type","assetBadgeTestID","label","assetFilterTestID","filter","assetDetailRowTestID","assetFontChipTestID","family","ASSETS_TEST_IDS","title","copy","clear","list","search","sort","saveBaseline","filterBar","notice","noticeText","fonts","fontsTitle","empty","emptyTitle","emptyText","baseline","baselineSummary","baselineUpdate","baselineClear","detail","detailScroll","detailPreview","detailFontPreview","detailFindings","assetFindingTestID","index"],"sourceRoot":"../../../src","sources":["utils/testIDs.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,SAASA,CAACC,KAAsB,EAAU;EACxD,OACEC,MAAM,CAACD,KAAK,CAAC,CACVE,WAAW,CAAC,CAAC,CACbC,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC,CAC3BA,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,SAAS;AAE3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAACC,IAAY,EAAEC,IAAY,EAAU;EACjE,OAAO,mBAAmBP,SAAS,CAAC,GAAGM,IAAI,IAAIC,IAAI,EAAE,CAAC,EAAE;AAC1D;;AAEA;AACA,OAAO,SAASC,gBAAgBA,CAC9BF,IAAY,EACZC,IAAY,EACZE,KAAa,EACL;EACR,OAAO,GAAGJ,cAAc,CAACC,IAAI,EAAEC,IAAI,CAAC,UAAUP,SAAS,CAACS,KAAK,CAAC,EAAE;AAClE;;AAEA;AACA,OAAO,SAASC,iBAAiBA,CAACC,MAAc,EAAU;EACxD,OAAO,sBAAsBX,SAAS,CAACW,MAAM,CAAC,EAAE;AAClD;;AAEA;AACA,OAAO,SAASC,oBAAoBA,CAACH,KAAa,EAAU;EAC1D,OAAO,0BAA0BT,SAAS,CAACS,KAAK,CAAC,EAAE;AACrD;;AAEA;AACA,OAAO,SAASI,mBAAmBA,CAACC,MAAc,EAAU;EAC1D,OAAO,oBAAoBd,SAAS,CAACc,MAAM,CAAC,EAAE;AAChD;;AAEA;AACA,OAAO,MAAMC,eAAe,GAAG;EAC7B;EACAC,KAAK,EAAE,mBAAmB;EAC1BC,IAAI,EAAE,kBAAkB;EACxBC,KAAK,EAAE,mBAAmB;EAC1B;EACAC,IAAI,EAAE,kBAAkB;EACxBC,MAAM,EAAE,oBAAoB;EAC5BC,IAAI,EAAE,kBAAkB;EACxBC,YAAY,EAAE,2BAA2B;EACzCC,SAAS,EAAE,wBAAwB;EACnCC,MAAM,EAAE,oBAAoB;EAC5BC,UAAU,EAAE,yBAAyB;EACrCC,KAAK,EAAE,mBAAmB;EAC1BC,UAAU,EAAE,yBAAyB;EACrCC,KAAK,EAAE,mBAAmB;EAC1BC,UAAU,EAAE,yBAAyB;EACrCC,SAAS,EAAE,wBAAwB;EACnC;EACAC,QAAQ,EAAE,sBAAsB;EAChCC,eAAe,EAAE,8BAA8B;EAC/CC,cAAc,EAAE,6BAA6B;EAC7CC,aAAa,EAAE,4BAA4B;EAC3C;EACAC,MAAM,EAAE,oBAAoB;EAC5BC,YAAY,EAAE,2BAA2B;EACzCC,aAAa,EAAE,4BAA4B;EAC3CC,iBAAiB,EAAE,iCAAiC;EACpDC,cAAc,EAAE;AAClB,CAAU;;AAEV;AACA,OAAO,SAASC,kBAAkBA,CAACC,KAAa,EAAU;EACxD,OAAO,8BAA8BA,KAAK,EAAE;AAC9C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetDetail.d.ts","sourceRoot":"","sources":["../../../src/components/AssetDetail.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"AssetDetail.d.ts","sourceRoot":"","sources":["../../../src/components/AssetDetail.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAYH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE5D,UAAU,gBAAgB;IACxB,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAyCD,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,gBAAgB,+BAoGjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetRow.d.ts","sourceRoot":"","sources":["../../../src/components/AssetRow.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"AssetRow.d.ts","sourceRoot":"","sources":["../../../src/components/AssetRow.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAcH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,yEAAyE;AACzE,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,UAAU,aAAa;IACrB,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,aAAa,CAAC;IACrB,oEAAoE;IACpE,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAqBD,wBAAgB,QAAQ,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,aAAa,+BA+F/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetsFilterBar.d.ts","sourceRoot":"","sources":["../../../src/components/AssetsFilterBar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"AssetsFilterBar.d.ts","sourceRoot":"","sources":["../../../src/components/AssetsFilterBar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvD,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEvD,UAAU,oBAAoB;IAC5B,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,WAAW,CAAC;IACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CACzC;AAED,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,oBAAoB,sCAwDhF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetsHeader.d.ts","sourceRoot":"","sources":["../../../src/components/AssetsHeader.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"AssetsHeader.d.ts","sourceRoot":"","sources":["../../../src/components/AssetsHeader.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,UAAU,iBAAiB;IACzB,KAAK,EAAE,WAAW,CAAC;IACnB,wEAAwE;IACxE,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,SAAS,EACT,UAAU,EACV,WAAgB,EAChB,WAAe,EACf,aAAa,EACb,OAAO,EACP,SAAS,EACT,MAAM,GACP,EAAE,iBAAiB,+BA4CnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetsListControls.d.ts","sourceRoot":"","sources":["../../../src/components/AssetsListControls.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"AssetsListControls.d.ts","sourceRoot":"","sources":["../../../src/components/AssetsListControls.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAQjD,UAAU,uBAAuB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACxC,6DAA6D;IAC7D,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,aAAa,EACb,IAAI,EACJ,YAAY,EACZ,kBAAkB,GACnB,EAAE,uBAAuB,+BAiCzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetsModal.d.ts","sourceRoot":"","sources":["../../../src/components/AssetsModal.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"AssetsModal.d.ts","sourceRoot":"","sources":["../../../src/components/AssetsModal.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAgBrD,UAAU,gBAAgB;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gFAAgF;IAChF,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AA4ED,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,cAAc,EACd,MAAc,GACf,EAAE,gBAAgB,+BAwKlB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,KAAK,GAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAM,+BAGrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaselineBar.d.ts","sourceRoot":"","sources":["../../../src/components/BaselineBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"BaselineBar.d.ts","sourceRoot":"","sources":["../../../src/components/BaselineBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAU3C,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAAA;CAAE,sCA8ChE"}
|
|
@@ -22,5 +22,6 @@ export { formatAssetMarkdown, formatInventoryMarkdown } from "./export";
|
|
|
22
22
|
export { assetsSyncAdapter } from "./sync/assetsSyncAdapter";
|
|
23
23
|
export { disableAssetsCapture, replaceAssetsFromSnapshot, setRemoteAssetsHandler, } from "./remote";
|
|
24
24
|
export type { AssetsRemoteDispatch } from "./remote";
|
|
25
|
+
export { ASSETS_TEST_IDS, assetBadgeTestID, assetDetailRowTestID, assetFilterTestID, assetFindingTestID, assetFontChipTestID, assetRowTestID, assetSlug, } from "./utils/testIDs";
|
|
25
26
|
export type { AssetKind, AssetOrigin, AssetRecord, AssetRecordWire, AssetsBaseline, AssetsDiff, AssetsInsights, AssetsScanStatus, AssetsSnapshotPayload, AssetsStats, DuplicateInsight, } from "./types";
|
|
26
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../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;AAKzB,YAAY,EACV,SAAS,EACT,WAAW,EACX,WAAW,EACX,eAAe,EACf,cAAc,EACd,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,WAAW,EACX,gBAAgB,GACjB,MAAM,SAAS,CAAC"}
|
|
@@ -45,6 +45,12 @@ export declare function clearRecords(): void;
|
|
|
45
45
|
/**
|
|
46
46
|
* Estimated decoded-bitmap memory (RGBA8888) at the scale this device would
|
|
47
47
|
* pick — the size fallback when bytes can't be measured (release builds).
|
|
48
|
+
*
|
|
49
|
+
* `resolvedScale` is React Native's own answer and is authoritative, but it
|
|
50
|
+
* only exists once the asset has been REGISTERED. For everything still known
|
|
51
|
+
* only from the Metro graph — the never-loaded set, which is most of what this
|
|
52
|
+
* tool is for — the scale has to be predicted the same way AssetSourceResolver
|
|
53
|
+
* would, not taken as the largest variant shipped.
|
|
48
54
|
*/
|
|
49
55
|
export declare function estDecodedBytes(record: AssetRecord): number;
|
|
50
56
|
export declare function computeStats(list: AssetRecord[]): AssetsStats;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assetStore.d.ts","sourceRoot":"","sources":["../../../src/store/assetStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"assetStore.d.ts","sourceRoot":"","sources":["../../../src/store/assetStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAYpE,mFAAmF;AACnF,wBAAgB,UAAU,IAAI,IAAI,CAIjC;AAeD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAEnD;AAED,wBAAgB,QAAQ,CACtB,kBAAkB,EAAE,MAAM,GAAG,SAAS,EACtC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,MAAM,CAWR;AAED,MAAM,WAAW,WAAW;IAC1B,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,WAAW,EAAE,GAAG,WAAW,CA8B7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseline.d.ts","sourceRoot":"","sources":["../../../src/store/baseline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAOxE,4EAA4E;AAC5E,wBAAsB,YAAY,IAAI,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAiBnE;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,cAAc,CAAC,CA0B5D;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAenD;AAED,wBAAgB,WAAW,CACzB,OAAO,EAAE,WAAW,EAAE,EACtB,QAAQ,EAAE,cAAc,GACvB,UAAU,
|
|
1
|
+
{"version":3,"file":"baseline.d.ts","sourceRoot":"","sources":["../../../src/store/baseline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAOxE,4EAA4E;AAC5E,wBAAsB,YAAY,IAAI,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAiBnE;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,cAAc,CAAC,CA0B5D;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAenD;AAED,wBAAgB,WAAW,CACzB,OAAO,EAAE,WAAW,EAAE,EACtB,QAAQ,EAAE,cAAc,GACvB,UAAU,CA0DZ;AAED,gFAAgF;AAChF,wBAAgB,OAAO,IAAI,UAAU,GAAG,IAAI,CAK3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insights.d.ts","sourceRoot":"","sources":["../../../src/store/insights.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAoB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"insights.d.ts","sourceRoot":"","sources":["../../../src/store/insights.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAoB,MAAM,UAAU,CAAC;AAiD9E,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,cAAc,CA6EnE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which scale variant this device would actually use.
|
|
3
|
+
*
|
|
4
|
+
* Shared by the decoded-memory estimate and the scale-gap insight so the two
|
|
5
|
+
* can't disagree about the same asset — they were written apart and did.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* PixelRatio, or the DEVICE's when this store is a dashboard mirror.
|
|
9
|
+
*
|
|
10
|
+
* A desktop dashboard renders another machine's inventory, and its own
|
|
11
|
+
* PixelRatio has nothing to do with which variant the phone will pick.
|
|
12
|
+
*/
|
|
13
|
+
export declare function effectivePixelRatio(): number;
|
|
14
|
+
/**
|
|
15
|
+
* The variant React Native would resolve, by AssetSourceResolver's rule: the
|
|
16
|
+
* smallest scale that covers the device, or the largest available when none
|
|
17
|
+
* does.
|
|
18
|
+
*
|
|
19
|
+
* Not simply "the biggest one shipped". An asset with @1x…@4x variants on a
|
|
20
|
+
* @3x phone decodes at 3, and calling it 4 overstates its memory by 78% —
|
|
21
|
+
* on exactly the never-loaded assets this tool exists to point at, since a
|
|
22
|
+
* loaded one carries the scale RN already picked.
|
|
23
|
+
*/
|
|
24
|
+
export declare function pickScale(scales: number[], deviceScale: number): number;
|
|
25
|
+
//# sourceMappingURL=deviceScale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deviceScale.d.ts","sourceRoot":"","sources":["../../../src/utils/deviceScale.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAQ5C;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAOvE"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Automation handles for the Assets tool.
|
|
3
|
+
*
|
|
4
|
+
* Every handle the tool renders is built here rather than inlined at the call
|
|
5
|
+
* site, for the same reason the highlight tool does it: the ids for rows,
|
|
6
|
+
* badges, filter chips and detail fields are DERIVED from data, and a suite
|
|
7
|
+
* that reimplements the derivation is a suite that can drift from the tool
|
|
8
|
+
* without either side failing. `detox-e2e/assets/fixture.js` mirrors these
|
|
9
|
+
* rules in CommonJS (the tests can't import TypeScript) and asserts the two
|
|
10
|
+
* still agree before any flow trusts a handle.
|
|
11
|
+
*
|
|
12
|
+
* Naming: `buoy-assets-<area>[-<detail>]`, one prefix for the whole tool.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Lowercase, hyphen-joined, never empty.
|
|
16
|
+
*
|
|
17
|
+
* Shared by rows, badges, filter chips and detail fields so one asset's row
|
|
18
|
+
* handle and its detail handles are slugged the same way — `back-icon.png`
|
|
19
|
+
* becomes `back-icon-png` everywhere it appears.
|
|
20
|
+
*/
|
|
21
|
+
export declare function assetSlug(value: string | number): string;
|
|
22
|
+
/**
|
|
23
|
+
* One inventory row, addressed by filename rather than by store id.
|
|
24
|
+
*
|
|
25
|
+
* The store's numeric ids are assigned in first-sighting order and are NOT
|
|
26
|
+
* stable: clearing the inventory and rescanning renumbers everything, and the
|
|
27
|
+
* order the registry walk and the Metro graph merge in depends on what the app
|
|
28
|
+
* has evaluated so far. A handle built from those makes a test that passes
|
|
29
|
+
* only on the run that recorded it.
|
|
30
|
+
*
|
|
31
|
+
* The tradeoff is that two assets with the same filename in different
|
|
32
|
+
* directories collide. That's a real ambiguity rather than a hidden one —
|
|
33
|
+
* Detox reports it as "multiple elements matched", which names the problem —
|
|
34
|
+
* and it's the same tradeoff the row itself makes, since the row shows the
|
|
35
|
+
* filename and not the path.
|
|
36
|
+
*/
|
|
37
|
+
export declare function assetRowTestID(name: string, type: string): string;
|
|
38
|
+
/** A finding badge inside a row: `…-badge-low-res`, `…-badge-dup`. */
|
|
39
|
+
export declare function assetBadgeTestID(name: string, type: string, label: string): string;
|
|
40
|
+
/** A kind/status filter chip: `buoy-assets-filter-font`, `…-filter-unused`. */
|
|
41
|
+
export declare function assetFilterTestID(filter: string): string;
|
|
42
|
+
/** One label/value pair in the detail view: `buoy-assets-detail-row-hash`. */
|
|
43
|
+
export declare function assetDetailRowTestID(label: string): string;
|
|
44
|
+
/** A loaded font-family chip: `buoy-assets-font-ionicons`. */
|
|
45
|
+
export declare function assetFontChipTestID(family: string): string;
|
|
46
|
+
/** Fixed handles — everything that isn't derived from a record. */
|
|
47
|
+
export declare const ASSETS_TEST_IDS: {
|
|
48
|
+
readonly title: "buoy-assets-title";
|
|
49
|
+
readonly copy: "buoy-assets-copy";
|
|
50
|
+
readonly clear: "buoy-assets-clear";
|
|
51
|
+
readonly list: "buoy-assets-list";
|
|
52
|
+
readonly search: "buoy-assets-search";
|
|
53
|
+
readonly sort: "buoy-assets-sort";
|
|
54
|
+
readonly saveBaseline: "buoy-assets-save-baseline";
|
|
55
|
+
readonly filterBar: "buoy-assets-filter-bar";
|
|
56
|
+
readonly notice: "buoy-assets-notice";
|
|
57
|
+
readonly noticeText: "buoy-assets-notice-text";
|
|
58
|
+
readonly fonts: "buoy-assets-fonts";
|
|
59
|
+
readonly fontsTitle: "buoy-assets-fonts-title";
|
|
60
|
+
readonly empty: "buoy-assets-empty";
|
|
61
|
+
readonly emptyTitle: "buoy-assets-empty-title";
|
|
62
|
+
readonly emptyText: "buoy-assets-empty-text";
|
|
63
|
+
readonly baseline: "buoy-assets-baseline";
|
|
64
|
+
readonly baselineSummary: "buoy-assets-baseline-summary";
|
|
65
|
+
readonly baselineUpdate: "buoy-assets-baseline-update";
|
|
66
|
+
readonly baselineClear: "buoy-assets-baseline-clear";
|
|
67
|
+
readonly detail: "buoy-assets-detail";
|
|
68
|
+
readonly detailScroll: "buoy-assets-detail-scroll";
|
|
69
|
+
readonly detailPreview: "buoy-assets-detail-preview";
|
|
70
|
+
readonly detailFontPreview: "buoy-assets-detail-font-preview";
|
|
71
|
+
readonly detailFindings: "buoy-assets-detail-findings";
|
|
72
|
+
};
|
|
73
|
+
/** One finding sentence in the detail view, by position. */
|
|
74
|
+
export declare function assetFindingTestID(index: number): string;
|
|
75
|
+
//# sourceMappingURL=testIDs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testIDs.d.ts","sourceRoot":"","sources":["../../../src/utils/testIDs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAOxD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED,sEAAsE;AACtE,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ,MAAM,CAER;AAED,+EAA+E;AAC/E,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,8EAA8E;AAC9E,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,8DAA8D;AAC9D,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED,mEAAmE;AACnE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;CA6BlB,CAAC;AAEX,4DAA4D;AAC5D,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAExD"}
|
package/package.json
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/assets",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.31",
|
|
4
4
|
"description": "See every asset shipped in your React Native app — bundled images, fonts, video and audio with dimensions, scale variants, byte sizes, duplicate detection and WebP-savings audit. Part of Buoy devtools.",
|
|
5
|
-
"main": "lib/commonjs/index",
|
|
6
|
-
"module": "lib/module/index",
|
|
5
|
+
"main": "lib/commonjs/index.js",
|
|
6
|
+
"module": "lib/module/index.js",
|
|
7
7
|
"types": "lib/typescript/index.d.ts",
|
|
8
|
-
"react-native": "
|
|
8
|
+
"react-native": "lib/module/index.js",
|
|
9
9
|
"source": "src/index.tsx",
|
|
10
10
|
"files": [
|
|
11
|
-
"src",
|
|
12
11
|
"lib"
|
|
13
12
|
],
|
|
14
13
|
"sideEffects": [
|
|
15
14
|
"**/index.*"
|
|
16
15
|
],
|
|
17
16
|
"dependencies": {
|
|
18
|
-
"@buoy-gg/shared-ui": "^7.0.
|
|
17
|
+
"@buoy-gg/shared-ui": "^7.0.31"
|
|
19
18
|
},
|
|
20
19
|
"peerDependencies": {
|
|
21
20
|
"expo-asset": "*",
|
package/src/capture/expo.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Expo enrichment — all optional, all read through globalThis.expo guards so
|
|
3
|
-
* bare RN apps (no expo-modules) silently get none of it and no imports are
|
|
4
|
-
* added for anyone.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
interface ExpoGlobal {
|
|
8
|
-
modules?: {
|
|
9
|
-
ExpoFontLoader?: { getLoadedFonts?: () => string[] };
|
|
10
|
-
ExpoUpdates?: { localAssets?: Record<string, string> };
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function expoModules(): ExpoGlobal["modules"] {
|
|
15
|
-
return (globalThis as { expo?: ExpoGlobal }).expo?.modules;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Every loaded font family — build-time embedded (config plugin / UIAppFonts /
|
|
20
|
-
* android assets/fonts) AND runtime Font.loadAsync, straight from the native
|
|
21
|
-
* module Expo documents as a stable global. [] when unavailable (bare RN).
|
|
22
|
-
*/
|
|
23
|
-
export function getLoadedFontFamilies(): string[] {
|
|
24
|
-
try {
|
|
25
|
-
const fonts = expoModules()?.ExpoFontLoader?.getLoadedFonts?.();
|
|
26
|
-
return Array.isArray(fonts) ? [...fonts].sort() : [];
|
|
27
|
-
} catch {
|
|
28
|
-
return [];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* expo-updates' per-file-hash → local URI map: the COMPLETE shipped asset set
|
|
34
|
-
* in Expo Go / OTA environments, independent of what JS has evaluated.
|
|
35
|
-
* null when not running in an updates-managed environment.
|
|
36
|
-
*/
|
|
37
|
-
export function getLocalAssets(): Record<string, string> | null {
|
|
38
|
-
try {
|
|
39
|
-
const map = expoModules()?.ExpoUpdates?.localAssets;
|
|
40
|
-
if (map && typeof map === "object" && Object.keys(map).length > 0) return map;
|
|
41
|
-
return null;
|
|
42
|
-
} catch {
|
|
43
|
-
return null;
|
|
44
|
-
}
|
|
45
|
-
}
|
package/src/capture/install.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Capture install + scan orchestration.
|
|
3
|
-
*
|
|
4
|
-
* installAssetCapture() is cheap and synchronous (registry walk + patch) and
|
|
5
|
-
* runs at package import. The expensive passes — Metro graph fetch and byte
|
|
6
|
-
* measurement — run in rescan(), triggered when the modal opens or via the
|
|
7
|
-
* `rescan` sync action, so merely installing Buoy never hits the network.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { assetsState } from "../state";
|
|
11
|
-
import { invalidate } from "../store/assetStore";
|
|
12
|
-
import { getLoadedFontFamilies, getLocalAssets } from "./expo";
|
|
13
|
-
import { measureSizes } from "./measure";
|
|
14
|
-
import { fetchAssetGraph, getDevServerOrigin } from "./metroGraph";
|
|
15
|
-
import { getRegistryModule, patchRegisterAsset, walkRegistry } from "./registry";
|
|
16
|
-
import type { AssetsScanStatus } from "../types";
|
|
17
|
-
|
|
18
|
-
export function installAssetCapture(): void {
|
|
19
|
-
const s = assetsState();
|
|
20
|
-
if (s.captureDisabled || s.installed) return;
|
|
21
|
-
s.installed = true;
|
|
22
|
-
s.registryAvailable = getRegistryModule() != null;
|
|
23
|
-
s.patched = patchRegisterAsset();
|
|
24
|
-
walkRegistry();
|
|
25
|
-
refreshEnrichment();
|
|
26
|
-
s.lastScanAt = Date.now();
|
|
27
|
-
invalidate();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function refreshEnrichment(): void {
|
|
31
|
-
const s = assetsState();
|
|
32
|
-
s.fontFamilies = getLoadedFontFamilies();
|
|
33
|
-
const localAssets = getLocalAssets();
|
|
34
|
-
s.localAssetCount = localAssets ? Object.keys(localAssets).length : null;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Full scan: registry re-walk (catches anything the patch missed), Metro
|
|
39
|
-
* graph merge (dev), Expo enrichment refresh, then size measurement.
|
|
40
|
-
*/
|
|
41
|
-
export async function rescan(): Promise<AssetsScanStatus> {
|
|
42
|
-
const s = assetsState();
|
|
43
|
-
if (s.captureDisabled) return getScanStatus();
|
|
44
|
-
installAssetCapture();
|
|
45
|
-
walkRegistry();
|
|
46
|
-
refreshEnrichment();
|
|
47
|
-
await fetchAssetGraph();
|
|
48
|
-
s.lastScanAt = Date.now();
|
|
49
|
-
invalidate();
|
|
50
|
-
void measureSizes();
|
|
51
|
-
return getScanStatus();
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function getScanStatus(): AssetsScanStatus {
|
|
55
|
-
const s = assetsState();
|
|
56
|
-
// Mirrors report the synced DEVICE's status, not the dashboard's.
|
|
57
|
-
if (s.mirrorScanStatus) return s.mirrorScanStatus;
|
|
58
|
-
let registryCount = 0;
|
|
59
|
-
for (const record of s.records) if (record.registryId != null) registryCount++;
|
|
60
|
-
return {
|
|
61
|
-
registryAvailable: s.registryAvailable,
|
|
62
|
-
patched: s.patched,
|
|
63
|
-
registryCount,
|
|
64
|
-
graphSupported: s.graphSupported || getDevServerOrigin() != null,
|
|
65
|
-
graphCount: s.graphCount,
|
|
66
|
-
graphError: s.graphError,
|
|
67
|
-
lastScanAt: s.lastScanAt,
|
|
68
|
-
measuring: s.measuring,
|
|
69
|
-
measuredCount: s.measuredCount,
|
|
70
|
-
fontFamilies: s.fontFamilies,
|
|
71
|
-
localAssetCount: s.localAssetCount,
|
|
72
|
-
};
|
|
73
|
-
}
|