hyperframes 0.8.102 → 0.8.104
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/dist/{add-VPQE3RDA.js → add-KXAWOEZJ.js} +5 -5
- package/dist/{asset-W7Y72RKR.js → asset-QAIWASUI.js} +2 -2
- package/dist/{auth-Y4RA74AF.js → auth-2FQGBN5W.js} +1 -1
- package/dist/{autoUpdate-WW6MT77L.js → autoUpdate-UXMPQYUO.js} +2 -2
- package/dist/{backgroundChecks-73O5CHLQ.js → backgroundChecks-RPBCDLBU.js} +3 -3
- package/dist/backgroundChecksWorker.js +3 -3
- package/dist/{beats-WFS46BCN.js → beats-F4PZIT7L.js} +4 -4
- package/dist/{benchmark-RGLEFQ5G.js → benchmark-AIGZ6NZT.js} +5 -5
- package/dist/{browser-L2HUA3T6.js → browser-AQTVWA2I.js} +3 -3
- package/dist/{catalog-JAEFC7JA.js → catalog-LVB5GLIS.js} +5 -5
- package/dist/{check-JJJTI3XT.js → check-ZMENBYIU.js} +12 -12
- package/dist/{checkBrowser-GCBWRN6L.js → checkBrowser-26NJ47DY.js} +10 -10
- package/dist/{chunk-UUWKFFIS.js → chunk-2M6YQAMV.js} +1 -1
- package/dist/{chunk-UFWRM7II.js → chunk-4V63UZIV.js} +1 -1
- package/dist/{chunk-FYYNMTSB.js → chunk-6CPVF7DM.js} +1 -1
- package/dist/{chunk-XL2CUGEG.js → chunk-7QGIB2E6.js} +5 -6
- package/dist/{chunk-MCABWC2G.js → chunk-E5HKS3CE.js} +1 -1
- package/dist/{chunk-VBTX4DPW.js → chunk-ELDDZYIJ.js} +1 -1
- package/dist/{chunk-YYVDW3U3.js → chunk-IEBXD6Y6.js} +2 -2
- package/dist/{chunk-RNCCSWOD.js → chunk-JUDUP2IC.js} +2 -2
- package/dist/{chunk-AR3DNUZK.js → chunk-MZWGD4IR.js} +1 -1
- package/dist/{chunk-3AQWEGA4.js → chunk-PRWBZGQ5.js} +1 -1
- package/dist/{chunk-KQMNHUSQ.js → chunk-RUQUOWIV.js} +3 -3
- package/dist/{chunk-364C3NZJ.js → chunk-S4EZWGRD.js} +2 -2
- package/dist/{chunk-NOFP4LDK.js → chunk-SA4HX7OJ.js} +2 -2
- package/dist/{chunk-5WCH43SG.js → chunk-TKZAN2AY.js} +2 -2
- package/dist/{chunk-RPJZ2OIC.js → chunk-TVKKKJQT.js} +1 -1
- package/dist/{chunk-XGMLRDCS.js → chunk-VAFKQ546.js} +1 -1
- package/dist/{chunk-KH6C7WX4.js → chunk-XOBW5TFB.js} +2 -2
- package/dist/{chunk-VG7RVEYC.js → chunk-ZASIQRKO.js} +3 -3
- package/dist/{clean-VPKV37YK.js → clean-4NIBDW2Y.js} +4 -4
- package/dist/cli.js +44 -44
- package/dist/{cloud-Y7DY5RBU.js → cloud-XONUMPVD.js} +4 -4
- package/dist/{compare-2IBGPG4Z.js → compare-PLEGE2AB.js} +7 -7
- package/dist/{component-6D3CRP27.js → component-YODSQLKS.js} +3 -3
- package/dist/{compositions-3YOJVZHN.js → compositions-ZYGETZWE.js} +5 -5
- package/dist/{delete-PPQEJ7WN.js → delete-2YR5ZDZI.js} +2 -2
- package/dist/{doctor-NPFWKGFN.js → doctor-WS4BOIAN.js} +3 -3
- package/dist/{events-WZVJQKZT.js → events-AWJJTVYV.js} +2 -2
- package/dist/{events-GBXFJDHM.js → events-QEEFQ76R.js} +3 -3
- package/dist/{feedback-VQSKHS6W.js → feedback-32I2DS3H.js} +4 -4
- package/dist/{figma-FQRSLUPF.js → figma-THXKL7C3.js} +3 -3
- package/dist/fontLocalizeCli.js +1 -1
- package/dist/{get-BPSVNOBT.js → get-2RK36VX3.js} +2 -2
- package/dist/{grade-compare-5DVQDKDM.js → grade-compare-4R5XDPJU.js} +7 -7
- package/dist/{help-LHVN2JXZ.js → help-YKZ5HPQO.js} +1 -1
- package/dist/{history-FNA6JRDA.js → history-2IPTBA55.js} +6 -6
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/{info-RVYWRVMP.js → info-H2ZIL5YN.js} +5 -5
- package/dist/{init-JOEJCQGG.js → init-2ZEQAKSE.js} +6 -6
- package/dist/{inspect-XGIRSOZJ.js → inspect-FQEXVZUP.js} +9 -9
- package/dist/{keyframes-TUFGKZLT.js → keyframes-GHCATB4L.js} +6 -6
- package/dist/{layout-XHDUU7SG.js → layout-JUAYXDNX.js} +9 -9
- package/dist/{lint-IT3XLO4V.js → lint-45XP4TUK.js} +6 -6
- package/dist/{list-DD4WNXO2.js → list-CKALQL3O.js} +2 -2
- package/dist/{login-6VNLZQVC.js → login-QQDJUIGO.js} +4 -4
- package/dist/{media-treatment-C4KOV2A6.js → media-treatment-CBQ2DANK.js} +5 -5
- package/dist/{motionShot-XRSPP3G6.js → motionShot-TGJGSYGV.js} +1 -1
- package/dist/{normalize-audio-23OENV4B.js → normalize-audio-OVVPWEUL.js} +4 -4
- package/dist/{play-7MXFYNVD.js → play-YIHX3DZX.js} +7 -7
- package/dist/{present-DERIUORA.js → present-FWJNW3Z3.js} +7 -7
- package/dist/{preview-5RNTVKJW.js → preview-TAICDDJL.js} +5 -5
- package/dist/{render-MPUHSMQI.js → render-LHTKQD2G.js} +5 -5
- package/dist/{render-U6KEOEJM.js → render-TSOLZGAK.js} +5 -5
- package/dist/{skills-SKOWWTXY.js → skills-4M2LBGYL.js} +5 -5
- package/dist/{skillsUpdateCheck-NNJJCMBN.js → skillsUpdateCheck-WDI32JU4.js} +3 -3
- package/dist/{snapshot-K363RKEN.js → snapshot-33SGYIF6.js} +7 -7
- package/dist/{staticProjectServer-TEVGFDXU.js → staticProjectServer-QDLEH37G.js} +3 -3
- package/dist/studio/assets/{hyperframes-player-BuRiFtrF.js → hyperframes-player-DAoaajuM.js} +1 -1
- package/dist/studio/assets/{index-BT3sauee.js → index-BDK4rTMb.js} +1 -1
- package/dist/studio/assets/{index-xB5O0hPw.css → index-CQN3M56N.css} +1 -1
- package/dist/studio/assets/{index-C2utDZt-.js → index-De2aO4XM.js} +179 -179
- package/dist/studio/assets/{index-BM35fjFf.js → index-WV9LroAD.js} +1 -1
- package/dist/studio/{chunk-MTAVNAGW.js → chunk-46XP7J3B.js} +2 -2
- package/dist/studio/{chunk-S65AQH6M.js → chunk-DI4LCJHL.js} +3 -2
- package/dist/studio/chunk-DI4LCJHL.js.map +1 -0
- package/dist/studio/{chunk-7X4XRP3L.js → chunk-HIGHVWYD.js} +2 -2
- package/dist/studio/{domEditingLayers-NU6Z5QWA.js → domEditingLayers-AQBDFNUC.js} +3 -3
- package/dist/studio/index.d.ts +183 -170
- package/dist/studio/index.html +2 -2
- package/dist/studio/index.js +550 -389
- package/dist/studio/index.js.map +1 -1
- package/dist/studio/player.js +2 -2
- package/dist/studio/styles.css +1 -1
- package/dist/{studio-api-VNIEVFVL.js → studio-api-RMDM77U2.js} +1 -1
- package/dist/{studioServer-YQGQ3V4W.js → studioServer-CTDEYU7Q.js} +5 -5
- package/dist/{telemetry-MRO55C62.js → telemetry-7P3TXR5K.js} +3 -3
- package/dist/{timeline-FRQ77XDZ.js → timeline-WOBSPT6V.js} +6 -6
- package/dist/{tokens-UHPUH375.js → tokens-2A4LMJYJ.js} +2 -2
- package/dist/{transcribe-J7MUTYBO.js → transcribe-7VKKNU5N.js} +3 -3
- package/dist/{updateCheck-GLRNJI6D.js → updateCheck-5UKKIEDG.js} +2 -2
- package/dist/{upgrade-RCC4OG57.js → upgrade-QZIZVUIX.js} +2 -2
- package/dist/{validate-KK5PW37V.js → validate-D2YZV5KV.js} +6 -6
- package/package.json +1 -1
- package/dist/studio/chunk-S65AQH6M.js.map +0 -1
- /package/dist/studio/{chunk-MTAVNAGW.js.map → chunk-46XP7J3B.js.map} +0 -0
- /package/dist/studio/{chunk-7X4XRP3L.js.map → chunk-HIGHVWYD.js.map} +0 -0
- /package/dist/studio/{domEditingLayers-NU6Z5QWA.js.map → domEditingLayers-AQBDFNUC.js.map} +0 -0
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
openProjectHistory,
|
|
37
37
|
stampProjectHfIds,
|
|
38
38
|
thumbnailDeviceScaleFactor
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-7QGIB2E6.js";
|
|
40
40
|
import "./chunk-M4KS6MJN.js";
|
|
41
41
|
import {
|
|
42
42
|
replaceFileAtomically
|
|
@@ -67,12 +67,12 @@ import "./chunk-RDMAU7AJ.js";
|
|
|
67
67
|
import {
|
|
68
68
|
trackRenderComplete,
|
|
69
69
|
trackRenderError
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-VAFKQ546.js";
|
|
71
71
|
import {
|
|
72
72
|
canaryDecisionsForStudio,
|
|
73
73
|
resetTelemetryPostureCache,
|
|
74
74
|
shouldTrack
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-4V63UZIV.js";
|
|
76
76
|
import "./chunk-VWG7OQKU.js";
|
|
77
77
|
import "./chunk-ZTZA4UWZ.js";
|
|
78
78
|
import {
|
|
@@ -125,7 +125,7 @@ import {
|
|
|
125
125
|
} from "./chunk-ISN5GRYI.js";
|
|
126
126
|
import {
|
|
127
127
|
VERSION
|
|
128
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-IEBXD6Y6.js";
|
|
129
129
|
import "./chunk-KNU5COPB.js";
|
|
130
130
|
import "./chunk-3GXQPCJC.js";
|
|
131
131
|
import "./chunk-RQVDTPGD.js";
|
|
@@ -1142,7 +1142,7 @@ function createStudioServer(options) {
|
|
|
1142
1142
|
return loadAllItems(blockAndComponentEntries, registry);
|
|
1143
1143
|
},
|
|
1144
1144
|
async installRegistryBlock(opts) {
|
|
1145
|
-
const { addToProject, primaryInstalledTarget } = await import("./add-
|
|
1145
|
+
const { addToProject, primaryInstalledTarget } = await import("./add-KXAWOEZJ.js");
|
|
1146
1146
|
const { recordRewrittenInstall } = await import("./installer-UZSVMUKT.js");
|
|
1147
1147
|
const { registryTargetPath } = await import("./publication-7RKKPKLM.js");
|
|
1148
1148
|
const { result, item } = await addToProject({
|
|
@@ -17,14 +17,14 @@ import {
|
|
|
17
17
|
trackInitTemplate,
|
|
18
18
|
trackRenderComplete,
|
|
19
19
|
trackRenderError
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-VAFKQ546.js";
|
|
21
21
|
import {
|
|
22
22
|
flush,
|
|
23
23
|
flushSync,
|
|
24
24
|
shouldTrack,
|
|
25
25
|
showTelemetryNotice,
|
|
26
26
|
trackEvent
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-4V63UZIV.js";
|
|
28
28
|
import "./chunk-VWG7OQKU.js";
|
|
29
29
|
import "./chunk-ZTZA4UWZ.js";
|
|
30
30
|
import {
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
} from "./chunk-XUXGIA7H.js";
|
|
61
61
|
import "./chunk-WERLJGIC.js";
|
|
62
62
|
import "./chunk-ISN5GRYI.js";
|
|
63
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-IEBXD6Y6.js";
|
|
64
64
|
import "./chunk-KNU5COPB.js";
|
|
65
65
|
import "./chunk-3GXQPCJC.js";
|
|
66
66
|
import "./chunk-RQVDTPGD.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
applyFileMutations,
|
|
12
12
|
duplicateElementInHtml,
|
|
13
13
|
fileContentVersion
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-7QGIB2E6.js";
|
|
15
15
|
import {
|
|
16
16
|
patchElementInHtml,
|
|
17
17
|
removeElementFromHtml,
|
|
@@ -21,14 +21,14 @@ import "./chunk-4Z5O7BTD.js";
|
|
|
21
21
|
import "./chunk-O5TBFZ7X.js";
|
|
22
22
|
import {
|
|
23
23
|
resolveProject
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-6CPVF7DM.js";
|
|
25
25
|
import "./chunk-IHFUKJOR.js";
|
|
26
26
|
import {
|
|
27
27
|
ensureDOMParser
|
|
28
28
|
} from "./chunk-PFCFR3KZ.js";
|
|
29
29
|
import "./chunk-RDMAU7AJ.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-VAFKQ546.js";
|
|
31
|
+
import "./chunk-4V63UZIV.js";
|
|
32
32
|
import "./chunk-VWG7OQKU.js";
|
|
33
33
|
import "./chunk-ZTZA4UWZ.js";
|
|
34
34
|
import "./chunk-PUB5XZYL.js";
|
|
@@ -89,12 +89,12 @@ import "./chunk-GK4AIFIH.js";
|
|
|
89
89
|
import "./chunk-2PSPARWP.js";
|
|
90
90
|
import {
|
|
91
91
|
withMeta
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-TVKKKJQT.js";
|
|
93
93
|
import "./chunk-K4WIOZFP.js";
|
|
94
94
|
import "./chunk-XUXGIA7H.js";
|
|
95
95
|
import "./chunk-WERLJGIC.js";
|
|
96
96
|
import "./chunk-ISN5GRYI.js";
|
|
97
|
-
import "./chunk-
|
|
97
|
+
import "./chunk-IEBXD6Y6.js";
|
|
98
98
|
import "./chunk-KNU5COPB.js";
|
|
99
99
|
import "./chunk-3GXQPCJC.js";
|
|
100
100
|
import "./chunk-RQVDTPGD.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
tokensToVariables,
|
|
12
12
|
upsertBindings,
|
|
13
13
|
withFigmaErrors
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-PRWBZGQ5.js";
|
|
15
15
|
import "./chunk-IHFUKJOR.js";
|
|
16
16
|
import "./chunk-ZTZA4UWZ.js";
|
|
17
17
|
import {
|
|
@@ -76,7 +76,7 @@ var tokens_default = defineCommand({
|
|
|
76
76
|
console.log("add to data-composition-variables:");
|
|
77
77
|
console.log(JSON.stringify(result.entries, null, 2));
|
|
78
78
|
}
|
|
79
|
-
const { trackFigmaImport } = await import("./telemetry-
|
|
79
|
+
const { trackFigmaImport } = await import("./telemetry-7P3TXR5K.js");
|
|
80
80
|
trackFigmaImport({
|
|
81
81
|
phase: "tokens",
|
|
82
82
|
tokensMode: result.mode,
|
|
@@ -15,8 +15,8 @@ import "./chunk-X5HWXQPU.js";
|
|
|
15
15
|
import "./chunk-TVCRUG2S.js";
|
|
16
16
|
import {
|
|
17
17
|
trackTranscribeUnavailable
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-VAFKQ546.js";
|
|
19
|
+
import "./chunk-4V63UZIV.js";
|
|
20
20
|
import "./chunk-VWG7OQKU.js";
|
|
21
21
|
import {
|
|
22
22
|
c
|
|
@@ -51,7 +51,7 @@ import "./chunk-K4WIOZFP.js";
|
|
|
51
51
|
import "./chunk-XUXGIA7H.js";
|
|
52
52
|
import "./chunk-WERLJGIC.js";
|
|
53
53
|
import "./chunk-ISN5GRYI.js";
|
|
54
|
-
import "./chunk-
|
|
54
|
+
import "./chunk-IEBXD6Y6.js";
|
|
55
55
|
import {
|
|
56
56
|
normalizeErrorMessage
|
|
57
57
|
} from "./chunk-KNU5COPB.js";
|
|
@@ -16,12 +16,12 @@ import {
|
|
|
16
16
|
updateCheckDue,
|
|
17
17
|
updateNoticesSuppressed,
|
|
18
18
|
withMeta
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-TVKKKJQT.js";
|
|
20
20
|
import "./chunk-K4WIOZFP.js";
|
|
21
21
|
import "./chunk-XUXGIA7H.js";
|
|
22
22
|
import "./chunk-WERLJGIC.js";
|
|
23
23
|
import "./chunk-ISN5GRYI.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-IEBXD6Y6.js";
|
|
25
25
|
import "./chunk-KNU5COPB.js";
|
|
26
26
|
import "./chunk-M2WBOQ2Q.js";
|
|
27
27
|
export {
|
|
@@ -28,14 +28,14 @@ import {
|
|
|
28
28
|
rewritePinnedHyperframesText,
|
|
29
29
|
rewriteProjectPinnedScripts,
|
|
30
30
|
withMeta
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-TVKKKJQT.js";
|
|
32
32
|
import "./chunk-K4WIOZFP.js";
|
|
33
33
|
import "./chunk-XUXGIA7H.js";
|
|
34
34
|
import "./chunk-WERLJGIC.js";
|
|
35
35
|
import "./chunk-ISN5GRYI.js";
|
|
36
36
|
import {
|
|
37
37
|
VERSION
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-IEBXD6Y6.js";
|
|
39
39
|
import "./chunk-KNU5COPB.js";
|
|
40
40
|
import "./chunk-M2WBOQ2Q.js";
|
|
41
41
|
|
|
@@ -13,18 +13,18 @@ import {
|
|
|
13
13
|
shouldIgnoreHttpError,
|
|
14
14
|
shouldIgnoreRequestFailure,
|
|
15
15
|
validate_default
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RUQUOWIV.js";
|
|
17
17
|
import "./chunk-XZSH5GS7.js";
|
|
18
18
|
import "./chunk-5Z63TBTX.js";
|
|
19
19
|
import "./chunk-262C25DQ.js";
|
|
20
20
|
import "./chunk-IQ4UCWV7.js";
|
|
21
21
|
import "./chunk-YEIFI443.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-6CPVF7DM.js";
|
|
23
23
|
import "./chunk-IHFUKJOR.js";
|
|
24
24
|
import "./chunk-PFCFR3KZ.js";
|
|
25
25
|
import "./chunk-4WAMN4IF.js";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-VAFKQ546.js";
|
|
27
|
+
import "./chunk-4V63UZIV.js";
|
|
28
28
|
import "./chunk-VWG7OQKU.js";
|
|
29
29
|
import "./chunk-ZTZA4UWZ.js";
|
|
30
30
|
import "./chunk-PUB5XZYL.js";
|
|
@@ -47,12 +47,12 @@ import "./chunk-PJ3HDUCY.js";
|
|
|
47
47
|
import "./chunk-TQFG7HTI.js";
|
|
48
48
|
import "./chunk-GK4AIFIH.js";
|
|
49
49
|
import "./chunk-2PSPARWP.js";
|
|
50
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-TVKKKJQT.js";
|
|
51
51
|
import "./chunk-K4WIOZFP.js";
|
|
52
52
|
import "./chunk-XUXGIA7H.js";
|
|
53
53
|
import "./chunk-WERLJGIC.js";
|
|
54
54
|
import "./chunk-ISN5GRYI.js";
|
|
55
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-IEBXD6Y6.js";
|
|
56
56
|
import "./chunk-KNU5COPB.js";
|
|
57
57
|
import "./chunk-3GXQPCJC.js";
|
|
58
58
|
import "./chunk-RQVDTPGD.js";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/sourceScopedSelectorIndex.ts","../src/utils/projectRouting.ts"],"sourcesContent":["/**\n * Occurrence index for a selector within its source document.\n *\n * The preview flattens multiple composition files into one DOM, so a raw\n * `querySelectorAll` index is not a stable source-file identity. Callers supply\n * their existing source resolver; this helper alone owns occurrence scoping.\n */\n\n/** Every element matching one selector, mapped to the source file it belongs to\n * and its occurrence index within that file. One document query fills it. */\ntype SelectorOccurrences = Map<Element, { scope: string; index: number }>;\n\ninterface SelectorIndexPass {\n doc: Document;\n bySelector: Map<string, SelectorOccurrences>;\n}\n\nlet activePass: SelectorIndexPass | null = null;\n\n/**\n * Share one occurrence index per selector across every\n * `getSourceScopedSelectorIndex` call made synchronously inside `run`.\n *\n * Unshared, each call runs its own whole-document `querySelectorAll(selector)`\n * and resolves the source file of every match. A rebuild that walks n elements\n * sharing a selector therefore does n whole-document queries and n² resolver\n * calls — a composition of repeated cards or tiles is exactly that shape. One\n * index per selector makes the same pass linear.\n *\n * Correctness rests on the pass being ONE synchronous walk of a document that\n * does not change under it: nothing invalidates the index, so `run` must not\n * mutate `doc`, and every call inside it must resolve source files the same way\n * (the resolver may be a fresh closure per call, as long as it answers the\n * same). Outside a pass the index is per-call, exactly as before.\n */\nexport function withSelectorIndexPass<T>(doc: Document, run: () => T): T {\n const previous = activePass;\n activePass = { doc, bySelector: new Map() };\n try {\n return run();\n } finally {\n activePass = previous;\n }\n}\n\nfunction buildOccurrences(\n doc: Document,\n selector: string,\n resolveSourceFile: (candidate: Element) => string | undefined,\n): SelectorOccurrences {\n const occurrences: SelectorOccurrences = new Map();\n const counts = new Map<string, number>();\n for (const candidate of doc.querySelectorAll(selector)) {\n const scope = resolveSourceFile(candidate) ?? \"index.html\";\n const index = counts.get(scope) ?? 0;\n counts.set(scope, index + 1);\n occurrences.set(candidate, { scope, index });\n }\n return occurrences;\n}\n\nexport function getSourceScopedSelectorIndex(\n doc: Document,\n el: Element,\n selector: string | undefined,\n sourceFile: string | undefined,\n resolveSourceFile: (candidate: Element) => string | undefined,\n): number | undefined {\n if (!selector || selector.startsWith(\"#\") || selector.startsWith(\"[data-composition-id=\")) {\n return undefined;\n }\n\n try {\n const pass = activePass?.doc === doc ? activePass : null;\n let occurrences = pass?.bySelector.get(selector);\n if (!occurrences) {\n occurrences = buildOccurrences(doc, selector, resolveSourceFile);\n pass?.bySelector.set(selector, occurrences);\n }\n // An element outside the requested scope is not in that scope's occurrence\n // run at all, which is the `indexOf` miss the filtered form returned before.\n const hit = occurrences.get(el);\n return hit && hit.scope === (sourceFile ?? \"index.html\") ? hit.index : undefined;\n } catch {\n return undefined;\n }\n}\n","const PROJECT_HASH_PREFIX = \"#project/\";\n\nexport interface ProjectHashRoute {\n projectId: string;\n params: URLSearchParams;\n}\n\n/** Project names are single path segments, including when received from a hash or server. */\nexport function isValidProjectId(value: string): boolean {\n return (\n value.length > 0 &&\n value !== \".\" &&\n value !== \"..\" &&\n !value.includes(\":\") &&\n !value.includes(\"/\") &&\n !value.includes(\"\\\\\") &&\n !Array.from(value).some((char) => char.charCodeAt(0) < 32)\n );\n}\n\nfunction decodeHashProjectId(value: string): string {\n try {\n return decodeURIComponent(value);\n } catch {\n return value;\n }\n}\n\nfunction normalizeHashParams(\n params?: URLSearchParams | Record<string, string | null | undefined>,\n): URLSearchParams {\n if (!params) return new URLSearchParams();\n if (params instanceof URLSearchParams) return params;\n\n const next = new URLSearchParams();\n for (const [key, value] of Object.entries(params)) {\n if (!key || value == null || value === \"\") continue;\n next.set(key, value);\n }\n return next;\n}\n\nexport function encodeProjectId(projectId: string): string {\n if (!isValidProjectId(projectId)) throw new Error(\"Invalid project ID\");\n return encodeURIComponent(projectId);\n}\n\nexport function buildProjectHash(\n projectId: string,\n params?: URLSearchParams | Record<string, string | null | undefined>,\n): string {\n const search = normalizeHashParams(params).toString();\n return `${PROJECT_HASH_PREFIX}${encodeProjectId(projectId)}${search ? `?${search}` : \"\"}`;\n}\n\nexport function parseProjectHashRoute(hash: string): ProjectHashRoute | null {\n if (!hash.startsWith(PROJECT_HASH_PREFIX)) return null;\n\n const route = hash.slice(PROJECT_HASH_PREFIX.length);\n const queryIndex = route.indexOf(\"?\");\n const encodedProjectId = queryIndex >= 0 ? route.slice(0, queryIndex) : route;\n if (!encodedProjectId || encodedProjectId.includes(\"/\")) return null;\n\n const projectId = decodeHashProjectId(encodedProjectId);\n if (!isValidProjectId(projectId)) return null;\n\n const rawParams = queryIndex >= 0 ? route.slice(queryIndex + 1) : \"\";\n return {\n projectId,\n params: new URLSearchParams(rawParams),\n };\n}\n\nexport function parseProjectIdFromHash(hash: string): string | null {\n return parseProjectHashRoute(hash)?.projectId ?? null;\n}\n\nexport function buildProjectApiPath(projectId: string, suffix = \"\"): string {\n const normalizedSuffix = suffix && !suffix.startsWith(\"/\") ? `/${suffix}` : suffix;\n return `/api/projects/${encodeProjectId(projectId)}${normalizedSuffix}`;\n}\n"],"mappings":";AAiBA,IAAI,aAAuC;AAkBpC,SAAS,sBAAyB,KAAe,KAAiB;AACvE,QAAM,WAAW;AACjB,eAAa,EAAE,KAAK,YAAY,oBAAI,IAAI,EAAE;AAC1C,MAAI;AACF,WAAO,IAAI;AAAA,EACb,UAAE;AACA,iBAAa;AAAA,EACf;AACF;AAEA,SAAS,iBACP,KACA,UACA,mBACqB;AACrB,QAAM,cAAmC,oBAAI,IAAI;AACjD,QAAM,SAAS,oBAAI,I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