ontrackd 0.0.0-stage → 0.11.0
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/LICENSE +14 -0
- package/README.md +128 -2
- package/dist/cli/build.d.ts +1 -0
- package/dist/cli/build.js +172 -0
- package/dist/cli/build.js.map +1 -0
- package/dist/cli/cloud.d.ts +20 -0
- package/dist/cli/cloud.js +395 -0
- package/dist/cli/cloud.js.map +1 -0
- package/dist/cli/feedback.d.ts +4 -0
- package/dist/cli/feedback.js +90 -0
- package/dist/cli/feedback.js.map +1 -0
- package/dist/cli/hugo.d.ts +1 -0
- package/dist/cli/hugo.js +396 -0
- package/dist/cli/hugo.js.map +1 -0
- package/dist/cli/init.d.ts +8 -0
- package/dist/cli/init.js +346 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/invite.d.ts +2 -0
- package/dist/cli/invite.js +65 -0
- package/dist/cli/invite.js.map +1 -0
- package/dist/cli/link.d.ts +20 -0
- package/dist/cli/link.js +287 -0
- package/dist/cli/link.js.map +1 -0
- package/dist/cli/pull.d.ts +31 -0
- package/dist/cli/pull.js +273 -0
- package/dist/cli/pull.js.map +1 -0
- package/dist/cli/push.d.ts +9 -0
- package/dist/cli/push.js +57 -0
- package/dist/cli/push.js.map +1 -0
- package/dist/cli/remote.d.ts +1 -0
- package/dist/cli/remote.js +114 -0
- package/dist/cli/remote.js.map +1 -0
- package/dist/cli/serve.d.ts +1 -0
- package/dist/cli/serve.js +178 -0
- package/dist/cli/serve.js.map +1 -0
- package/dist/cli/sidecar.d.ts +9 -0
- package/dist/cli/sidecar.js +23 -0
- package/dist/cli/sidecar.js.map +1 -0
- package/dist/core/anchorId.d.ts +42 -0
- package/dist/core/anchorId.js +50 -0
- package/dist/core/anchorId.js.map +1 -0
- package/dist/core/apiKind.d.ts +42 -0
- package/dist/core/apiKind.js +83 -0
- package/dist/core/apiKind.js.map +1 -0
- package/dist/core/astroAnchors.d.ts +39 -0
- package/dist/core/astroAnchors.js +217 -0
- package/dist/core/astroAnchors.js.map +1 -0
- package/dist/core/attachmentTypes.d.ts +74 -0
- package/dist/core/attachmentTypes.js +199 -0
- package/dist/core/attachmentTypes.js.map +1 -0
- package/dist/core/elementHints.d.ts +40 -0
- package/dist/core/elementHints.js +116 -0
- package/dist/core/elementHints.js.map +1 -0
- package/dist/core/exportTaskDoc.d.ts +81 -0
- package/dist/core/exportTaskDoc.js +828 -0
- package/dist/core/exportTaskDoc.js.map +1 -0
- package/dist/core/feedbackTypes.d.ts +241 -0
- package/dist/core/feedbackTypes.js +2 -0
- package/dist/core/feedbackTypes.js.map +1 -0
- package/dist/core/fingerprint.d.ts +12 -0
- package/dist/core/fingerprint.js +24 -0
- package/dist/core/fingerprint.js.map +1 -0
- package/dist/core/htmlAnchors.d.ts +18 -0
- package/dist/core/htmlAnchors.js +157 -0
- package/dist/core/htmlAnchors.js.map +1 -0
- package/dist/core/imageSniff.d.ts +7 -0
- package/dist/core/imageSniff.js +12 -0
- package/dist/core/imageSniff.js.map +1 -0
- package/dist/core/ordering.d.ts +16 -0
- package/dist/core/ordering.js +10 -0
- package/dist/core/ordering.js.map +1 -0
- package/dist/core/oxcAst.d.ts +39 -0
- package/dist/core/oxcAst.js +147 -0
- package/dist/core/oxcAst.js.map +1 -0
- package/dist/core/pageUrl.d.ts +10 -0
- package/dist/core/pageUrl.js +27 -0
- package/dist/core/pageUrl.js.map +1 -0
- package/dist/core/participants.d.ts +14 -0
- package/dist/core/participants.js +38 -0
- package/dist/core/participants.js.map +1 -0
- package/dist/core/ports.d.ts +86 -0
- package/dist/core/ports.js +2 -0
- package/dist/core/ports.js.map +1 -0
- package/dist/core/projectSecret.d.ts +9 -0
- package/dist/core/projectSecret.js +57 -0
- package/dist/core/projectSecret.js.map +1 -0
- package/dist/core/recipe.d.ts +117 -0
- package/dist/core/recipe.js +181 -0
- package/dist/core/recipe.js.map +1 -0
- package/dist/core/recordingSummary.d.ts +12 -0
- package/dist/core/recordingSummary.js +150 -0
- package/dist/core/recordingSummary.js.map +1 -0
- package/dist/core/resolveAnchors.d.ts +70 -0
- package/dist/core/resolveAnchors.js +101 -0
- package/dist/core/resolveAnchors.js.map +1 -0
- package/dist/core/scriptImport.d.ts +10 -0
- package/dist/core/scriptImport.js +18 -0
- package/dist/core/scriptImport.js.map +1 -0
- package/dist/core/sourceAnchors.d.ts +62 -0
- package/dist/core/sourceAnchors.js +82 -0
- package/dist/core/sourceAnchors.js.map +1 -0
- package/dist/core/sourceContext.d.ts +62 -0
- package/dist/core/sourceContext.js +182 -0
- package/dist/core/sourceContext.js.map +1 -0
- package/dist/core/sourcePath.d.ts +2 -0
- package/dist/core/sourcePath.js +11 -0
- package/dist/core/sourcePath.js.map +1 -0
- package/dist/core/staleness.d.ts +118 -0
- package/dist/core/staleness.js +155 -0
- package/dist/core/staleness.js.map +1 -0
- package/dist/core/styleOrigin.d.ts +98 -0
- package/dist/core/styleOrigin.js +142 -0
- package/dist/core/styleOrigin.js.map +1 -0
- package/dist/core/svelteAnchors.d.ts +18 -0
- package/dist/core/svelteAnchors.js +125 -0
- package/dist/core/svelteAnchors.js.map +1 -0
- package/dist/core/taskFiles.d.ts +31 -0
- package/dist/core/taskFiles.js +55 -0
- package/dist/core/taskFiles.js.map +1 -0
- package/dist/core/untrusted.d.ts +57 -0
- package/dist/core/untrusted.js +268 -0
- package/dist/core/untrusted.js.map +1 -0
- package/dist/core/vueAnchors.d.ts +21 -0
- package/dist/core/vueAnchors.js +130 -0
- package/dist/core/vueAnchors.js.map +1 -0
- package/dist/expo/app/Avatar.d.ts +6 -0
- package/dist/expo/app/Avatar.js +12 -0
- package/dist/expo/app/Avatar.js.map +1 -0
- package/dist/expo/app/Bars.d.ts +9 -0
- package/dist/expo/app/Bars.js +38 -0
- package/dist/expo/app/Bars.js.map +1 -0
- package/dist/expo/app/CommentThreadSheet.d.ts +35 -0
- package/dist/expo/app/CommentThreadSheet.js +200 -0
- package/dist/expo/app/CommentThreadSheet.js.map +1 -0
- package/dist/expo/app/CommentsSheet.d.ts +22 -0
- package/dist/expo/app/CommentsSheet.js +76 -0
- package/dist/expo/app/CommentsSheet.js.map +1 -0
- package/dist/expo/app/Files.d.ts +16 -0
- package/dist/expo/app/Files.js +62 -0
- package/dist/expo/app/Files.js.map +1 -0
- package/dist/expo/app/Highlight.d.ts +5 -0
- package/dist/expo/app/Highlight.js +12 -0
- package/dist/expo/app/Highlight.js.map +1 -0
- package/dist/expo/app/Icon.d.ts +9 -0
- package/dist/expo/app/Icon.js +22 -0
- package/dist/expo/app/Icon.js.map +1 -0
- package/dist/expo/app/MarkerPins.d.ts +10 -0
- package/dist/expo/app/MarkerPins.js +70 -0
- package/dist/expo/app/MarkerPins.js.map +1 -0
- package/dist/expo/app/Provider.d.ts +13 -0
- package/dist/expo/app/Provider.js +597 -0
- package/dist/expo/app/Provider.js.map +1 -0
- package/dist/expo/app/Sheet.d.ts +53 -0
- package/dist/expo/app/Sheet.js +106 -0
- package/dist/expo/app/Sheet.js.map +1 -0
- package/dist/expo/app/Toolbar.d.ts +26 -0
- package/dist/expo/app/Toolbar.js +71 -0
- package/dist/expo/app/Toolbar.js.map +1 -0
- package/dist/expo/app/adapter.d.ts +55 -0
- package/dist/expo/app/adapter.js +145 -0
- package/dist/expo/app/adapter.js.map +1 -0
- package/dist/expo/app/api.d.ts +68 -0
- package/dist/expo/app/api.js +86 -0
- package/dist/expo/app/api.js.map +1 -0
- package/dist/expo/app/assets/attach.png +0 -0
- package/dist/expo/app/assets/close.png +0 -0
- package/dist/expo/app/assets/comment.png +0 -0
- package/dist/expo/app/assets/edit.png +0 -0
- package/dist/expo/app/assets/file.png +0 -0
- package/dist/expo/app/assets/narrow.png +0 -0
- package/dist/expo/app/assets/panel.png +0 -0
- package/dist/expo/app/assets/pins.png +0 -0
- package/dist/expo/app/assets/pinsOff.png +0 -0
- package/dist/expo/app/assets/remove.png +0 -0
- package/dist/expo/app/assets/reopen.png +0 -0
- package/dist/expo/app/assets/resolve.png +0 -0
- package/dist/expo/app/assets/send.png +0 -0
- package/dist/expo/app/assets/widen.png +0 -0
- package/dist/expo/app/attachments.d.ts +93 -0
- package/dist/expo/app/attachments.js +181 -0
- package/dist/expo/app/attachments.js.map +1 -0
- package/dist/expo/app/cloudApi.d.ts +63 -0
- package/dist/expo/app/cloudApi.js +330 -0
- package/dist/expo/app/cloudApi.js.map +1 -0
- package/dist/expo/app/cloudAuth.d.ts +20 -0
- package/dist/expo/app/cloudAuth.js +71 -0
- package/dist/expo/app/cloudAuth.js.map +1 -0
- package/dist/expo/app/cloudHttp.d.ts +20 -0
- package/dist/expo/app/cloudHttp.js +46 -0
- package/dist/expo/app/cloudHttp.js.map +1 -0
- package/dist/expo/app/cloudSession.d.ts +30 -0
- package/dist/expo/app/cloudSession.js +72 -0
- package/dist/expo/app/cloudSession.js.map +1 -0
- package/dist/expo/app/comments.d.ts +20 -0
- package/dist/expo/app/comments.js +131 -0
- package/dist/expo/app/comments.js.map +1 -0
- package/dist/expo/app/devMenuNone.d.ts +5 -0
- package/dist/expo/app/devMenuNone.js +3 -0
- package/dist/expo/app/devMenuNone.js.map +1 -0
- package/dist/expo/app/devServerNone.d.ts +4 -0
- package/dist/expo/app/devServerNone.js +4 -0
- package/dist/expo/app/devServerNone.js.map +1 -0
- package/dist/expo/app/embeddedConfig.d.ts +1 -0
- package/dist/expo/app/embeddedConfig.js +12 -0
- package/dist/expo/app/embeddedConfig.js.map +1 -0
- package/dist/expo/app/embeddedConfigCloud.d.ts +2 -0
- package/dist/expo/app/embeddedConfigCloud.js +8 -0
- package/dist/expo/app/embeddedConfigCloud.js.map +1 -0
- package/dist/expo/app/embeddedConfigNone.d.ts +2 -0
- package/dist/expo/app/embeddedConfigNone.js +3 -0
- package/dist/expo/app/embeddedConfigNone.js.map +1 -0
- package/dist/expo/app/expo.d.ts +4 -0
- package/dist/expo/app/expo.js +35 -0
- package/dist/expo/app/expo.js.map +1 -0
- package/dist/expo/app/expoGo.d.ts +4 -0
- package/dist/expo/app/expoGo.js +33 -0
- package/dist/expo/app/expoGo.js.map +1 -0
- package/dist/expo/app/expoPickers.d.ts +11 -0
- package/dist/expo/app/expoPickers.js +91 -0
- package/dist/expo/app/expoPickers.js.map +1 -0
- package/dist/expo/app/expoRandom.d.ts +6 -0
- package/dist/expo/app/expoRandom.js +21 -0
- package/dist/expo/app/expoRandom.js.map +1 -0
- package/dist/expo/app/idle.d.ts +4 -0
- package/dist/expo/app/idle.js +7 -0
- package/dist/expo/app/idle.js.map +1 -0
- package/dist/expo/app/index.d.ts +3 -0
- package/dist/expo/app/index.js +3 -0
- package/dist/expo/app/index.js.map +1 -0
- package/dist/expo/app/interactions.d.ts +38 -0
- package/dist/expo/app/interactions.js +40 -0
- package/dist/expo/app/interactions.js.map +1 -0
- package/dist/expo/app/markers.d.ts +28 -0
- package/dist/expo/app/markers.js +187 -0
- package/dist/expo/app/markers.js.map +1 -0
- package/dist/expo/app/movedAnchors.d.ts +46 -0
- package/dist/expo/app/movedAnchors.js +39 -0
- package/dist/expo/app/movedAnchors.js.map +1 -0
- package/dist/expo/app/native.d.ts +12 -0
- package/dist/expo/app/native.js +78 -0
- package/dist/expo/app/native.js.map +1 -0
- package/dist/expo/app/panel.d.ts +27 -0
- package/dist/expo/app/panel.js +37 -0
- package/dist/expo/app/panel.js.map +1 -0
- package/dist/expo/app/payload.d.ts +43 -0
- package/dist/expo/app/payload.js +22 -0
- package/dist/expo/app/payload.js.map +1 -0
- package/dist/expo/app/pick.d.ts +14 -0
- package/dist/expo/app/pick.js +124 -0
- package/dist/expo/app/pick.js.map +1 -0
- package/dist/expo/app/pickerNone.d.ts +1 -0
- package/dist/expo/app/pickerNone.js +2 -0
- package/dist/expo/app/pickerNone.js.map +1 -0
- package/dist/expo/app/placement.d.ts +53 -0
- package/dist/expo/app/placement.js +100 -0
- package/dist/expo/app/placement.js.map +1 -0
- package/dist/expo/app/random.d.ts +13 -0
- package/dist/expo/app/random.js +56 -0
- package/dist/expo/app/random.js.map +1 -0
- package/dist/expo/app/reactNative.d.ts +2 -0
- package/dist/expo/app/reactNative.js +3 -0
- package/dist/expo/app/reactNative.js.map +1 -0
- package/dist/expo/app/runtimeConfig.d.ts +30 -0
- package/dist/expo/app/runtimeConfig.js +104 -0
- package/dist/expo/app/runtimeConfig.js.map +1 -0
- package/dist/expo/app/sheetMotion.d.ts +22 -0
- package/dist/expo/app/sheetMotion.js +39 -0
- package/dist/expo/app/sheetMotion.js.map +1 -0
- package/dist/expo/app/signIn.d.ts +32 -0
- package/dist/expo/app/signIn.js +28 -0
- package/dist/expo/app/signIn.js.map +1 -0
- package/dist/expo/app/state.d.ts +45 -0
- package/dist/expo/app/state.js +32 -0
- package/dist/expo/app/state.js.map +1 -0
- package/dist/expo/app/theme.d.ts +15 -0
- package/dist/expo/app/theme.js +9 -0
- package/dist/expo/app/theme.js.map +1 -0
- package/dist/expo/app/types.d.ts +87 -0
- package/dist/expo/app/types.js +2 -0
- package/dist/expo/app/types.js.map +1 -0
- package/dist/expo/app/useCloudReviewer.d.ts +75 -0
- package/dist/expo/app/useCloudReviewer.js +211 -0
- package/dist/expo/app/useCloudReviewer.js.map +1 -0
- package/dist/expo/app/useComments.d.ts +64 -0
- package/dist/expo/app/useComments.js +156 -0
- package/dist/expo/app/useComments.js.map +1 -0
- package/dist/expo/app/useUploads.d.ts +32 -0
- package/dist/expo/app/useUploads.js +106 -0
- package/dist/expo/app/useUploads.js.map +1 -0
- package/dist/expo/expoGoMetro.cjs +83 -0
- package/dist/expo/expoMetro.cjs +86 -0
- package/dist/expo/metro.cjs +304 -0
- package/dist/expo/metroBuild.d.ts +22 -0
- package/dist/expo/metroBuild.js +169 -0
- package/dist/expo/metroBuild.js.map +1 -0
- package/dist/expo/middleware.d.ts +11 -0
- package/dist/expo/middleware.js +26 -0
- package/dist/expo/middleware.js.map +1 -0
- package/dist/expo/mode.d.ts +20 -0
- package/dist/expo/mode.js +37 -0
- package/dist/expo/mode.js.map +1 -0
- package/dist/expo/publicConfig.d.ts +37 -0
- package/dist/expo/publicConfig.js +87 -0
- package/dist/expo/publicConfig.js.map +1 -0
- package/dist/expo/transform.d.ts +22 -0
- package/dist/expo/transform.js +38 -0
- package/dist/expo/transform.js.map +1 -0
- package/dist/expo/transformer.cjs +73 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/integration/apiRoutes.d.ts +2 -0
- package/dist/integration/apiRoutes.js +3 -0
- package/dist/integration/apiRoutes.js.map +1 -0
- package/dist/integration/buildCredentials.d.ts +12 -0
- package/dist/integration/buildCredentials.js +97 -0
- package/dist/integration/buildCredentials.js.map +1 -0
- package/dist/integration/buildSession.d.ts +8 -0
- package/dist/integration/buildSession.js +96 -0
- package/dist/integration/buildSession.js.map +1 -0
- package/dist/integration/bundleCheck.d.ts +43 -0
- package/dist/integration/bundleCheck.js +111 -0
- package/dist/integration/bundleCheck.js.map +1 -0
- package/dist/integration/commentPull.d.ts +134 -0
- package/dist/integration/commentPull.js +260 -0
- package/dist/integration/commentPull.js.map +1 -0
- package/dist/integration/configuredApi.d.ts +7 -0
- package/dist/integration/configuredApi.js +24 -0
- package/dist/integration/configuredApi.js.map +1 -0
- package/dist/integration/devCloud.d.ts +27 -0
- package/dist/integration/devCloud.js +56 -0
- package/dist/integration/devCloud.js.map +1 -0
- package/dist/integration/devReviewLinks.d.ts +2 -0
- package/dist/integration/devReviewLinks.js +10 -0
- package/dist/integration/devReviewLinks.js.map +1 -0
- package/dist/integration/gitBranch.d.ts +19 -0
- package/dist/integration/gitBranch.js +56 -0
- package/dist/integration/gitBranch.js.map +1 -0
- package/dist/integration/importPlan.d.ts +19 -0
- package/dist/integration/importPlan.js +90 -0
- package/dist/integration/importPlan.js.map +1 -0
- package/dist/integration/index.d.ts +14 -0
- package/dist/integration/index.js +13 -0
- package/dist/integration/index.js.map +1 -0
- package/dist/integration/manifest.d.ts +120 -0
- package/dist/integration/manifest.js +147 -0
- package/dist/integration/manifest.js.map +1 -0
- package/dist/integration/manifestParts.d.ts +29 -0
- package/dist/integration/manifestParts.js +65 -0
- package/dist/integration/manifestParts.js.map +1 -0
- package/dist/integration/manifestSink.d.ts +75 -0
- package/dist/integration/manifestSink.js +157 -0
- package/dist/integration/manifestSink.js.map +1 -0
- package/dist/integration/manifestUpload.d.ts +64 -0
- package/dist/integration/manifestUpload.js +177 -0
- package/dist/integration/manifestUpload.js.map +1 -0
- package/dist/integration/middleware.d.ts +55 -0
- package/dist/integration/middleware.js +379 -0
- package/dist/integration/middleware.js.map +1 -0
- package/dist/integration/nextStyles.d.ts +4 -0
- package/dist/integration/nextStyles.js +121 -0
- package/dist/integration/nextStyles.js.map +1 -0
- package/dist/integration/requestGuards.d.ts +71 -0
- package/dist/integration/requestGuards.js +255 -0
- package/dist/integration/requestGuards.js.map +1 -0
- package/dist/integration/sharedBuild.d.ts +71 -0
- package/dist/integration/sharedBuild.js +105 -0
- package/dist/integration/sharedBuild.js.map +1 -0
- package/dist/integration/sharedInject.d.ts +88 -0
- package/dist/integration/sharedInject.js +164 -0
- package/dist/integration/sharedInject.js.map +1 -0
- package/dist/integration/sidecarProcess.d.ts +26 -0
- package/dist/integration/sidecarProcess.js +137 -0
- package/dist/integration/sidecarProcess.js.map +1 -0
- package/dist/integration/styleCollector.d.ts +49 -0
- package/dist/integration/styleCollector.js +220 -0
- package/dist/integration/styleCollector.js.map +1 -0
- package/dist/integration/transform.d.ts +24 -0
- package/dist/integration/transform.js +36 -0
- package/dist/integration/transform.js.map +1 -0
- package/dist/integration/tunnelClient.d.ts +44 -0
- package/dist/integration/tunnelClient.js +148 -0
- package/dist/integration/tunnelClient.js.map +1 -0
- package/dist/integration/tunnelProtocol.d.ts +152 -0
- package/dist/integration/tunnelProtocol.js +110 -0
- package/dist/integration/tunnelProtocol.js.map +1 -0
- package/dist/mcp/cli.d.ts +2 -0
- package/dist/mcp/cli.js +327 -0
- package/dist/mcp/cli.js.map +1 -0
- package/dist/mcp/cloudRefresh.d.ts +36 -0
- package/dist/mcp/cloudRefresh.js +52 -0
- package/dist/mcp/cloudRefresh.js.map +1 -0
- package/dist/mcp/context.d.ts +7 -0
- package/dist/mcp/context.js +18 -0
- package/dist/mcp/context.js.map +1 -0
- package/dist/mcp/files.d.ts +66 -0
- package/dist/mcp/files.js +157 -0
- package/dist/mcp/files.js.map +1 -0
- package/dist/mcp/search.d.ts +3 -0
- package/dist/mcp/search.js +9 -0
- package/dist/mcp/search.js.map +1 -0
- package/dist/mcp/server.d.ts +50 -0
- package/dist/mcp/server.js +555 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/overlay/anchors.d.ts +130 -0
- package/dist/overlay/anchors.js +365 -0
- package/dist/overlay/anchors.js.map +1 -0
- package/dist/overlay/api.d.ts +150 -0
- package/dist/overlay/api.js +259 -0
- package/dist/overlay/api.js.map +1 -0
- package/dist/overlay/attachments.d.ts +60 -0
- package/dist/overlay/attachments.js +163 -0
- package/dist/overlay/attachments.js.map +1 -0
- package/dist/overlay/browser.d.ts +1 -0
- package/dist/overlay/browser.js +203 -0
- package/dist/overlay/browser.js.map +1 -0
- package/dist/overlay/chip.d.ts +27 -0
- package/dist/overlay/chip.js +31 -0
- package/dist/overlay/chip.js.map +1 -0
- package/dist/overlay/compact.d.ts +11 -0
- package/dist/overlay/compact.js +21 -0
- package/dist/overlay/compact.js.map +1 -0
- package/dist/overlay/cssScope.d.ts +46 -0
- package/dist/overlay/cssScope.js +180 -0
- package/dist/overlay/cssScope.js.map +1 -0
- package/dist/overlay/cursor.d.ts +2 -0
- package/dist/overlay/cursor.js +68 -0
- package/dist/overlay/cursor.js.map +1 -0
- package/dist/overlay/devBrowser.d.ts +1 -0
- package/dist/overlay/devBrowser.js +18 -0
- package/dist/overlay/devBrowser.js.map +1 -0
- package/dist/overlay/devReview.d.ts +4 -0
- package/dist/overlay/devReview.js +18 -0
- package/dist/overlay/devReview.js.map +1 -0
- package/dist/overlay/directReviewer.d.ts +149 -0
- package/dist/overlay/directReviewer.js +448 -0
- package/dist/overlay/directReviewer.js.map +1 -0
- package/dist/overlay/elementDescription.d.ts +10 -0
- package/dist/overlay/elementDescription.js +251 -0
- package/dist/overlay/elementDescription.js.map +1 -0
- package/dist/overlay/icons.d.ts +8 -0
- package/dist/overlay/icons.js +36 -0
- package/dist/overlay/icons.js.map +1 -0
- package/dist/overlay/identity.d.ts +48 -0
- package/dist/overlay/identity.js +125 -0
- package/dist/overlay/identity.js.map +1 -0
- package/dist/overlay/localMachine.d.ts +23 -0
- package/dist/overlay/localMachine.js +40 -0
- package/dist/overlay/localMachine.js.map +1 -0
- package/dist/overlay/magicLink.d.ts +10 -0
- package/dist/overlay/magicLink.js +87 -0
- package/dist/overlay/magicLink.js.map +1 -0
- package/dist/overlay/modern-screenshot.js +1676 -0
- package/dist/overlay/movedAnchors.d.ts +30 -0
- package/dist/overlay/movedAnchors.js +128 -0
- package/dist/overlay/movedAnchors.js.map +1 -0
- package/dist/overlay/notificationGroups.d.ts +2 -0
- package/dist/overlay/notificationGroups.js +41 -0
- package/dist/overlay/notificationGroups.js.map +1 -0
- package/dist/overlay/permissions.d.ts +10 -0
- package/dist/overlay/permissions.js +9 -0
- package/dist/overlay/permissions.js.map +1 -0
- package/dist/overlay/pinGroups.d.ts +16 -0
- package/dist/overlay/pinGroups.js +17 -0
- package/dist/overlay/pinGroups.js.map +1 -0
- package/dist/overlay/presence.d.ts +50 -0
- package/dist/overlay/presence.js +258 -0
- package/dist/overlay/presence.js.map +1 -0
- package/dist/overlay/projectChannel.d.ts +11 -0
- package/dist/overlay/projectChannel.js +111 -0
- package/dist/overlay/projectChannel.js.map +1 -0
- package/dist/overlay/recorder.d.ts +56 -0
- package/dist/overlay/recorder.js +130 -0
- package/dist/overlay/recorder.js.map +1 -0
- package/dist/overlay/reviewMode.d.ts +21 -0
- package/dist/overlay/reviewMode.js +59 -0
- package/dist/overlay/reviewMode.js.map +1 -0
- package/dist/overlay/reviewerAuth.d.ts +131 -0
- package/dist/overlay/reviewerAuth.js +279 -0
- package/dist/overlay/reviewerAuth.js.map +1 -0
- package/dist/overlay/route.d.ts +18 -0
- package/dist/overlay/route.js +56 -0
- package/dist/overlay/route.js.map +1 -0
- package/dist/overlay/rrweb-record.js +63 -0
- package/dist/overlay/runtime.d.ts +1 -0
- package/dist/overlay/runtime.js +4857 -0
- package/dist/overlay/runtime.js.map +1 -0
- package/dist/overlay/session.d.ts +32 -0
- package/dist/overlay/session.js +76 -0
- package/dist/overlay/session.js.map +1 -0
- package/dist/overlay/sharedMode.d.ts +38 -0
- package/dist/overlay/sharedMode.js +37 -0
- package/dist/overlay/sharedMode.js.map +1 -0
- package/dist/overlay/sheet.d.ts +73 -0
- package/dist/overlay/sheet.js +278 -0
- package/dist/overlay/sheet.js.map +1 -0
- package/dist/overlay/snapshot.d.ts +26 -0
- package/dist/overlay/snapshot.js +185 -0
- package/dist/overlay/snapshot.js.map +1 -0
- package/dist/overlay/state.d.ts +63 -0
- package/dist/overlay/state.js +241 -0
- package/dist/overlay/state.js.map +1 -0
- package/dist/overlay/steps.d.ts +22 -0
- package/dist/overlay/steps.js +34 -0
- package/dist/overlay/steps.js.map +1 -0
- package/dist/overlay/styles.d.ts +7 -0
- package/dist/overlay/styles.js +1449 -0
- package/dist/overlay/styles.js.map +1 -0
- package/dist/overlay/trace.d.ts +19 -0
- package/dist/overlay/trace.js +29 -0
- package/dist/overlay/trace.js.map +1 -0
- package/dist/overlay/upload.d.ts +35 -0
- package/dist/overlay/upload.js +99 -0
- package/dist/overlay/upload.js.map +1 -0
- package/dist/plugin/astro.d.ts +31 -0
- package/dist/plugin/astro.js +22 -0
- package/dist/plugin/astro.js.map +1 -0
- package/dist/plugin/eleventy.d.ts +44 -0
- package/dist/plugin/eleventy.js +186 -0
- package/dist/plugin/eleventy.js.map +1 -0
- package/dist/plugin/next-loader.cjs +11 -0
- package/dist/plugin/next.d.ts +29 -0
- package/dist/plugin/next.js +176 -0
- package/dist/plugin/next.js.map +1 -0
- package/dist/plugin/nextOverlay.d.ts +2 -0
- package/dist/plugin/nextOverlay.js +22 -0
- package/dist/plugin/nextOverlay.js.map +1 -0
- package/dist/plugin/nextTransform.d.ts +19 -0
- package/dist/plugin/nextTransform.js +29 -0
- package/dist/plugin/nextTransform.js.map +1 -0
- package/dist/plugin/rsbuild.d.ts +25 -0
- package/dist/plugin/rsbuild.js +56 -0
- package/dist/plugin/rsbuild.js.map +1 -0
- package/dist/plugin/vite.d.ts +39 -0
- package/dist/plugin/vite.js +582 -0
- package/dist/plugin/vite.js.map +1 -0
- package/dist/plugin/webpack.d.ts +69 -0
- package/dist/plugin/webpack.js +192 -0
- package/dist/plugin/webpack.js.map +1 -0
- package/dist/remote/account.d.ts +41 -0
- package/dist/remote/account.js +177 -0
- package/dist/remote/account.js.map +1 -0
- package/dist/remote/base64url.d.ts +14 -0
- package/dist/remote/base64url.js +71 -0
- package/dist/remote/base64url.js.map +1 -0
- package/dist/remote/branchLabel.d.ts +12 -0
- package/dist/remote/branchLabel.js +20 -0
- package/dist/remote/branchLabel.js.map +1 -0
- package/dist/remote/client.d.ts +340 -0
- package/dist/remote/client.js +424 -0
- package/dist/remote/client.js.map +1 -0
- package/dist/remote/cloudApi.d.ts +72 -0
- package/dist/remote/cloudApi.js +72 -0
- package/dist/remote/cloudApi.js.map +1 -0
- package/dist/remote/codec.d.ts +54 -0
- package/dist/remote/codec.js +62 -0
- package/dist/remote/codec.js.map +1 -0
- package/dist/remote/config.d.ts +30 -0
- package/dist/remote/config.js +112 -0
- package/dist/remote/config.js.map +1 -0
- package/dist/remote/content-schema.d.ts +428 -0
- package/dist/remote/content-schema.js +209 -0
- package/dist/remote/content-schema.js.map +1 -0
- package/dist/remote/content.d.ts +44 -0
- package/dist/remote/content.js +75 -0
- package/dist/remote/content.js.map +1 -0
- package/dist/remote/envelope.d.ts +76 -0
- package/dist/remote/envelope.js +109 -0
- package/dist/remote/envelope.js.map +1 -0
- package/dist/remote/errors.d.ts +55 -0
- package/dist/remote/errors.js +63 -0
- package/dist/remote/errors.js.map +1 -0
- package/dist/remote/ids.d.ts +8 -0
- package/dist/remote/ids.js +25 -0
- package/dist/remote/ids.js.map +1 -0
- package/dist/remote/index.d.ts +7 -0
- package/dist/remote/index.js +8 -0
- package/dist/remote/index.js.map +1 -0
- package/dist/remote/keys.d.ts +62 -0
- package/dist/remote/keys.js +162 -0
- package/dist/remote/keys.js.map +1 -0
- package/dist/remote/localAnchors.d.ts +4 -0
- package/dist/remote/localAnchors.js +23 -0
- package/dist/remote/localAnchors.js.map +1 -0
- package/dist/remote/mapping.d.ts +11 -0
- package/dist/remote/mapping.js +22 -0
- package/dist/remote/mapping.js.map +1 -0
- package/dist/remote/presence.d.ts +63 -0
- package/dist/remote/presence.js +143 -0
- package/dist/remote/presence.js.map +1 -0
- package/dist/remote/realtime.d.ts +142 -0
- package/dist/remote/realtime.js +326 -0
- package/dist/remote/realtime.js.map +1 -0
- package/dist/remote/store.d.ts +183 -0
- package/dist/remote/store.js +907 -0
- package/dist/remote/store.js.map +1 -0
- package/dist/remote/sync.d.ts +113 -0
- package/dist/remote/sync.js +370 -0
- package/dist/remote/sync.js.map +1 -0
- package/dist/remote/types.d.ts +99 -0
- package/dist/remote/types.js +6 -0
- package/dist/remote/types.js.map +1 -0
- package/dist/setup/agents.d.ts +23 -0
- package/dist/setup/agents.js +80 -0
- package/dist/setup/agents.js.map +1 -0
- package/dist/setup/configure.d.ts +27 -0
- package/dist/setup/configure.js +201 -0
- package/dist/setup/configure.js.map +1 -0
- package/dist/setup/connect.d.ts +60 -0
- package/dist/setup/connect.js +244 -0
- package/dist/setup/connect.js.map +1 -0
- package/dist/setup/detect.d.ts +67 -0
- package/dist/setup/detect.js +168 -0
- package/dist/setup/detect.js.map +1 -0
- package/dist/setup/frameworks.d.ts +41 -0
- package/dist/setup/frameworks.js +81 -0
- package/dist/setup/frameworks.js.map +1 -0
- package/dist/sidecar/cli.d.ts +1 -0
- package/dist/sidecar/cli.js +70 -0
- package/dist/sidecar/cli.js.map +1 -0
- package/dist/sidecar/cloudSync.d.ts +33 -0
- package/dist/sidecar/cloudSync.js +139 -0
- package/dist/sidecar/cloudSync.js.map +1 -0
- package/dist/sidecar/commentFiles.d.ts +59 -0
- package/dist/sidecar/commentFiles.js +217 -0
- package/dist/sidecar/commentFiles.js.map +1 -0
- package/dist/sidecar/cssAttribution.d.ts +26 -0
- package/dist/sidecar/cssAttribution.js +114 -0
- package/dist/sidecar/cssAttribution.js.map +1 -0
- package/dist/sidecar/exportTasks.d.ts +38 -0
- package/dist/sidecar/exportTasks.js +249 -0
- package/dist/sidecar/exportTasks.js.map +1 -0
- package/dist/sidecar/http.d.ts +20 -0
- package/dist/sidecar/http.js +904 -0
- package/dist/sidecar/http.js.map +1 -0
- package/dist/sidecar/inviteTarget.d.ts +4 -0
- package/dist/sidecar/inviteTarget.js +32 -0
- package/dist/sidecar/inviteTarget.js.map +1 -0
- package/dist/sidecar/presence.d.ts +4 -0
- package/dist/sidecar/presence.js +92 -0
- package/dist/sidecar/presence.js.map +1 -0
- package/dist/storage/cliSession.d.ts +8 -0
- package/dist/storage/cliSession.js +41 -0
- package/dist/storage/cliSession.js.map +1 -0
- package/dist/storage/devStyleMap.d.ts +12 -0
- package/dist/storage/devStyleMap.js +31 -0
- package/dist/storage/devStyleMap.js.map +1 -0
- package/dist/storage/fileCache.d.ts +34 -0
- package/dist/storage/fileCache.js +122 -0
- package/dist/storage/fileCache.js.map +1 -0
- package/dist/storage/localAttachments.d.ts +82 -0
- package/dist/storage/localAttachments.js +276 -0
- package/dist/storage/localAttachments.js.map +1 -0
- package/dist/storage/localComments.d.ts +31 -0
- package/dist/storage/localComments.js +159 -0
- package/dist/storage/localComments.js.map +1 -0
- package/dist/storage/localCredentials.d.ts +74 -0
- package/dist/storage/localCredentials.js +210 -0
- package/dist/storage/localCredentials.js.map +1 -0
- package/dist/storage/localParticipants.d.ts +33 -0
- package/dist/storage/localParticipants.js +110 -0
- package/dist/storage/localParticipants.js.map +1 -0
- package/dist/storage/localRecipe.d.ts +22 -0
- package/dist/storage/localRecipe.js +46 -0
- package/dist/storage/localRecipe.js.map +1 -0
- package/dist/storage/localScreenshots.d.ts +23 -0
- package/dist/storage/localScreenshots.js +55 -0
- package/dist/storage/localScreenshots.js.map +1 -0
- package/dist/storage/localSource.d.ts +31 -0
- package/dist/storage/localSource.js +175 -0
- package/dist/storage/localSource.js.map +1 -0
- package/dist/storage/pulledComments.d.ts +81 -0
- package/dist/storage/pulledComments.js +107 -0
- package/dist/storage/pulledComments.js.map +1 -0
- package/dist/storage/remoteRecipe.d.ts +7 -0
- package/dist/storage/remoteRecipe.js +85 -0
- package/dist/storage/remoteRecipe.js.map +1 -0
- package/dist/storage/savedRemote.d.ts +2 -0
- package/dist/storage/savedRemote.js +22 -0
- package/dist/storage/savedRemote.js.map +1 -0
- package/dist/storage/sidecarAccess.d.ts +7 -0
- package/dist/storage/sidecarAccess.js +68 -0
- package/dist/storage/sidecarAccess.js.map +1 -0
- package/package.json +308 -4
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import type { Anchor } from '../core/feedbackTypes.js';
|
|
2
|
+
export declare const anchorAttribute = "data-fb-src";
|
|
3
|
+
export declare const componentAttribute = "data-fb-component";
|
|
4
|
+
/**
|
|
5
|
+
* What a shared build stamps instead. One overlay serves both modes: it reads whichever
|
|
6
|
+
* attribute is on the page rather than being told which mode it is in, so there is no
|
|
7
|
+
* configuration to get wrong and no way for the two to disagree.
|
|
8
|
+
*/
|
|
9
|
+
export declare const idAttribute = "data-fb-id";
|
|
10
|
+
/** Either attribute, for the selectors that need to find anchored elements. */
|
|
11
|
+
export declare const anchoredSelector = "[data-fb-src],[data-fb-id]";
|
|
12
|
+
/**
|
|
13
|
+
* What identifies this element's source, in whichever form the page carries.
|
|
14
|
+
*
|
|
15
|
+
* Every "how many of these are on the page" question goes through this rather than reading
|
|
16
|
+
* the attribute directly, so counting works the same in both modes. Reading `data-fb-src`
|
|
17
|
+
* directly would silently count one in a shared build, and the scope question - which is
|
|
18
|
+
* entirely built on those counts - would stop being asked at all.
|
|
19
|
+
*/
|
|
20
|
+
export declare function anchorKeyOf(element: Element): {
|
|
21
|
+
attribute: string;
|
|
22
|
+
value: string;
|
|
23
|
+
} | null;
|
|
24
|
+
export type AnchorCandidate = {
|
|
25
|
+
element: HTMLElement;
|
|
26
|
+
anchor: Anchor;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Walks from the clicked node up to the root, collecting every anchored ancestor.
|
|
30
|
+
* Index 0 is the clicked leaf; higher indices are progressively broader components.
|
|
31
|
+
* SPEC 7.4: the leaf is usually not what the reviewer means, so the whole chain is offered.
|
|
32
|
+
*/
|
|
33
|
+
export declare function anchorCandidatesFor(start: Element): AnchorCandidate[];
|
|
34
|
+
/** An element with no anchor: no id, no file, found again by its description alone. */
|
|
35
|
+
export declare function plainAnchorFor(element: HTMLElement): Anchor;
|
|
36
|
+
export declare function anchorForElement(element: HTMLElement): Anchor | null;
|
|
37
|
+
/**
|
|
38
|
+
* Re-locates the element a stored anchor points at, after a reload or a code change.
|
|
39
|
+
*
|
|
40
|
+
* A source anchor identifies a piece of *code*, not a rendered instance: one `PricingCard`
|
|
41
|
+
* in the source becomes three cards on the page, all carrying the same `data-fb-src`.
|
|
42
|
+
* Picking the first match would drop the pin on the wrong card, so the recorded DOM path
|
|
43
|
+
* is tried first to pin down which instance was commented on, with the source anchor and
|
|
44
|
+
* the captured text as fallbacks for when the DOM has shifted.
|
|
45
|
+
*/
|
|
46
|
+
export declare function locateAnchor(anchor: Anchor, context?: AnchorContext): HTMLElement | null;
|
|
47
|
+
/**
|
|
48
|
+
* What else a comment recorded about where its element sat: its anchored ancestors, innermost
|
|
49
|
+
* first, and how many elements carried each one when it was left.
|
|
50
|
+
*/
|
|
51
|
+
export type AnchorContext = {
|
|
52
|
+
chain?: Anchor[] | null;
|
|
53
|
+
chainInstances?: number[] | null;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Every element carrying this anchor, in document order: several when it is rendered in a loop.
|
|
57
|
+
* Anchors can come from a peer, so a value that makes an invalid selector is an anchor that is
|
|
58
|
+
* not on this page, never an exception.
|
|
59
|
+
*/
|
|
60
|
+
export declare function anchorMatches(anchor: Pick<Anchor, 'id' | 'file' | 'line' | 'column'>): HTMLElement[];
|
|
61
|
+
export declare function componentNameFor(element: HTMLElement): string | null;
|
|
62
|
+
export declare function anchorLabel(anchor: Anchor): string;
|
|
63
|
+
export type SelectionScope = {
|
|
64
|
+
/** Elements on the page carrying this same source position, at the moment of the click. */
|
|
65
|
+
instancesOnPage: number;
|
|
66
|
+
/**
|
|
67
|
+
* How many elements carry each position in the chain, innermost first.
|
|
68
|
+
*
|
|
69
|
+
* This is what turns the task doc from a description into a location. When some ancestor
|
|
70
|
+
* renders exactly once, that ancestor is the call site, and an agent can be told where to
|
|
71
|
+
* make the change rather than warned that the anchor is shared. Computing it is the same
|
|
72
|
+
* walk as the counts above, so it costs one pass.
|
|
73
|
+
*/
|
|
74
|
+
chainInstances: number[];
|
|
75
|
+
/** What the reviewer said the comment covers. Absent when the question was not asked. */
|
|
76
|
+
choice?: 'one' | 'all';
|
|
77
|
+
/**
|
|
78
|
+
* Elements whose entire anchor chain is identical to this one's.
|
|
79
|
+
*
|
|
80
|
+
* More than one means no source position can single this element out: three cards from
|
|
81
|
+
* a `.map` share every position in their chains. The change such a reviewer wants is
|
|
82
|
+
* usually a conditional prop or a data edit, not a change to the JSX.
|
|
83
|
+
*/
|
|
84
|
+
siblingsSharingChain: number;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* How much of the page the chosen anchor actually covers.
|
|
88
|
+
*
|
|
89
|
+
* This cannot be answered from the build. One source position renders N times — a `.map`
|
|
90
|
+
* over an array is one position and forty elements — and the transform only ever sees
|
|
91
|
+
* source text. The count exists at runtime and nowhere else, so it is taken here, at the
|
|
92
|
+
* moment of the click, and travels with the comment.
|
|
93
|
+
*/
|
|
94
|
+
export declare function instancesOf(element: Element): number;
|
|
95
|
+
/** Every element rendered from the same source position as this one, including it. */
|
|
96
|
+
export declare function siblingInstances(element: HTMLElement): HTMLElement[];
|
|
97
|
+
export declare function scopeFor(element: HTMLElement, chain?: HTMLElement[]): SelectionScope;
|
|
98
|
+
/**
|
|
99
|
+
* Source files rendering inside the selected element, read from its subtree.
|
|
100
|
+
*
|
|
101
|
+
* Taken at click time from the DOM rather than derived from the chain, because the chain
|
|
102
|
+
* only records what the reviewer walked *through*. 79% of measured comments never widen at
|
|
103
|
+
* all, so a chain-derived list is empty for the common case — a direct click on a
|
|
104
|
+
* container — which is precisely the case that needs it. Reading the subtree does not care
|
|
105
|
+
* how the reviewer got there.
|
|
106
|
+
*/
|
|
107
|
+
/**
|
|
108
|
+
* What the selection renders, read from its subtree.
|
|
109
|
+
*
|
|
110
|
+
* Returns file paths on a local page and anchor ids on a shared one, because an id is all
|
|
111
|
+
* the browser has and a path cannot be derived from it there. Both are resolved to paths at
|
|
112
|
+
* export, on the machine that can. Callers must not assume these strings are paths.
|
|
113
|
+
*/
|
|
114
|
+
export declare function filesInsideSelection(element: HTMLElement): string[];
|
|
115
|
+
/**
|
|
116
|
+
* Whether a comment belongs on the page being shown.
|
|
117
|
+
*
|
|
118
|
+
* The page it was left on, as a rule: a shared component like a page header renders different
|
|
119
|
+
* content on every page, so a comment about the header on /catalogue must not appear on
|
|
120
|
+
* /facturation. The exception is anything inside a dialog. A dialog is the same wherever it is
|
|
121
|
+
* opened from - a "new case" dialog can be opened from three pages - and a comment left on it
|
|
122
|
+
* from one of them is about the dialog, not about the page behind it. So a comment whose element
|
|
123
|
+
* is on screen inside a dialog belongs here, whatever page it was written on.
|
|
124
|
+
*/
|
|
125
|
+
export declare function belongsOnThisPage(comment: {
|
|
126
|
+
context?: {
|
|
127
|
+
route?: string;
|
|
128
|
+
} | null;
|
|
129
|
+
anchor: Anchor;
|
|
130
|
+
}): boolean;
|
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
import { locateDescribed, summarizeDescription } from './elementDescription.js';
|
|
2
|
+
export const anchorAttribute = 'data-fb-src';
|
|
3
|
+
export const componentAttribute = 'data-fb-component';
|
|
4
|
+
/**
|
|
5
|
+
* What a shared build stamps instead. One overlay serves both modes: it reads whichever
|
|
6
|
+
* attribute is on the page rather than being told which mode it is in, so there is no
|
|
7
|
+
* configuration to get wrong and no way for the two to disagree.
|
|
8
|
+
*/
|
|
9
|
+
export const idAttribute = 'data-fb-id';
|
|
10
|
+
/** Either attribute, for the selectors that need to find anchored elements. */
|
|
11
|
+
export const anchoredSelector = `[${anchorAttribute}],[${idAttribute}]`;
|
|
12
|
+
/**
|
|
13
|
+
* What identifies this element's source, in whichever form the page carries.
|
|
14
|
+
*
|
|
15
|
+
* Every "how many of these are on the page" question goes through this rather than reading
|
|
16
|
+
* the attribute directly, so counting works the same in both modes. Reading `data-fb-src`
|
|
17
|
+
* directly would silently count one in a shared build, and the scope question - which is
|
|
18
|
+
* entirely built on those counts - would stop being asked at all.
|
|
19
|
+
*/
|
|
20
|
+
export function anchorKeyOf(element) {
|
|
21
|
+
const source = element.getAttribute(anchorAttribute);
|
|
22
|
+
if (source) {
|
|
23
|
+
return { attribute: anchorAttribute, value: source };
|
|
24
|
+
}
|
|
25
|
+
const id = element.getAttribute(idAttribute);
|
|
26
|
+
return id ? { attribute: idAttribute, value: id } : null;
|
|
27
|
+
}
|
|
28
|
+
function sameSourceSelector(key) {
|
|
29
|
+
return `[${key.attribute}="${cssEscape(key.value)}"]`;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Walks from the clicked node up to the root, collecting every anchored ancestor.
|
|
33
|
+
* Index 0 is the clicked leaf; higher indices are progressively broader components.
|
|
34
|
+
* SPEC 7.4: the leaf is usually not what the reviewer means, so the whole chain is offered.
|
|
35
|
+
*/
|
|
36
|
+
export function anchorCandidatesFor(start) {
|
|
37
|
+
const candidates = [];
|
|
38
|
+
let current = start;
|
|
39
|
+
while (current && current !== document.documentElement) {
|
|
40
|
+
if (current instanceof HTMLElement) {
|
|
41
|
+
const anchor = anchorForElement(current);
|
|
42
|
+
if (anchor) {
|
|
43
|
+
candidates.push({ element: current, anchor });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
current = current.parentElement;
|
|
47
|
+
}
|
|
48
|
+
if (candidates.length > 0)
|
|
49
|
+
return candidates;
|
|
50
|
+
/*
|
|
51
|
+
* Nothing on the way up carries an anchor: a site installed with only a script tag, or an element
|
|
52
|
+
* a package rendered outside anything the build stamped. It used to end here, and the click went
|
|
53
|
+
* through to the page as if the widget were not there - on a site with no anchors, nothing could
|
|
54
|
+
* be commented on at all. The element and its ancestors are offered instead, plain, so the reviewer
|
|
55
|
+
* can still widen to what they meant; each is described when the comment is saved.
|
|
56
|
+
*/
|
|
57
|
+
current = start;
|
|
58
|
+
while (current && current !== document.body && current !== document.documentElement && candidates.length < 8) {
|
|
59
|
+
if (current instanceof HTMLElement)
|
|
60
|
+
candidates.push({ element: current, anchor: plainAnchorFor(current) });
|
|
61
|
+
current = current.parentElement;
|
|
62
|
+
}
|
|
63
|
+
return candidates;
|
|
64
|
+
}
|
|
65
|
+
/** An element with no anchor: no id, no file, found again by its description alone. */
|
|
66
|
+
export function plainAnchorFor(element) {
|
|
67
|
+
return {
|
|
68
|
+
id: null,
|
|
69
|
+
file: '',
|
|
70
|
+
line: 0,
|
|
71
|
+
column: 0,
|
|
72
|
+
componentName: null,
|
|
73
|
+
domPath: domPathFor(element),
|
|
74
|
+
textSnippet: textSnippetFor(element),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
export function anchorForElement(element) {
|
|
78
|
+
const raw = element.getAttribute(anchorAttribute);
|
|
79
|
+
if (!raw) {
|
|
80
|
+
// Shared build: an id and nothing else. The location is filled in on the developer's
|
|
81
|
+
// machine at export, and is deliberately not guessable from here.
|
|
82
|
+
const id = element.getAttribute(idAttribute);
|
|
83
|
+
if (!id) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
id,
|
|
88
|
+
file: '',
|
|
89
|
+
line: 0,
|
|
90
|
+
column: 0,
|
|
91
|
+
componentName: null,
|
|
92
|
+
domPath: domPathFor(element),
|
|
93
|
+
textSnippet: textSnippetFor(element),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
const match = /^(.*):(\d+):(\d+)$/.exec(raw);
|
|
97
|
+
if (!match) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
file: match[1],
|
|
102
|
+
line: Number(match[2]),
|
|
103
|
+
column: Number(match[3]),
|
|
104
|
+
componentName: componentNameFor(element),
|
|
105
|
+
domPath: domPathFor(element),
|
|
106
|
+
textSnippet: textSnippetFor(element),
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Re-locates the element a stored anchor points at, after a reload or a code change.
|
|
111
|
+
*
|
|
112
|
+
* A source anchor identifies a piece of *code*, not a rendered instance: one `PricingCard`
|
|
113
|
+
* in the source becomes three cards on the page, all carrying the same `data-fb-src`.
|
|
114
|
+
* Picking the first match would drop the pin on the wrong card, so the recorded DOM path
|
|
115
|
+
* is tried first to pin down which instance was commented on, with the source anchor and
|
|
116
|
+
* the captured text as fallbacks for when the DOM has shifted.
|
|
117
|
+
*/
|
|
118
|
+
export function locateAnchor(anchor, context = {}) {
|
|
119
|
+
// Anchors come from stored content any reviewer can write: a selector that does not parse is
|
|
120
|
+
// an anchor that is not on this page, never an exception out of render.
|
|
121
|
+
try {
|
|
122
|
+
return locateStoredAnchor(anchor, context);
|
|
123
|
+
}
|
|
124
|
+
catch {
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function locateStoredAnchor(anchor, context) {
|
|
129
|
+
// No anchor at all, only what the element looked like: found by description, which is built to
|
|
130
|
+
// survive a different window size where the tag-and-index path is not.
|
|
131
|
+
if (!anchor.id && !anchor.file) {
|
|
132
|
+
return locateDescribed(anchor.element) ?? (anchor.element ? null : queryPath(anchor.domPath));
|
|
133
|
+
}
|
|
134
|
+
// An id matches exactly, which is the one way shared mode is easier than local: there is
|
|
135
|
+
// no path to normalise and no chance of two spellings of the same file.
|
|
136
|
+
const matches = anchorMatches(anchor);
|
|
137
|
+
if (matches.length === 1) {
|
|
138
|
+
return matches[0];
|
|
139
|
+
}
|
|
140
|
+
// Several instances of the same component, or none. The DOM path disambiguates: every element
|
|
141
|
+
// it reaches, since a path cut short is a descendant selector and can reach more than one.
|
|
142
|
+
const byPath = queryPathAll(anchor.domPath);
|
|
143
|
+
if (matches.length === 0) {
|
|
144
|
+
// The anchor is gone from this page - a later build, a different route's markup. Where it was,
|
|
145
|
+
// or what the element looked like, may still find it.
|
|
146
|
+
return byPath[0] ?? locateDescribed(anchor.element);
|
|
147
|
+
}
|
|
148
|
+
const onPath = byPath.filter((element) => matches.includes(element));
|
|
149
|
+
if (onPath.length === 1) {
|
|
150
|
+
return onPath[0];
|
|
151
|
+
}
|
|
152
|
+
// The path reaches none of them (a comment stored with a broken one) or several. An ancestor the
|
|
153
|
+
// page rendered once when the comment was left is where this copy is called from.
|
|
154
|
+
const byCallSite = insideCallSite(matches, context);
|
|
155
|
+
if (byCallSite) {
|
|
156
|
+
return byCallSite;
|
|
157
|
+
}
|
|
158
|
+
const candidates = onPath.length > 0 ? onPath : matches;
|
|
159
|
+
if (anchor.textSnippet) {
|
|
160
|
+
const byText = candidates.find((element) => element.textContent?.replace(/\s+/g, ' ').trim().slice(0, 120) === anchor.textSnippet);
|
|
161
|
+
if (byText) {
|
|
162
|
+
return byText;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return candidates[0];
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* The one match that sits in, or around, an ancestor the comment's chain says rendered once.
|
|
169
|
+
*
|
|
170
|
+
* Innermost first: the nearest such ancestor is the copy's own call site (the hero form's wrapper,
|
|
171
|
+
* not the page's `main`, which holds every copy and so says nothing).
|
|
172
|
+
*/
|
|
173
|
+
function insideCallSite(matches, { chain, chainInstances }) {
|
|
174
|
+
if (!chain || !chainInstances)
|
|
175
|
+
return null;
|
|
176
|
+
for (let index = 0; index < chain.length; index++) {
|
|
177
|
+
const entry = chain[index];
|
|
178
|
+
if (chainInstances[index] !== 1 || !entry || (!entry.id && !entry.file))
|
|
179
|
+
continue;
|
|
180
|
+
const found = anchorMatches(entry);
|
|
181
|
+
if (found.length !== 1)
|
|
182
|
+
continue;
|
|
183
|
+
const related = matches.filter((match) => found[0].contains(match) || match.contains(found[0]));
|
|
184
|
+
if (related.length === 1)
|
|
185
|
+
return related[0];
|
|
186
|
+
}
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Every element carrying this anchor, in document order: several when it is rendered in a loop.
|
|
191
|
+
* Anchors can come from a peer, so a value that makes an invalid selector is an anchor that is
|
|
192
|
+
* not on this page, never an exception.
|
|
193
|
+
*/
|
|
194
|
+
export function anchorMatches(anchor) {
|
|
195
|
+
const selector = anchor.id
|
|
196
|
+
? `[${idAttribute}="${cssEscape(anchor.id)}"]`
|
|
197
|
+
: `[${anchorAttribute}="${cssEscape(`${anchor.file}:${anchor.line}:${anchor.column}`)}"]`;
|
|
198
|
+
try {
|
|
199
|
+
return Array.from(document.querySelectorAll(selector));
|
|
200
|
+
}
|
|
201
|
+
catch {
|
|
202
|
+
return [];
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
function queryPath(domPath) {
|
|
206
|
+
return queryPathAll(domPath)[0] ?? null;
|
|
207
|
+
}
|
|
208
|
+
function queryPathAll(domPath) {
|
|
209
|
+
if (!domPath)
|
|
210
|
+
return [];
|
|
211
|
+
try {
|
|
212
|
+
return Array.from(document.querySelectorAll(domPath));
|
|
213
|
+
}
|
|
214
|
+
catch {
|
|
215
|
+
return [];
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
export function componentNameFor(element) {
|
|
219
|
+
const explicit = element.getAttribute(componentAttribute);
|
|
220
|
+
if (explicit) {
|
|
221
|
+
return explicit;
|
|
222
|
+
}
|
|
223
|
+
const source = element.getAttribute(anchorAttribute);
|
|
224
|
+
if (!source) {
|
|
225
|
+
return null;
|
|
226
|
+
}
|
|
227
|
+
const filename = source.split(':')[0]?.split('/').pop() ?? null;
|
|
228
|
+
return filename ? filename.replace(/\.[jt]sx?$/, '') : null;
|
|
229
|
+
}
|
|
230
|
+
export function anchorLabel(anchor) {
|
|
231
|
+
if (!anchor.file)
|
|
232
|
+
return summarizeDescription(anchor.element);
|
|
233
|
+
const file = anchor.file.split('/').pop() ?? anchor.file;
|
|
234
|
+
return `${anchor.componentName ?? 'element'} · ${file}:${anchor.line}`;
|
|
235
|
+
}
|
|
236
|
+
function textSnippetFor(element) {
|
|
237
|
+
const text = element.textContent?.replace(/\s+/g, ' ').trim() ?? '';
|
|
238
|
+
return text ? text.slice(0, 120) : null;
|
|
239
|
+
}
|
|
240
|
+
// Deep enough to reach the body on real pages (anchored chains have been measured 17 deep, with
|
|
241
|
+
// plain elements between them), and short enough for what the API keeps: 1024 characters for a
|
|
242
|
+
// cursor's path, 2000 for a comment's.
|
|
243
|
+
const maxPathSegments = 32;
|
|
244
|
+
const maxPathCharacters = 900;
|
|
245
|
+
function domPathFor(element) {
|
|
246
|
+
const segments = [];
|
|
247
|
+
let length = 0;
|
|
248
|
+
let current = element;
|
|
249
|
+
while (current && current !== document.body) {
|
|
250
|
+
const parent = current.parentElement;
|
|
251
|
+
if (!parent) {
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
const siblings = Array.from(parent.children).filter((child) => child.tagName === current.tagName);
|
|
255
|
+
const index = siblings.indexOf(current) + 1;
|
|
256
|
+
const segment = `${current.tagName.toLowerCase()}:nth-of-type(${index})`;
|
|
257
|
+
if (segments.length === maxPathSegments || length + segment.length + 3 > maxPathCharacters) {
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
segments.unshift(segment);
|
|
261
|
+
length += segment.length + 3;
|
|
262
|
+
current = parent;
|
|
263
|
+
}
|
|
264
|
+
// From the body only when the walk got there. Cut short, the path is a descendant selector,
|
|
265
|
+
// which still reaches the element; `body > …` with the top levels missing reaches nothing.
|
|
266
|
+
return current === document.body ? `body > ${segments.join(' > ')}` : segments.join(' > ');
|
|
267
|
+
}
|
|
268
|
+
function cssEscape(value) {
|
|
269
|
+
return value.replace(/["\\]/g, '\\$&');
|
|
270
|
+
}
|
|
271
|
+
function chainSignature(element) {
|
|
272
|
+
const parts = [];
|
|
273
|
+
for (let node = element; node && node !== document.documentElement; node = node.parentElement) {
|
|
274
|
+
const src = node.getAttribute(anchorAttribute);
|
|
275
|
+
if (src)
|
|
276
|
+
parts.push(src);
|
|
277
|
+
}
|
|
278
|
+
return parts.join('>');
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* How much of the page the chosen anchor actually covers.
|
|
282
|
+
*
|
|
283
|
+
* This cannot be answered from the build. One source position renders N times — a `.map`
|
|
284
|
+
* over an array is one position and forty elements — and the transform only ever sees
|
|
285
|
+
* source text. The count exists at runtime and nowhere else, so it is taken here, at the
|
|
286
|
+
* moment of the click, and travels with the comment.
|
|
287
|
+
*/
|
|
288
|
+
export function instancesOf(element) {
|
|
289
|
+
const key = anchorKeyOf(element);
|
|
290
|
+
return key ? document.querySelectorAll(sameSourceSelector(key)).length : 1;
|
|
291
|
+
}
|
|
292
|
+
/** Every element rendered from the same source position as this one, including it. */
|
|
293
|
+
export function siblingInstances(element) {
|
|
294
|
+
const key = anchorKeyOf(element);
|
|
295
|
+
if (!key)
|
|
296
|
+
return [element];
|
|
297
|
+
return Array.from(document.querySelectorAll(sameSourceSelector(key)));
|
|
298
|
+
}
|
|
299
|
+
export function scopeFor(element, chain = []) {
|
|
300
|
+
const instancesOnPage = instancesOf(element);
|
|
301
|
+
const signature = chainSignature(element);
|
|
302
|
+
let siblingsSharingChain = 0;
|
|
303
|
+
for (const other of Array.from(document.querySelectorAll(anchoredSelector))) {
|
|
304
|
+
if (chainSignature(other) === signature)
|
|
305
|
+
siblingsSharingChain += 1;
|
|
306
|
+
}
|
|
307
|
+
return { instancesOnPage, siblingsSharingChain, chainInstances: chain.map(instancesOf) };
|
|
308
|
+
}
|
|
309
|
+
/** Bounded: a page-level container can hold hundreds, and the doc has to stay readable. */
|
|
310
|
+
const maxInsideFiles = 24;
|
|
311
|
+
/**
|
|
312
|
+
* Source files rendering inside the selected element, read from its subtree.
|
|
313
|
+
*
|
|
314
|
+
* Taken at click time from the DOM rather than derived from the chain, because the chain
|
|
315
|
+
* only records what the reviewer walked *through*. 79% of measured comments never widen at
|
|
316
|
+
* all, so a chain-derived list is empty for the common case — a direct click on a
|
|
317
|
+
* container — which is precisely the case that needs it. Reading the subtree does not care
|
|
318
|
+
* how the reviewer got there.
|
|
319
|
+
*/
|
|
320
|
+
/**
|
|
321
|
+
* What the selection renders, read from its subtree.
|
|
322
|
+
*
|
|
323
|
+
* Returns file paths on a local page and anchor ids on a shared one, because an id is all
|
|
324
|
+
* the browser has and a path cannot be derived from it there. Both are resolved to paths at
|
|
325
|
+
* export, on the machine that can. Callers must not assume these strings are paths.
|
|
326
|
+
*/
|
|
327
|
+
export function filesInsideSelection(element) {
|
|
328
|
+
const fileOf = (value) => value.slice(0, value.lastIndexOf(':', value.lastIndexOf(':') - 1));
|
|
329
|
+
const own = element.getAttribute(anchorAttribute);
|
|
330
|
+
const ownKey = own ? fileOf(own) : element.getAttribute(idAttribute);
|
|
331
|
+
const found = [];
|
|
332
|
+
const seen = new Set(ownKey ? [ownKey] : []);
|
|
333
|
+
for (const node of Array.from(element.querySelectorAll(anchoredSelector))) {
|
|
334
|
+
const src = node.getAttribute(anchorAttribute);
|
|
335
|
+
// One id per element rather than one per file: which ids share a file is a question only
|
|
336
|
+
// the manifest can answer, so the de-duplication that matters happens at export.
|
|
337
|
+
const key = src ? fileOf(src) : node.getAttribute(idAttribute);
|
|
338
|
+
if (!key || seen.has(key))
|
|
339
|
+
continue;
|
|
340
|
+
seen.add(key);
|
|
341
|
+
found.push(key);
|
|
342
|
+
if (found.length >= maxInsideFiles)
|
|
343
|
+
break;
|
|
344
|
+
}
|
|
345
|
+
return found;
|
|
346
|
+
}
|
|
347
|
+
/** Containers that open over any page: dialogs, modal sheets, popovers. */
|
|
348
|
+
const opensOverAnyPage = '[role="dialog"], [role="alertdialog"], dialog, [aria-modal="true"], [popover], [data-radix-popper-content-wrapper]';
|
|
349
|
+
/**
|
|
350
|
+
* Whether a comment belongs on the page being shown.
|
|
351
|
+
*
|
|
352
|
+
* The page it was left on, as a rule: a shared component like a page header renders different
|
|
353
|
+
* content on every page, so a comment about the header on /catalogue must not appear on
|
|
354
|
+
* /facturation. The exception is anything inside a dialog. A dialog is the same wherever it is
|
|
355
|
+
* opened from - a "new case" dialog can be opened from three pages - and a comment left on it
|
|
356
|
+
* from one of them is about the dialog, not about the page behind it. So a comment whose element
|
|
357
|
+
* is on screen inside a dialog belongs here, whatever page it was written on.
|
|
358
|
+
*/
|
|
359
|
+
export function belongsOnThisPage(comment) {
|
|
360
|
+
const route = comment.context?.route;
|
|
361
|
+
if (!route || route === window.location.pathname)
|
|
362
|
+
return true;
|
|
363
|
+
return Boolean(locateAnchor(comment.anchor)?.closest(opensOverAnyPage));
|
|
364
|
+
}
|
|
365
|
+
//# sourceMappingURL=anchors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anchors.js","sourceRoot":"","sources":["../../src/overlay/anchors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEhF,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAAC;AAC7C,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AACtD;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;AAExC,+EAA+E;AAC/E,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,eAAe,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Y,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { type ApiTarget } from '../core/apiKind.js';
|
|
2
|
+
import type { DirectReviewer } from './directReviewer.js';
|
|
3
|
+
import type { Anchor, Comment } from '../core/feedbackTypes.js';
|
|
4
|
+
import { type Upload } from './upload.js';
|
|
5
|
+
import type { RecordingLimit } from './recorder.js';
|
|
6
|
+
export declare function configureDirectApi(reviewer: DirectReviewer | null): void;
|
|
7
|
+
export declare function configureApi(options: {
|
|
8
|
+
target?: ApiTarget & {
|
|
9
|
+
projectId: string;
|
|
10
|
+
};
|
|
11
|
+
base?: string;
|
|
12
|
+
token?: string | null;
|
|
13
|
+
buildId?: string | null;
|
|
14
|
+
actorId?: string | null;
|
|
15
|
+
}): void;
|
|
16
|
+
/**
|
|
17
|
+
* The session is gone: expired, or revoked from the dashboard.
|
|
18
|
+
*
|
|
19
|
+
* Its own type so a caller can tell it from a network failure or a rejected write. The two need
|
|
20
|
+
* opposite responses - one needs the reviewer to sign in again, the other needs a retry - and a
|
|
21
|
+
* caller that cannot distinguish them will pick wrong for one of the two.
|
|
22
|
+
*
|
|
23
|
+
* Never thrown in local mode: the sidecar has no authentication to fail.
|
|
24
|
+
*/
|
|
25
|
+
export declare class SessionExpiredError extends Error {
|
|
26
|
+
constructor();
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The API refused one action (403): someone else's comment, without the admin role. The sign-in is
|
|
30
|
+
* still good, so the reviewer is told and stays signed in; signing in again would not change it.
|
|
31
|
+
*/
|
|
32
|
+
export declare class NotAllowedError extends Error {
|
|
33
|
+
constructor(message?: string);
|
|
34
|
+
}
|
|
35
|
+
export type ExportResponse = {
|
|
36
|
+
markdown: string;
|
|
37
|
+
path: string;
|
|
38
|
+
count: number;
|
|
39
|
+
};
|
|
40
|
+
export type NotificationEvent = {
|
|
41
|
+
/** v0 per-item read identity. */
|
|
42
|
+
id?: string;
|
|
43
|
+
sessionId?: string;
|
|
44
|
+
commentId: string;
|
|
45
|
+
kind: 'comment' | 'reply';
|
|
46
|
+
actor: string;
|
|
47
|
+
actorId: string | null;
|
|
48
|
+
body: string;
|
|
49
|
+
route: string | null;
|
|
50
|
+
createdAt: string;
|
|
51
|
+
unread: boolean;
|
|
52
|
+
};
|
|
53
|
+
export type NotificationGroup = {
|
|
54
|
+
title: string;
|
|
55
|
+
events: NotificationEvent[];
|
|
56
|
+
unread: number;
|
|
57
|
+
};
|
|
58
|
+
export declare let remoteFeedbackStatus: {
|
|
59
|
+
pending: number;
|
|
60
|
+
connected: boolean;
|
|
61
|
+
error: string | null;
|
|
62
|
+
} | null;
|
|
63
|
+
/**
|
|
64
|
+
* Whether the composer offers the paperclip: a Cloud session or a sidecar that keeps files; never
|
|
65
|
+
* Standalone. With a comment id, for a reply in that thread: not when another session holds it.
|
|
66
|
+
*/
|
|
67
|
+
export declare function attachmentsAvailable(commentId?: string): boolean;
|
|
68
|
+
/** Whether Record can be offered at all: a Cloud session. The plan's limit is asked of `api.recordingLimit()`. */
|
|
69
|
+
export declare const recordingSupported: () => boolean;
|
|
70
|
+
export declare const api: {
|
|
71
|
+
/**
|
|
72
|
+
* Who the signed-in reviewer is.
|
|
73
|
+
*
|
|
74
|
+
* Only meaningful in shared mode; the local path answers this from a nickname in the browser.
|
|
75
|
+
* The overlay needs it before a comment exists, because the pin cursor and the composer both
|
|
76
|
+
* carry the reviewer's initials - and drawing a `?` until their first comment comes back is
|
|
77
|
+
* the one moment they cannot recognise themselves.
|
|
78
|
+
*/
|
|
79
|
+
viewer(): Promise<{
|
|
80
|
+
id: string;
|
|
81
|
+
name: string;
|
|
82
|
+
email: string;
|
|
83
|
+
}>;
|
|
84
|
+
/**
|
|
85
|
+
* What happened while the developer was not looking (spec 7.2).
|
|
86
|
+
*
|
|
87
|
+
* Shared mode only. The local path has one person on it, so there is nobody to be notified
|
|
88
|
+
* about - and a bell that is always empty is worse than no bell.
|
|
89
|
+
*/
|
|
90
|
+
notifications(): Promise<any>;
|
|
91
|
+
markNotificationsRead(ids?: string[]): Promise<any>;
|
|
92
|
+
listComments(): Promise<Comment[]>;
|
|
93
|
+
createComment(input: {
|
|
94
|
+
author: string;
|
|
95
|
+
authorId: string | null;
|
|
96
|
+
body: string;
|
|
97
|
+
anchor: Anchor;
|
|
98
|
+
leafAnchor: Anchor | null;
|
|
99
|
+
anchorChain?: Anchor[];
|
|
100
|
+
insideSelection?: string[];
|
|
101
|
+
cssScope?: Comment["cssScope"];
|
|
102
|
+
scope?: {
|
|
103
|
+
instancesOnPage: number;
|
|
104
|
+
siblingsSharingChain: number;
|
|
105
|
+
};
|
|
106
|
+
pinOffset?: {
|
|
107
|
+
x: number;
|
|
108
|
+
y: number;
|
|
109
|
+
};
|
|
110
|
+
context: Comment["context"];
|
|
111
|
+
attachmentIds?: string[];
|
|
112
|
+
}): Promise<Comment>;
|
|
113
|
+
/**
|
|
114
|
+
* The picture of the element, sent after the comment it belongs to exists. The size and what
|
|
115
|
+
* it may be missing ride in the query, so the body stays the image and nothing else.
|
|
116
|
+
*/
|
|
117
|
+
uploadScreenshot(commentId: string, snapshot: {
|
|
118
|
+
blob: Blob;
|
|
119
|
+
width: number;
|
|
120
|
+
height: number;
|
|
121
|
+
incomplete: string[];
|
|
122
|
+
}): Promise<void>;
|
|
123
|
+
/** A file for the message being written, sent as soon as it is added (spec: upload timing). */
|
|
124
|
+
uploadAttachment(file: File, onProgress: (fraction: number) => void): Promise<Upload>;
|
|
125
|
+
/** What the plan lets a recording be: null where nothing can be recorded to. */
|
|
126
|
+
recordingLimit(): Promise<RecordingLimit | null>;
|
|
127
|
+
/** A file taken out of the composer. Best effort: it expires within the hour anyway. */
|
|
128
|
+
discardUpload(id: string): Promise<void>;
|
|
129
|
+
/** A sent file's bytes, to show or to save. */
|
|
130
|
+
attachmentBlob(commentId: string, attachmentId: string): Promise<Blob>;
|
|
131
|
+
trace(events: unknown[]): Promise<void>;
|
|
132
|
+
updateComment(id: string, patch: {
|
|
133
|
+
body?: string;
|
|
134
|
+
status?: "open" | "resolved";
|
|
135
|
+
}): Promise<Comment>;
|
|
136
|
+
updateReply(commentId: string, replyId: string, body: string): Promise<import("../core/feedbackTypes.js").Reply>;
|
|
137
|
+
deleteComment(id: string): Promise<void>;
|
|
138
|
+
addReply(id: string, input: {
|
|
139
|
+
author: string;
|
|
140
|
+
authorId: string | null;
|
|
141
|
+
body: string;
|
|
142
|
+
anchor: Anchor;
|
|
143
|
+
attachmentIds?: string[];
|
|
144
|
+
}): Promise<import("../core/feedbackTypes.js").Reply>;
|
|
145
|
+
exportTasks(input: {
|
|
146
|
+
commentIds?: string[];
|
|
147
|
+
route?: string | null;
|
|
148
|
+
}): Promise<ExportResponse>;
|
|
149
|
+
};
|
|
150
|
+
export declare function renderable(comments: unknown): Comment[];
|