@atlaskit/react-ufo 1.0.1 → 2.0.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/CHANGELOG.md +32 -0
- package/README.md +5 -0
- package/additional-payload/package.json +15 -0
- package/bundle-eval-timing/package.json +15 -0
- package/coinflip/package.json +15 -0
- package/common/package.json +5 -5
- package/config/package.json +15 -0
- package/create-payload/package.json +15 -0
- package/create-post-interaction-log-payload/package.json +15 -0
- package/custom-data/package.json +15 -0
- package/custom-mark/package.json +15 -0
- package/custom-spans/package.json +15 -0
- package/custom-timings/package.json +15 -0
- package/dist/cjs/additional-payload/index.js +25 -0
- package/dist/cjs/additional-payload/utils/cache-hit-ratio/index.js +69 -0
- package/dist/cjs/additional-payload/utils/lighthouse-metrics/cls/index.js +53 -0
- package/dist/cjs/additional-payload/utils/lighthouse-metrics/const.js +10 -0
- package/dist/cjs/additional-payload/utils/lighthouse-metrics/index.js +29 -0
- package/dist/cjs/additional-payload/utils/lighthouse-metrics/tbt/index.js +25 -0
- package/dist/cjs/additional-payload/utils/lighthouse-metrics/utils/buffer/index.js +38 -0
- package/dist/cjs/additional-payload/utils/lighthouse-metrics/utils/observer/index.js +37 -0
- package/dist/cjs/bundle-eval-timing/index.js +48 -0
- package/dist/cjs/coinflip/index.js +22 -0
- package/dist/cjs/common/common/types.js +5 -0
- package/dist/cjs/common/constants.js +7 -0
- package/dist/cjs/common/index.js +1 -0
- package/dist/cjs/common/vc/types.js +11 -0
- package/dist/cjs/config/index.js +222 -0
- package/dist/cjs/create-payload/common/types.js +1 -0
- package/dist/cjs/create-payload/common/utils/index.js +15 -0
- package/dist/cjs/create-payload/index.js +784 -0
- package/dist/cjs/create-post-interaction-log-payload/index.js +207 -0
- package/dist/cjs/custom-data/index.js +31 -0
- package/dist/cjs/custom-data/types.js +5 -0
- package/dist/cjs/custom-mark/index.js +45 -0
- package/dist/cjs/custom-spans/index.js +14 -0
- package/dist/cjs/custom-timings/index.js +65 -0
- package/dist/cjs/experience-trace-id-context/index.js +40 -0
- package/dist/cjs/experience-trace-id-context/types.js +1 -0
- package/dist/cjs/experience-trace-id-context/utils/make-trace-http-request-headers/index.js +12 -0
- package/dist/cjs/feature-flags-accessed/common/constants.js +7 -0
- package/dist/cjs/feature-flags-accessed/common/types.js +5 -0
- package/dist/cjs/feature-flags-accessed/common/utils/index.js +38 -0
- package/dist/cjs/feature-flags-accessed/index.js +32 -0
- package/dist/cjs/generate-id/index.js +12 -0
- package/dist/cjs/global-error-handler/index.js +74 -0
- package/dist/cjs/hidden-timing/index.js +94 -0
- package/dist/cjs/initial-page-load-extra-timing/index.js +49 -0
- package/dist/cjs/interaction-context/index.js +14 -0
- package/dist/cjs/interaction-id-context/index.js +27 -0
- package/dist/cjs/interaction-metrics/common/constants.js +8 -0
- package/dist/cjs/interaction-metrics/index.js +815 -4
- package/dist/cjs/interaction-metrics/post-interaction-log.js +190 -0
- package/dist/cjs/interaction-metrics-init/index.js +89 -0
- package/dist/cjs/label/UFOLabel.js +45 -0
- package/dist/cjs/label/index.js +9 -0
- package/dist/cjs/load-hold/UFOLoadHold.js +76 -0
- package/dist/cjs/load-hold/index.js +9 -0
- package/dist/cjs/placeholder/Placeholder.js +34 -0
- package/dist/cjs/placeholder/index.js +9 -0
- package/dist/cjs/placeholder/loosely-lazy/index.js +19 -0
- package/dist/cjs/placeholder/loosely-lazy/lazy-suspense.js +80 -0
- package/dist/cjs/placeholder/loosely-lazy/types.js +5 -0
- package/dist/cjs/placeholder/loosely-lazy/wait-context.js +15 -0
- package/dist/cjs/resource-timing/common/types.js +1 -0
- package/dist/cjs/resource-timing/common/utils/config.js +70 -0
- package/dist/cjs/resource-timing/common/utils/resource-timing-buffer.js +111 -0
- package/dist/cjs/resource-timing/index.js +26 -0
- package/dist/cjs/resource-timing/main.js +141 -0
- package/dist/cjs/resource-timing/utils.js +10 -0
- package/dist/cjs/round-number/index.js +11 -0
- package/dist/cjs/route-name/index.js +12 -0
- package/dist/cjs/route-name-context/index.js +11 -0
- package/dist/cjs/segment/index.js +9 -0
- package/dist/cjs/segment/segment-highlight.js +40 -0
- package/dist/cjs/segment/segment.js +247 -0
- package/dist/cjs/set-interaction-error/index.js +17 -0
- package/dist/cjs/short-id/index.js +15 -0
- package/dist/cjs/ssr/index.js +70 -0
- package/dist/cjs/trace-interaction/index.js +48 -0
- package/dist/cjs/trace-pageload/index.js +58 -0
- package/dist/cjs/trace-press/index.js +34 -0
- package/dist/cjs/trace-redirect/index.js +17 -0
- package/dist/cjs/trace-transition/index.js +60 -0
- package/dist/cjs/trace-transition/utils/generate-span-id/index.js +11 -0
- package/dist/cjs/trace-transition/utils/set-interaction-active-trace/index.js +11 -0
- package/dist/cjs/typing-performance-tracing/index.js +262 -0
- package/dist/cjs/use-press-tracing/index.js +19 -0
- package/dist/cjs/vc/index.js +15 -0
- package/dist/cjs/vc/vc-observer/attachAbortListeners.js +40 -0
- package/dist/cjs/vc/vc-observer/getViewport.js +27 -0
- package/dist/cjs/vc/vc-observer/index.js +562 -0
- package/dist/cjs/vc/vc-observer/media-wrapper/index.js +15 -0
- package/dist/cjs/vc/vc-observer/media-wrapper/vc-utils.js +16 -0
- package/dist/cjs/vc/vc-observer/observers/index.js +270 -0
- package/dist/cjs/vc/vc-observer/observers/ssr-placeholders/index.js +183 -0
- package/dist/cjs/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/bindAbortListeners.js +22 -0
- package/dist/cjs/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/collectSSRPlaceholderDimensions.js +20 -0
- package/dist/cjs/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/index.js +19 -0
- package/dist/cjs/vc/vc-observer/observers/types.js +5 -0
- package/dist/es2019/additional-payload/index.js +2 -0
- package/dist/es2019/additional-payload/utils/cache-hit-ratio/index.js +63 -0
- package/dist/es2019/additional-payload/utils/lighthouse-metrics/cls/index.js +33 -0
- package/dist/es2019/additional-payload/utils/lighthouse-metrics/const.js +4 -0
- package/dist/es2019/additional-payload/utils/lighthouse-metrics/index.js +23 -0
- package/dist/es2019/additional-payload/utils/lighthouse-metrics/tbt/index.js +15 -0
- package/dist/es2019/additional-payload/utils/lighthouse-metrics/utils/buffer/index.js +23 -0
- package/dist/es2019/additional-payload/utils/lighthouse-metrics/utils/observer/index.js +31 -0
- package/dist/es2019/bundle-eval-timing/index.js +43 -0
- package/dist/es2019/coinflip/index.js +16 -0
- package/dist/es2019/common/common/types.js +1 -0
- package/dist/es2019/common/constants.js +1 -0
- package/dist/es2019/common/vc/types.js +5 -0
- package/dist/es2019/config/index.js +215 -0
- package/dist/es2019/create-payload/common/types.js +0 -0
- package/dist/es2019/create-payload/common/utils/index.js +8 -0
- package/dist/es2019/create-payload/index.js +792 -0
- package/dist/es2019/create-post-interaction-log-payload/index.js +188 -0
- package/dist/es2019/custom-data/index.js +24 -0
- package/dist/es2019/custom-data/types.js +1 -0
- package/dist/es2019/custom-mark/index.js +38 -0
- package/dist/es2019/custom-spans/index.js +6 -0
- package/dist/es2019/custom-timings/index.js +57 -0
- package/dist/es2019/experience-trace-id-context/index.js +31 -0
- package/dist/es2019/experience-trace-id-context/types.js +0 -0
- package/dist/es2019/experience-trace-id-context/utils/make-trace-http-request-headers/index.js +4 -0
- package/dist/es2019/feature-flags-accessed/common/constants.js +1 -0
- package/dist/es2019/feature-flags-accessed/common/types.js +1 -0
- package/dist/es2019/feature-flags-accessed/common/utils/index.js +24 -0
- package/dist/es2019/feature-flags-accessed/index.js +21 -0
- package/dist/es2019/generate-id/index.js +6 -0
- package/dist/es2019/global-error-handler/index.js +64 -0
- package/dist/es2019/hidden-timing/index.js +87 -0
- package/dist/es2019/initial-page-load-extra-timing/index.js +43 -0
- package/dist/es2019/interaction-context/index.js +6 -0
- package/dist/es2019/interaction-id-context/index.js +18 -0
- package/dist/es2019/interaction-metrics/common/constants.js +2 -0
- package/dist/es2019/interaction-metrics/index.js +741 -4
- package/dist/es2019/interaction-metrics/post-interaction-log.js +158 -0
- package/dist/es2019/interaction-metrics-init/index.js +72 -0
- package/dist/es2019/label/UFOLabel.js +34 -0
- package/dist/es2019/label/index.js +2 -0
- package/dist/es2019/load-hold/UFOLoadHold.js +66 -0
- package/dist/es2019/load-hold/index.js +2 -0
- package/dist/es2019/placeholder/Placeholder.js +25 -0
- package/dist/es2019/placeholder/index.js +2 -0
- package/dist/es2019/placeholder/loosely-lazy/index.js +2 -0
- package/dist/es2019/placeholder/loosely-lazy/lazy-suspense.js +63 -0
- package/dist/es2019/placeholder/loosely-lazy/types.js +1 -0
- package/dist/es2019/placeholder/loosely-lazy/wait-context.js +5 -0
- package/dist/es2019/resource-timing/common/types.js +0 -0
- package/dist/es2019/resource-timing/common/utils/config.js +44 -0
- package/dist/es2019/resource-timing/common/utils/resource-timing-buffer.js +88 -0
- package/dist/es2019/resource-timing/index.js +3 -0
- package/dist/es2019/resource-timing/main.js +130 -0
- package/dist/es2019/resource-timing/utils.js +4 -0
- package/dist/es2019/round-number/index.js +4 -0
- package/dist/es2019/route-name/index.js +6 -0
- package/dist/es2019/route-name-context/index.js +5 -0
- package/dist/es2019/segment/index.js +2 -0
- package/dist/es2019/segment/segment-highlight.js +27 -0
- package/dist/es2019/segment/segment.js +218 -0
- package/dist/es2019/set-interaction-error/index.js +11 -0
- package/dist/es2019/short-id/index.js +8 -0
- package/dist/es2019/ssr/index.js +54 -0
- package/dist/es2019/trace-interaction/index.js +41 -0
- package/dist/es2019/trace-pageload/index.js +48 -0
- package/dist/es2019/trace-press/index.js +27 -0
- package/dist/es2019/trace-redirect/index.js +10 -0
- package/dist/es2019/trace-transition/index.js +48 -0
- package/dist/es2019/trace-transition/utils/generate-span-id/index.js +1 -0
- package/dist/es2019/trace-transition/utils/set-interaction-active-trace/index.js +5 -0
- package/dist/es2019/typing-performance-tracing/index.js +255 -0
- package/dist/es2019/use-press-tracing/index.js +12 -0
- package/dist/es2019/vc/index.js +8 -0
- package/dist/es2019/vc/vc-observer/attachAbortListeners.js +34 -0
- package/dist/es2019/vc/vc-observer/getViewport.js +18 -0
- package/dist/es2019/vc/vc-observer/index.js +522 -0
- package/dist/es2019/vc/vc-observer/media-wrapper/index.js +9 -0
- package/dist/es2019/vc/vc-observer/media-wrapper/vc-utils.js +10 -0
- package/dist/es2019/vc/vc-observer/observers/index.js +231 -0
- package/dist/es2019/vc/vc-observer/observers/ssr-placeholders/index.js +146 -0
- package/dist/es2019/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/bindAbortListeners.js +16 -0
- package/dist/es2019/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/collectSSRPlaceholderDimensions.js +14 -0
- package/dist/es2019/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/index.js +2 -0
- package/dist/es2019/vc/vc-observer/observers/types.js +1 -0
- package/dist/esm/additional-payload/index.js +2 -0
- package/dist/esm/additional-payload/utils/cache-hit-ratio/index.js +63 -0
- package/dist/esm/additional-payload/utils/lighthouse-metrics/cls/index.js +47 -0
- package/dist/esm/additional-payload/utils/lighthouse-metrics/cls/types.js +0 -0
- package/dist/esm/additional-payload/utils/lighthouse-metrics/const.js +4 -0
- package/dist/esm/additional-payload/utils/lighthouse-metrics/index.js +22 -0
- package/dist/esm/additional-payload/utils/lighthouse-metrics/tbt/index.js +19 -0
- package/dist/esm/additional-payload/utils/lighthouse-metrics/utils/buffer/index.js +31 -0
- package/dist/esm/additional-payload/utils/lighthouse-metrics/utils/observer/index.js +31 -0
- package/dist/esm/bundle-eval-timing/index.js +41 -0
- package/dist/esm/coinflip/index.js +16 -0
- package/dist/esm/common/common/types.js +1 -0
- package/dist/esm/common/constants.js +1 -0
- package/dist/esm/common/index.js +0 -0
- package/dist/esm/common/vc/types.js +5 -0
- package/dist/esm/config/index.js +206 -0
- package/dist/esm/create-payload/common/types.js +0 -0
- package/dist/esm/create-payload/common/utils/index.js +8 -0
- package/dist/esm/create-payload/index.js +774 -0
- package/dist/esm/create-post-interaction-log-payload/index.js +200 -0
- package/dist/esm/custom-data/index.js +23 -0
- package/dist/esm/custom-data/types.js +1 -0
- package/dist/esm/custom-mark/index.js +36 -0
- package/dist/esm/custom-spans/index.js +8 -0
- package/dist/esm/custom-timings/index.js +56 -0
- package/dist/esm/experience-trace-id-context/index.js +34 -0
- package/dist/esm/experience-trace-id-context/types.js +0 -0
- package/dist/esm/experience-trace-id-context/utils/make-trace-http-request-headers/index.js +6 -0
- package/dist/esm/feature-flags-accessed/common/constants.js +1 -0
- package/dist/esm/feature-flags-accessed/common/types.js +1 -0
- package/dist/esm/feature-flags-accessed/common/utils/index.js +31 -0
- package/dist/esm/feature-flags-accessed/index.js +21 -0
- package/dist/esm/generate-id/index.js +6 -0
- package/dist/esm/global-error-handler/index.js +67 -0
- package/dist/esm/hidden-timing/index.js +87 -0
- package/dist/esm/initial-page-load-extra-timing/index.js +42 -0
- package/dist/esm/interaction-context/index.js +6 -0
- package/dist/esm/interaction-id-context/index.js +22 -0
- package/dist/esm/interaction-metrics/common/constants.js +2 -0
- package/dist/esm/interaction-metrics/index.js +778 -3
- package/dist/esm/interaction-metrics/post-interaction-log.js +184 -0
- package/dist/esm/interaction-metrics-init/index.js +77 -0
- package/dist/esm/label/UFOLabel.js +36 -0
- package/dist/esm/label/index.js +2 -0
- package/dist/esm/load-hold/UFOLoadHold.js +66 -0
- package/dist/esm/load-hold/index.js +2 -0
- package/dist/esm/placeholder/Placeholder.js +25 -0
- package/dist/esm/placeholder/index.js +2 -0
- package/dist/esm/placeholder/loosely-lazy/index.js +2 -0
- package/dist/esm/placeholder/loosely-lazy/lazy-suspense.js +70 -0
- package/dist/esm/placeholder/loosely-lazy/types.js +1 -0
- package/dist/esm/placeholder/loosely-lazy/wait-context.js +9 -0
- package/dist/esm/resource-timing/common/types.js +0 -0
- package/dist/esm/resource-timing/common/utils/config.js +62 -0
- package/dist/esm/resource-timing/common/utils/resource-timing-buffer.js +104 -0
- package/dist/esm/resource-timing/index.js +3 -0
- package/dist/esm/resource-timing/main.js +134 -0
- package/dist/esm/resource-timing/utils.js +4 -0
- package/dist/esm/round-number/index.js +5 -0
- package/dist/esm/route-name/index.js +6 -0
- package/dist/esm/route-name-context/index.js +5 -0
- package/dist/esm/segment/index.js +2 -0
- package/dist/esm/segment/segment-highlight.js +30 -0
- package/dist/esm/segment/segment.js +235 -0
- package/dist/esm/set-interaction-error/index.js +11 -0
- package/dist/esm/short-id/index.js +9 -0
- package/dist/esm/ssr/index.js +59 -0
- package/dist/esm/trace-interaction/index.js +41 -0
- package/dist/esm/trace-pageload/index.js +50 -0
- package/dist/esm/trace-press/index.js +27 -0
- package/dist/esm/trace-redirect/index.js +10 -0
- package/dist/esm/trace-transition/index.js +49 -0
- package/dist/esm/trace-transition/utils/generate-span-id/index.js +5 -0
- package/dist/esm/trace-transition/utils/set-interaction-active-trace/index.js +5 -0
- package/dist/esm/typing-performance-tracing/index.js +255 -0
- package/dist/esm/use-press-tracing/index.js +12 -0
- package/dist/esm/vc/index.js +9 -0
- package/dist/esm/vc/vc-observer/attachAbortListeners.js +34 -0
- package/dist/esm/vc/vc-observer/getViewport.js +20 -0
- package/dist/esm/vc/vc-observer/index.js +555 -0
- package/dist/esm/vc/vc-observer/media-wrapper/index.js +7 -0
- package/dist/esm/vc/vc-observer/media-wrapper/vc-utils.js +10 -0
- package/dist/esm/vc/vc-observer/observers/index.js +263 -0
- package/dist/esm/vc/vc-observer/observers/ssr-placeholders/index.js +176 -0
- package/dist/esm/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/bindAbortListeners.js +16 -0
- package/dist/esm/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/collectSSRPlaceholderDimensions.js +14 -0
- package/dist/esm/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/index.js +2 -0
- package/dist/esm/vc/vc-observer/observers/types.js +1 -0
- package/dist/types/additional-payload/index.d.ts +2 -0
- package/dist/types/additional-payload/utils/cache-hit-ratio/index.d.ts +8 -0
- package/dist/types/additional-payload/utils/lighthouse-metrics/cls/index.d.ts +2 -0
- package/dist/types/additional-payload/utils/lighthouse-metrics/cls/types.d.ts +3 -0
- package/dist/types/additional-payload/utils/lighthouse-metrics/const.d.ts +5 -0
- package/dist/types/additional-payload/utils/lighthouse-metrics/index.d.ts +7 -0
- package/dist/types/additional-payload/utils/lighthouse-metrics/tbt/index.d.ts +5 -0
- package/dist/types/additional-payload/utils/lighthouse-metrics/utils/buffer/index.d.ts +13 -0
- package/dist/types/additional-payload/utils/lighthouse-metrics/utils/observer/index.d.ts +2 -0
- package/dist/types/bundle-eval-timing/index.d.ts +16 -0
- package/dist/types/coinflip/index.d.ts +8 -0
- package/dist/types/common/common/types.d.ts +201 -0
- package/dist/types/common/constants.d.ts +1 -0
- package/dist/types/common/index.d.ts +5 -0
- package/dist/types/common/vc/types.d.ts +91 -0
- package/dist/types/config/index.d.ts +91 -0
- package/dist/types/create-payload/common/types.d.ts +4 -0
- package/dist/types/create-payload/common/utils/index.d.ts +3 -0
- package/dist/types/create-payload/index.d.ts +2969 -0
- package/dist/types/create-post-interaction-log-payload/index.d.ts +45 -0
- package/dist/types/custom-data/index.d.ts +5 -0
- package/dist/types/custom-data/types.d.ts +4 -0
- package/dist/types/custom-mark/index.d.ts +10 -0
- package/dist/types/custom-spans/index.d.ts +1 -0
- package/dist/types/custom-timings/index.d.ts +19 -0
- package/dist/types/experience-trace-id-context/index.d.ts +10 -0
- package/dist/types/experience-trace-id-context/types.d.ts +8 -0
- package/dist/types/experience-trace-id-context/utils/make-trace-http-request-headers/index.d.ts +4 -0
- package/dist/types/feature-flags-accessed/common/constants.d.ts +1 -0
- package/dist/types/feature-flags-accessed/common/types.d.ts +2 -0
- package/dist/types/feature-flags-accessed/common/utils/index.d.ts +3 -0
- package/dist/types/feature-flags-accessed/index.d.ts +14 -0
- package/dist/types/generate-id/index.d.ts +2 -0
- package/dist/types/global-error-handler/index.d.ts +3 -0
- package/dist/types/hidden-timing/index.d.ts +7 -0
- package/dist/types/initial-page-load-extra-timing/index.d.ts +9 -0
- package/dist/types/interaction-context/index.d.ts +33 -0
- package/dist/types/interaction-id-context/index.d.ts +9 -0
- package/dist/types/interaction-metrics/common/constants.d.ts +3 -0
- package/dist/types/interaction-metrics/index.d.ts +66 -2
- package/dist/types/interaction-metrics/post-interaction-log.d.ts +69 -0
- package/dist/types/interaction-metrics-init/index.d.ts +11 -0
- package/dist/types/label/UFOLabel.d.ts +13 -0
- package/dist/types/label/index.d.ts +2 -0
- package/dist/types/load-hold/UFOLoadHold.d.ts +53 -0
- package/dist/types/load-hold/index.d.ts +2 -0
- package/dist/types/placeholder/Placeholder.d.ts +13 -0
- package/dist/types/placeholder/index.d.ts +2 -0
- package/dist/types/placeholder/loosely-lazy/index.d.ts +3 -0
- package/dist/types/placeholder/loosely-lazy/lazy-suspense.d.ts +6 -0
- package/dist/types/placeholder/loosely-lazy/types.d.ts +20 -0
- package/dist/types/placeholder/loosely-lazy/wait-context.d.ts +3 -0
- package/dist/types/resource-timing/common/types.d.ts +41 -0
- package/dist/types/resource-timing/common/utils/config.d.ts +3 -0
- package/dist/types/resource-timing/common/utils/resource-timing-buffer.d.ts +11 -0
- package/dist/types/resource-timing/index.d.ts +4 -0
- package/dist/types/resource-timing/main.d.ts +2 -0
- package/dist/types/resource-timing/utils.d.ts +1 -0
- package/dist/types/round-number/index.d.ts +1 -0
- package/dist/types/route-name/index.d.ts +4 -0
- package/dist/types/route-name-context/index.d.ts +5 -0
- package/dist/types/segment/index.d.ts +2 -0
- package/dist/types/segment/segment-highlight.d.ts +6 -0
- package/dist/types/segment/segment.d.ts +8 -0
- package/dist/types/set-interaction-error/index.d.ts +4 -0
- package/dist/types/short-id/index.d.ts +1 -0
- package/dist/types/ssr/index.d.ts +21 -0
- package/dist/types/trace-interaction/index.d.ts +2 -0
- package/dist/types/trace-pageload/index.d.ts +2 -0
- package/dist/types/trace-press/index.d.ts +1 -0
- package/dist/types/trace-redirect/index.d.ts +1 -0
- package/dist/types/trace-transition/index.d.ts +2 -0
- package/dist/types/trace-transition/utils/generate-span-id/index.d.ts +1 -0
- package/dist/types/trace-transition/utils/set-interaction-active-trace/index.d.ts +1 -0
- package/dist/types/typing-performance-tracing/index.d.ts +2 -0
- package/dist/types/use-press-tracing/index.d.ts +1 -0
- package/dist/types/vc/index.d.ts +2 -0
- package/dist/types/vc/vc-observer/attachAbortListeners.d.ts +6 -0
- package/dist/types/vc/vc-observer/getViewport.d.ts +2 -0
- package/dist/types/vc/vc-observer/index.d.ts +98 -0
- package/dist/types/vc/vc-observer/media-wrapper/index.d.ts +7 -0
- package/dist/types/vc/vc-observer/media-wrapper/vc-utils.d.ts +1 -0
- package/dist/types/vc/vc-observer/observers/index.d.ts +39 -0
- package/dist/types/vc/vc-observer/observers/ssr-placeholders/index.d.ts +23 -0
- package/dist/types/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/bindAbortListeners.d.ts +1 -0
- package/dist/types/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/collectSSRPlaceholderDimensions.d.ts +1 -0
- package/dist/types/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/index.d.ts +2 -0
- package/dist/types/vc/vc-observer/observers/types.d.ts +11 -0
- package/dist/types-ts4.5/additional-payload/index.d.ts +2 -0
- package/dist/types-ts4.5/additional-payload/utils/cache-hit-ratio/index.d.ts +8 -0
- package/dist/types-ts4.5/additional-payload/utils/lighthouse-metrics/cls/index.d.ts +2 -0
- package/dist/types-ts4.5/additional-payload/utils/lighthouse-metrics/cls/types.d.ts +3 -0
- package/dist/types-ts4.5/additional-payload/utils/lighthouse-metrics/const.d.ts +5 -0
- package/dist/types-ts4.5/additional-payload/utils/lighthouse-metrics/index.d.ts +7 -0
- package/dist/types-ts4.5/additional-payload/utils/lighthouse-metrics/tbt/index.d.ts +5 -0
- package/dist/types-ts4.5/additional-payload/utils/lighthouse-metrics/utils/buffer/index.d.ts +13 -0
- package/dist/types-ts4.5/additional-payload/utils/lighthouse-metrics/utils/observer/index.d.ts +2 -0
- package/dist/types-ts4.5/bundle-eval-timing/index.d.ts +16 -0
- package/dist/types-ts4.5/coinflip/index.d.ts +8 -0
- package/dist/types-ts4.5/common/common/types.d.ts +201 -0
- package/dist/types-ts4.5/common/constants.d.ts +1 -0
- package/dist/types-ts4.5/common/index.d.ts +5 -0
- package/dist/types-ts4.5/common/vc/types.d.ts +91 -0
- package/dist/types-ts4.5/config/index.d.ts +95 -0
- package/dist/types-ts4.5/create-payload/common/types.d.ts +4 -0
- package/dist/types-ts4.5/create-payload/common/utils/index.d.ts +3 -0
- package/dist/types-ts4.5/create-payload/index.d.ts +2969 -0
- package/dist/types-ts4.5/create-post-interaction-log-payload/index.d.ts +45 -0
- package/dist/types-ts4.5/custom-data/index.d.ts +5 -0
- package/dist/types-ts4.5/custom-data/types.d.ts +4 -0
- package/dist/types-ts4.5/custom-mark/index.d.ts +10 -0
- package/dist/types-ts4.5/custom-spans/index.d.ts +1 -0
- package/dist/types-ts4.5/custom-timings/index.d.ts +19 -0
- package/dist/types-ts4.5/experience-trace-id-context/index.d.ts +10 -0
- package/dist/types-ts4.5/experience-trace-id-context/types.d.ts +8 -0
- package/dist/types-ts4.5/experience-trace-id-context/utils/make-trace-http-request-headers/index.d.ts +4 -0
- package/dist/types-ts4.5/feature-flags-accessed/common/constants.d.ts +1 -0
- package/dist/types-ts4.5/feature-flags-accessed/common/types.d.ts +2 -0
- package/dist/types-ts4.5/feature-flags-accessed/common/utils/index.d.ts +3 -0
- package/dist/types-ts4.5/feature-flags-accessed/index.d.ts +14 -0
- package/dist/types-ts4.5/generate-id/index.d.ts +2 -0
- package/dist/types-ts4.5/global-error-handler/index.d.ts +3 -0
- package/dist/types-ts4.5/hidden-timing/index.d.ts +7 -0
- package/dist/types-ts4.5/initial-page-load-extra-timing/index.d.ts +9 -0
- package/dist/types-ts4.5/interaction-context/index.d.ts +33 -0
- package/dist/types-ts4.5/interaction-id-context/index.d.ts +9 -0
- package/dist/types-ts4.5/interaction-metrics/common/constants.d.ts +3 -0
- package/dist/types-ts4.5/interaction-metrics/index.d.ts +66 -2
- package/dist/types-ts4.5/interaction-metrics/post-interaction-log.d.ts +69 -0
- package/dist/types-ts4.5/interaction-metrics-init/index.d.ts +11 -0
- package/dist/types-ts4.5/label/UFOLabel.d.ts +13 -0
- package/dist/types-ts4.5/label/index.d.ts +2 -0
- package/dist/types-ts4.5/load-hold/UFOLoadHold.d.ts +53 -0
- package/dist/types-ts4.5/load-hold/index.d.ts +2 -0
- package/dist/types-ts4.5/placeholder/Placeholder.d.ts +13 -0
- package/dist/types-ts4.5/placeholder/index.d.ts +2 -0
- package/dist/types-ts4.5/placeholder/loosely-lazy/index.d.ts +3 -0
- package/dist/types-ts4.5/placeholder/loosely-lazy/lazy-suspense.d.ts +6 -0
- package/dist/types-ts4.5/placeholder/loosely-lazy/types.d.ts +20 -0
- package/dist/types-ts4.5/placeholder/loosely-lazy/wait-context.d.ts +3 -0
- package/dist/types-ts4.5/resource-timing/common/types.d.ts +41 -0
- package/dist/types-ts4.5/resource-timing/common/utils/config.d.ts +3 -0
- package/dist/types-ts4.5/resource-timing/common/utils/resource-timing-buffer.d.ts +11 -0
- package/dist/types-ts4.5/resource-timing/index.d.ts +4 -0
- package/dist/types-ts4.5/resource-timing/main.d.ts +2 -0
- package/dist/types-ts4.5/resource-timing/utils.d.ts +1 -0
- package/dist/types-ts4.5/round-number/index.d.ts +1 -0
- package/dist/types-ts4.5/route-name/index.d.ts +4 -0
- package/dist/types-ts4.5/route-name-context/index.d.ts +5 -0
- package/dist/types-ts4.5/segment/index.d.ts +2 -0
- package/dist/types-ts4.5/segment/segment-highlight.d.ts +6 -0
- package/dist/types-ts4.5/segment/segment.d.ts +8 -0
- package/dist/types-ts4.5/set-interaction-error/index.d.ts +4 -0
- package/dist/types-ts4.5/short-id/index.d.ts +1 -0
- package/dist/types-ts4.5/ssr/index.d.ts +21 -0
- package/dist/types-ts4.5/trace-interaction/index.d.ts +2 -0
- package/dist/types-ts4.5/trace-pageload/index.d.ts +2 -0
- package/dist/types-ts4.5/trace-press/index.d.ts +1 -0
- package/dist/types-ts4.5/trace-redirect/index.d.ts +1 -0
- package/dist/types-ts4.5/trace-transition/index.d.ts +2 -0
- package/dist/types-ts4.5/trace-transition/utils/generate-span-id/index.d.ts +1 -0
- package/dist/types-ts4.5/trace-transition/utils/set-interaction-active-trace/index.d.ts +1 -0
- package/dist/types-ts4.5/typing-performance-tracing/index.d.ts +2 -0
- package/dist/types-ts4.5/use-press-tracing/index.d.ts +1 -0
- package/dist/types-ts4.5/vc/index.d.ts +2 -0
- package/dist/types-ts4.5/vc/vc-observer/attachAbortListeners.d.ts +6 -0
- package/dist/types-ts4.5/vc/vc-observer/getViewport.d.ts +2 -0
- package/dist/types-ts4.5/vc/vc-observer/index.d.ts +98 -0
- package/dist/types-ts4.5/vc/vc-observer/media-wrapper/index.d.ts +7 -0
- package/dist/types-ts4.5/vc/vc-observer/media-wrapper/vc-utils.d.ts +1 -0
- package/dist/types-ts4.5/vc/vc-observer/observers/index.d.ts +39 -0
- package/dist/types-ts4.5/vc/vc-observer/observers/ssr-placeholders/index.d.ts +23 -0
- package/dist/types-ts4.5/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/bindAbortListeners.d.ts +1 -0
- package/dist/types-ts4.5/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/collectSSRPlaceholderDimensions.d.ts +1 -0
- package/dist/types-ts4.5/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/index.d.ts +2 -0
- package/dist/types-ts4.5/vc/vc-observer/observers/types.d.ts +11 -0
- package/experience-trace-id-context/package.json +15 -0
- package/feature-flags-accessed/package.json +15 -0
- package/generate-id/package.json +15 -0
- package/global-error-handler/package.json +15 -0
- package/hidden-timing/package.json +15 -0
- package/initial-page-load-extra-timing/package.json +15 -0
- package/interaction-context/package.json +15 -0
- package/interaction-id-context/package.json +15 -0
- package/interaction-metrics-init/package.json +15 -0
- package/label/package.json +15 -0
- package/load-hold/package.json +15 -0
- package/package.json +55 -3
- package/placeholder/package.json +15 -0
- package/resource-timing/package.json +15 -0
- package/round-number/package.json +15 -0
- package/route-name/package.json +15 -0
- package/route-name-context/package.json +15 -0
- package/segment/package.json +15 -0
- package/set-interaction-error/package.json +15 -0
- package/short-id/package.json +15 -0
- package/ssr/package.json +15 -0
- package/ssr-scripts/package.json +15 -0
- package/trace-interaction/package.json +15 -0
- package/trace-pageload/package.json +15 -0
- package/trace-press/package.json +15 -0
- package/trace-redirect/package.json +15 -0
- package/trace-transition/package.json +15 -0
- package/typing-performance-tracing/package.json +15 -0
- package/use-press-tracing/package.json +15 -0
- package/vc/media/package.json +15 -0
- package/vc/package.json +15 -0
- package/dist/types/common/types.d.ts +0 -17
- package/dist/types-ts4.5/common/types.d.ts +0 -17
- /package/dist/cjs/{common → additional-payload/utils/lighthouse-metrics/cls}/types.js +0 -0
- /package/dist/es2019/{common → additional-payload/utils/lighthouse-metrics/cls}/types.js +0 -0
- /package/dist/{esm/common/types.js → es2019/common/index.js} +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type PostInteractionLogOutput } from '../common';
|
|
2
|
+
export default function createPostInteractionLogPayload({ lastInteractionFinish, reactProfilerTimings, lastInteractionFinishVCResult, postInteractionFinishVCResult, }: PostInteractionLogOutput): {
|
|
3
|
+
actionSubject: string;
|
|
4
|
+
action: string;
|
|
5
|
+
eventType: string;
|
|
6
|
+
source: string;
|
|
7
|
+
tags: string[];
|
|
8
|
+
attributes: {
|
|
9
|
+
properties: {
|
|
10
|
+
'event:hostname': string;
|
|
11
|
+
'event:product': string;
|
|
12
|
+
'event:schema': string;
|
|
13
|
+
'event:source': {
|
|
14
|
+
name: string;
|
|
15
|
+
version: string;
|
|
16
|
+
payloadSource: string;
|
|
17
|
+
};
|
|
18
|
+
'event:region': string;
|
|
19
|
+
'experience:key': string;
|
|
20
|
+
postInteractionLog: {
|
|
21
|
+
lastInteractionFinish: {
|
|
22
|
+
ufoName: string;
|
|
23
|
+
start: number;
|
|
24
|
+
end: number;
|
|
25
|
+
ttai: number;
|
|
26
|
+
vc90: number | null;
|
|
27
|
+
type: import("../common").InteractionType;
|
|
28
|
+
id: string;
|
|
29
|
+
abortReason?: import("../common").AbortReasonType | undefined;
|
|
30
|
+
abortedByInteractionName?: string | undefined;
|
|
31
|
+
routeName: string | null;
|
|
32
|
+
};
|
|
33
|
+
revisedEndTime: number;
|
|
34
|
+
revisedTtai: number;
|
|
35
|
+
revisedVC90: number | null;
|
|
36
|
+
lateMutations: {
|
|
37
|
+
time: number;
|
|
38
|
+
element: string;
|
|
39
|
+
viewportHeatmapPercentage: number;
|
|
40
|
+
}[];
|
|
41
|
+
reactProfilerTimings: any[];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
} | null;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type CustomData } from '../interaction-metrics';
|
|
2
|
+
import type { UFOCustomDataProps } from './types';
|
|
3
|
+
export type { UFOCustomDataProps } from './types';
|
|
4
|
+
export default function UFOCustomData({ data }: UFOCustomDataProps): null;
|
|
5
|
+
export declare function addUFOCustomData(data: CustomData): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default function UFOCustomMark({ name, timestamp }: {
|
|
2
|
+
name: string;
|
|
3
|
+
timestamp?: number;
|
|
4
|
+
}): null;
|
|
5
|
+
export declare function UFOCustomMarks({ data }: {
|
|
6
|
+
data: {
|
|
7
|
+
[key: string]: number;
|
|
8
|
+
} | undefined;
|
|
9
|
+
}): null;
|
|
10
|
+
export declare function addUFOCustomMark(name: string, timestamp?: number): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function addCustomSpans(name: string, start: number, end?: number, size?: number): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type BM3Marks = {
|
|
2
|
+
[key: string]: number;
|
|
3
|
+
};
|
|
4
|
+
export type BM3TimingsConfig = {
|
|
5
|
+
key: string;
|
|
6
|
+
startMark?: string;
|
|
7
|
+
endMark?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function getBm3Timings(marks?: BM3Marks, timingConfigs?: BM3TimingsConfig[]): {
|
|
10
|
+
[key: string]: {
|
|
11
|
+
startTime: number;
|
|
12
|
+
endTime: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare function UFOBM3TimingsToUFO({ marks, timings, }: {
|
|
16
|
+
marks?: BM3Marks;
|
|
17
|
+
timings?: BM3TimingsConfig[];
|
|
18
|
+
}): null;
|
|
19
|
+
export declare function addBM3TimingsToUFO(marks?: BM3Marks, timingsConfig?: BM3TimingsConfig[]): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type { TraceIdContext } from './types';
|
|
2
|
+
export declare const generateSpanId: () => string;
|
|
3
|
+
export declare const setInteractionActiveTrace: (interactionId: string, experienceType: string) => void;
|
|
4
|
+
export declare const setActiveTrace: (traceId: string, spanId: string, type: string) => void;
|
|
5
|
+
export declare const getActiveTrace: () => import("./types").TraceIdContext | undefined;
|
|
6
|
+
export declare const clearActiveTrace: () => void;
|
|
7
|
+
export declare const getActiveTraceHttpRequestHeaders: (_url: string) => {
|
|
8
|
+
'X-B3-TraceId': string;
|
|
9
|
+
'X-B3-SpanId': string;
|
|
10
|
+
} | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NON_BOOLEAN_VALUE = "non_boolean";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FeatureFlagValue } from './common/types';
|
|
2
|
+
export { redactValue } from './common/utils';
|
|
3
|
+
export type { FeatureFlagValue } from './common/types';
|
|
4
|
+
declare global {
|
|
5
|
+
var __CRITERION__: {
|
|
6
|
+
addFeatureFlagAccessed?: (flagName: string, flagValue: FeatureFlagValue) => void;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export declare const allFeatureFlagsAccessed: Map<string, FeatureFlagValue>;
|
|
10
|
+
export declare const currentFeatureFlagsAccessed: Map<string, FeatureFlagValue>;
|
|
11
|
+
/**
|
|
12
|
+
* Used for tracking accessed feature flags in "@atlassian/jira-feature-flagging".
|
|
13
|
+
* */
|
|
14
|
+
export declare const addFeatureFlagAccessed: (featureFlagName: string, featureFlagValue: FeatureFlagValue) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type HiddenTimingItem = {
|
|
2
|
+
time: number;
|
|
3
|
+
hidden: boolean;
|
|
4
|
+
};
|
|
5
|
+
export type PageVisibility = 'hidden' | 'mixed' | 'visible';
|
|
6
|
+
export declare function setupHiddenTimingCapture(): void;
|
|
7
|
+
export declare function getPageVisibilityState(start: number, end: number): PageVisibility;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ReportedTiming = {
|
|
2
|
+
startTime: number;
|
|
3
|
+
duration: number;
|
|
4
|
+
};
|
|
5
|
+
export type ReportedTimings = {
|
|
6
|
+
[key: string]: ReportedTiming;
|
|
7
|
+
};
|
|
8
|
+
export declare function addTimingFromPerformanceMark(name: string, startMark: string, stopMark: string, cleanStart?: boolean, cleanStop?: boolean): void;
|
|
9
|
+
export declare function getTimings(): ReportedTimings;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type Context } from 'react';
|
|
2
|
+
import { type InteractionContextType } from '@atlaskit/interaction-context';
|
|
3
|
+
export type CustomData = {
|
|
4
|
+
[key: string]: null | undefined | string | number | boolean | undefined | CustomData;
|
|
5
|
+
};
|
|
6
|
+
export type CustomTiming = {
|
|
7
|
+
[key: string]: {
|
|
8
|
+
startTime: number;
|
|
9
|
+
endTime: number;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export type Label = Readonly<{
|
|
13
|
+
name: string;
|
|
14
|
+
}>;
|
|
15
|
+
export type SegmentLabel = Readonly<{
|
|
16
|
+
name: string;
|
|
17
|
+
segmentId: string;
|
|
18
|
+
}>;
|
|
19
|
+
export type LabelStack = ReadonlyArray<Label | SegmentLabel>;
|
|
20
|
+
export interface UFOInteractionContextType extends InteractionContextType {
|
|
21
|
+
labelStack: LabelStack;
|
|
22
|
+
addMark(name: string, timestamp?: number): void;
|
|
23
|
+
addCustomData(customData: CustomData): void;
|
|
24
|
+
addCustomTimings(customTimings: CustomTiming): void;
|
|
25
|
+
addApdex(apdexInfo: {
|
|
26
|
+
key: string;
|
|
27
|
+
startTime?: number;
|
|
28
|
+
stopTime: number;
|
|
29
|
+
}): void;
|
|
30
|
+
}
|
|
31
|
+
declare const _default: Context<UFOInteractionContextType | null>;
|
|
32
|
+
export default _default;
|
|
33
|
+
export declare function useInteractionContext(): UFOInteractionContextType | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type InteractionIDContextType = {
|
|
3
|
+
current: string | null;
|
|
4
|
+
};
|
|
5
|
+
export declare const DefaultInteractionID: InteractionIDContextType;
|
|
6
|
+
declare const _default: import("react").Context<InteractionIDContextType>;
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const getInteractionId: () => InteractionIDContextType;
|
|
9
|
+
export declare const useInteractionId: () => InteractionIDContextType;
|
|
@@ -1,3 +1,67 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { AbortReasonType, ApdexType, BM3Event, CustomData, CustomTiming, InteractionError, InteractionMetrics, InteractionType, LifecycleMarkType, LoadProfilerEventInfo, Mark, MarkType, PostInteractionLogOutput, ReactProfilerTiming, RequestInfo, Span, SpanType } from '../common';
|
|
2
|
+
import { type TraceIdContext } from '../experience-trace-id-context';
|
|
3
|
+
import { type FeatureFlagValue } from '../feature-flags-accessed';
|
|
4
|
+
import type { LabelStack } from '../interaction-context';
|
|
5
|
+
import PostInteractionLog from './post-interaction-log';
|
|
6
|
+
export type { InteractionMetrics, LifecycleMarkType, Span, Mark, MarkType, InteractionType, AbortReasonType, ReactProfilerTiming, RequestInfo, ApdexType, CustomData, CustomTiming, InteractionError, };
|
|
7
|
+
export declare const postInteractionLog: PostInteractionLog;
|
|
8
|
+
export declare function getActiveInteraction(): InteractionMetrics | undefined;
|
|
9
|
+
export declare function remove(interactionId: string): void;
|
|
10
|
+
export declare function updatePageLoadInteractionName(ufoName: string, routeName?: string | null | undefined): void;
|
|
11
|
+
export declare function addMetadata(interactionId: string, data: Record<string, unknown>): void;
|
|
12
|
+
export declare function addCustomData(interactionId: string, labelStack: LabelStack, data: CustomData): void;
|
|
13
|
+
export declare function addCustomTiming(interactionId: string, labelStack: LabelStack, data: CustomTiming): void;
|
|
14
|
+
export declare function addMark(interactionId: string, type: MarkType, name: string, labelStack: LabelStack | null, time?: number): void;
|
|
15
|
+
export declare function addMarkToAll(type: MarkType, name: string, labelStack: LabelStack | null, time?: number): void;
|
|
16
|
+
export declare function addSpan(interactionId: string, type: SpanType, name: string, labelStack: LabelStack | null, start: number, end?: number, size?: number): void;
|
|
17
|
+
export declare function addSpanToAll(type: SpanType, name: string, labelStack: LabelStack | null, start: number, end?: number, size?: number): void;
|
|
18
|
+
export declare function addPreload(moduleId: string, timestamp: number): void;
|
|
19
|
+
export declare function addLoad(identifier: string, start: number, end: number): void;
|
|
20
|
+
export declare function extractModuleName(input: string): string;
|
|
21
|
+
export declare function addHold(interactionId: string, labelStack: LabelStack, name: string): () => void;
|
|
22
|
+
export declare function addHoldByID(interactionId: string, labelStack: LabelStack, name: string, id: string, ignoreOnSubmit?: boolean): () => void;
|
|
23
|
+
export declare function removeHoldByID(interactionId: string, id: string): void;
|
|
24
|
+
export declare function getCurrentInteractionType(interactionId: string): InteractionType | null;
|
|
25
|
+
export declare const ModuleLoadingProfiler: {
|
|
26
|
+
onPreload(moduleId: string, _priority?: number): void;
|
|
27
|
+
onLoadStart(info: LoadProfilerEventInfo): void;
|
|
28
|
+
onLoadComplete(info: LoadProfilerEventInfo): void;
|
|
29
|
+
placeholderFallBackMounted(id: string, moduleId: string): void;
|
|
30
|
+
placeholderFallBackUnmounted(id: string): void;
|
|
31
|
+
};
|
|
32
|
+
export declare function addError(interactionId: string, name: string, labelStack: LabelStack | null, errorType: string, errorMessage: string, errorStack?: string, forcedError?: boolean): void;
|
|
33
|
+
export declare function addErrorToAll(name: string, labelStack: LabelStack | null, errorType: string, errorMessage: string, errorStack?: string): void;
|
|
34
|
+
export declare const addProfilerTimings: (interactionId: string, labelStack: LabelStack, type: 'mount' | 'update' | 'nested-update', actualDuration: number, baseDuration: number, startTime: number, commitTime: number) => void;
|
|
35
|
+
export declare const sinkInteractionHandler: (sinkFn: (id: string, data: InteractionMetrics) => void) => void;
|
|
36
|
+
export declare const sinkPostInteractionLogHandler: (sinkFn: (output: PostInteractionLogOutput) => void | Promise<void>) => void;
|
|
37
|
+
export declare function tryComplete(interactionId: string, endTime?: number): void;
|
|
38
|
+
export declare function abort(interactionId: string, abortReason: AbortReasonType): void;
|
|
39
|
+
export declare function abortByNewInteraction(interactionId: string, interactionName: string): void;
|
|
40
|
+
export declare function abortAll(abortReason: AbortReasonType, abortedByInteractionName?: string): void;
|
|
41
|
+
export declare function addOnCancelCallback(id: string, cancelCallback: () => void): void;
|
|
42
|
+
export declare function addNewInteraction(interactionId: string, ufoName: string, type: InteractionType, startTime: number, rate: number, labelStack: LabelStack | null, routeName?: string | null, trace?: TraceIdContext | null): void;
|
|
43
|
+
export declare function addBrowserMetricEvent(event: BM3Event): void;
|
|
44
|
+
export declare function addApdexToAll(apdex: ApdexType): void;
|
|
45
|
+
export declare function addApdex(interactionId: string, apdexInfo: {
|
|
46
|
+
key: string;
|
|
47
|
+
stopTime: number;
|
|
48
|
+
startTime?: number;
|
|
49
|
+
labelStack?: LabelStack;
|
|
50
|
+
}): void;
|
|
51
|
+
export declare function addRequestInfo(interactionId: string, labelStack: LabelStack, requestInfo: RequestInfo): void;
|
|
52
|
+
export declare function addSegment(labelStack: LabelStack): void;
|
|
53
|
+
export declare function removeSegment(labelStack: LabelStack): void;
|
|
54
|
+
export declare function addRedirect(interactionId: string, fromUfoName: string, nextUfoName: string, nextRouteName: string, time: number): void;
|
|
55
|
+
declare global {
|
|
56
|
+
interface Window {
|
|
57
|
+
__REACT_UFO_ENABLE_PERF_TRACING?: boolean;
|
|
58
|
+
__UFO_COMPACT_PAYLOAD__?: boolean;
|
|
59
|
+
__CRITERION__?: {
|
|
60
|
+
addFeatureFlagAccessed?: (flagName: string, flagValue: FeatureFlagValue) => void;
|
|
61
|
+
addUFOHold?: (id: string, name: string, labelStack: string, startTime: number) => void;
|
|
62
|
+
removeUFOHold?: (id: string) => void;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
2
66
|
export declare const interactionSpans: Span[];
|
|
3
|
-
export declare function addCustomSpans(name: string, start: number, end?: number, size?: number): void;
|
|
67
|
+
export declare function addCustomSpans(name: string, start: number, end?: number, size?: number, labelStack?: LabelStack): void;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { type LastInteractionFinishInfo, type PostInteractionLogOutput, type ReactProfilerTiming } from '../common/common/types';
|
|
2
|
+
import type { VCResult } from '../common/vc/types';
|
|
3
|
+
import type { LabelStack } from '../interaction-context';
|
|
4
|
+
import { VCObserver, type VCObserverOptions } from '../vc/vc-observer';
|
|
5
|
+
export default class PostInteractionLog {
|
|
6
|
+
/**
|
|
7
|
+
* Basic info about interaction that has just finished
|
|
8
|
+
*/
|
|
9
|
+
lastInteractionFinish: LastInteractionFinishInfo | null;
|
|
10
|
+
/**
|
|
11
|
+
* Array of observed react render timings
|
|
12
|
+
*/
|
|
13
|
+
reactProfilerTimings: ReactProfilerTiming[];
|
|
14
|
+
/**
|
|
15
|
+
* Store the scheduled sink timeout Id so that it can be cancelled when needed
|
|
16
|
+
*/
|
|
17
|
+
sinkTimeoutId: number | null;
|
|
18
|
+
/**
|
|
19
|
+
* independent VC observer, that observes until `custom.post-interaction-logs` event is sent
|
|
20
|
+
*/
|
|
21
|
+
vcObserver: VCObserver | null;
|
|
22
|
+
vcObserverSSRConfig: {
|
|
23
|
+
ssr: number | undefined;
|
|
24
|
+
} | null;
|
|
25
|
+
lastInteractionFinishVCResult?: VCResult;
|
|
26
|
+
initializeVCObserver(options: VCObserverOptions): void;
|
|
27
|
+
startVCObserver({ startTime }: {
|
|
28
|
+
startTime: number;
|
|
29
|
+
}): void;
|
|
30
|
+
setVCObserverSSRConfig(vcObserverSSRConfig: {
|
|
31
|
+
ssr: number | undefined;
|
|
32
|
+
} | null): void;
|
|
33
|
+
/**
|
|
34
|
+
* Set the VC result as per the last interaction
|
|
35
|
+
* Used to compare diffs of VC updates vs post interaction VC observer
|
|
36
|
+
* @param result - VC result as calculated by UFO create payload
|
|
37
|
+
*/
|
|
38
|
+
setLastInteractionFinishVCResult(result: VCResult): void;
|
|
39
|
+
/**
|
|
40
|
+
* Handler function to process / send the observation data
|
|
41
|
+
*/
|
|
42
|
+
sinkHandlerFn: (output: PostInteractionLogOutput) => void | Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Set the fn that would be invoked to process / send the observation data
|
|
45
|
+
*/
|
|
46
|
+
sinkHandler(sinkHandlerFn: (output: PostInteractionLogOutput) => void | Promise<void>): void;
|
|
47
|
+
/**
|
|
48
|
+
* Reset state of the log
|
|
49
|
+
*/
|
|
50
|
+
reset(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Check if there is data in the log
|
|
53
|
+
*/
|
|
54
|
+
hasData(): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Send the log if there is data
|
|
57
|
+
*/
|
|
58
|
+
sendPostInteractionLog(): void;
|
|
59
|
+
/**
|
|
60
|
+
* This fn should be invoked when an interaction has finished
|
|
61
|
+
* Basic details about the finished interaction will be recorded
|
|
62
|
+
* A timeout will be setup to send the post interaction observation after some time.
|
|
63
|
+
*/
|
|
64
|
+
onInteractionComplete({ ufoName, start, end, id, abortReason, abortedByInteractionName, routeName, type, }: LastInteractionFinishInfo): void;
|
|
65
|
+
/**
|
|
66
|
+
* This fn should be invoked when a React render happens after interaction has finished
|
|
67
|
+
*/
|
|
68
|
+
addProfilerTimings(labelStack: LabelStack, type: 'mount' | 'update' | 'nested-update', actualDuration: number, baseDuration: number, startTime: number, commitTime: number): void;
|
|
69
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Config } from '../config';
|
|
2
|
+
export interface GenericAnalyticWebClientInstance {
|
|
3
|
+
sendOperationalEvent: (payload: any) => void;
|
|
4
|
+
}
|
|
5
|
+
export interface GenericAnalyticWebClient {
|
|
6
|
+
getInstance: () => GenericAnalyticWebClientInstance;
|
|
7
|
+
}
|
|
8
|
+
export interface GenericAnalyticWebClientPromise {
|
|
9
|
+
getAnalyticsWebClientPromise: () => Promise<GenericAnalyticWebClient>;
|
|
10
|
+
}
|
|
11
|
+
export declare const init: (analyticsWebClientAsync: Promise<GenericAnalyticWebClientPromise> | Promise<GenericAnalyticWebClientInstance>, config: Config) => void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Annotate part of the react tree with a product name
|
|
4
|
+
* ```
|
|
5
|
+
* <UFOLabel name="card">
|
|
6
|
+
* <Card card={data} />
|
|
7
|
+
* </UFOLabel>
|
|
8
|
+
* ```
|
|
9
|
+
*/
|
|
10
|
+
export default function UFOLabel({ name, children }: {
|
|
11
|
+
name: string;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Render this whenever you're loading.
|
|
4
|
+
*
|
|
5
|
+
* Wrap loading elements
|
|
6
|
+
* ```js
|
|
7
|
+
* if (isLoading){
|
|
8
|
+
* return (
|
|
9
|
+
* <UFOLoadHold name="card">
|
|
10
|
+
* <Skeleton />
|
|
11
|
+
* </UFOLoadHold>
|
|
12
|
+
* )
|
|
13
|
+
* }
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* Or render it as a sibling
|
|
17
|
+
* ```
|
|
18
|
+
* if (isLoading){
|
|
19
|
+
* return (
|
|
20
|
+
* <>
|
|
21
|
+
* <Skeleton />
|
|
22
|
+
* <UFOLoadHold name="card">
|
|
23
|
+
* </UFOLoadHold>
|
|
24
|
+
* )
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* Or wrap your content conditionally
|
|
29
|
+
* ```
|
|
30
|
+
* return (
|
|
31
|
+
* <UFOLoadHold name="card" hold={isLoading}>
|
|
32
|
+
* <Card />
|
|
33
|
+
* </UFOLoadHold>
|
|
34
|
+
* )
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* Or render as a sibling conditionally
|
|
38
|
+
* ```
|
|
39
|
+
* return (
|
|
40
|
+
* <>
|
|
41
|
+
* <Card />
|
|
42
|
+
* <UFOLoadHold name="card" hold={isLoading} />
|
|
43
|
+
* </>
|
|
44
|
+
* )
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
type Props = {
|
|
48
|
+
name: string;
|
|
49
|
+
hold?: boolean;
|
|
50
|
+
children?: ReactNode;
|
|
51
|
+
};
|
|
52
|
+
export default function UFOLoadHold({ children, name, hold }: Props): JSX.Element | null;
|
|
53
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type LazySuspenseProps } from './loosely-lazy';
|
|
3
|
+
/**
|
|
4
|
+
* Provides a placeholder for lazily loaded content, improving perceived performance.
|
|
5
|
+
*
|
|
6
|
+
* Named placeholders are especially useful for analyzing page load breakdowns
|
|
7
|
+
* in performance monitoring tools like Performance Portal.
|
|
8
|
+
*/
|
|
9
|
+
export default function Placeholder({ name, children, fallback, }: {
|
|
10
|
+
name: string;
|
|
11
|
+
children?: LazySuspenseProps['children'];
|
|
12
|
+
fallback?: LazySuspenseProps['fallback'];
|
|
13
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { SuspenseProps } from 'react';
|
|
2
|
+
export type Fallback = SuspenseProps['fallback'];
|
|
3
|
+
export type LazySuspenseContextType = {
|
|
4
|
+
fallback: Fallback;
|
|
5
|
+
setFallback(fallback: Fallback): void;
|
|
6
|
+
name?: string;
|
|
7
|
+
};
|
|
8
|
+
export type LazySuspenseProps = {
|
|
9
|
+
children?: SuspenseProps['children'];
|
|
10
|
+
fallback: Fallback;
|
|
11
|
+
name?: string;
|
|
12
|
+
};
|
|
13
|
+
export type DynamicFallbackProps = {
|
|
14
|
+
children(fallback: Fallback): any;
|
|
15
|
+
outsideSuspense: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type SubscriptionContextValue = {
|
|
18
|
+
subscribe: (callback: () => void) => () => void;
|
|
19
|
+
currentValue: () => number;
|
|
20
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type ResourceEntry = {
|
|
2
|
+
name: string;
|
|
3
|
+
initiatorType: string;
|
|
4
|
+
transferSize: number | void;
|
|
5
|
+
startTime: number;
|
|
6
|
+
duration: number;
|
|
7
|
+
responseStart: number;
|
|
8
|
+
requestStart: number;
|
|
9
|
+
fetchStart: number;
|
|
10
|
+
workerStart: number;
|
|
11
|
+
serverTime?: number;
|
|
12
|
+
networkTime?: number;
|
|
13
|
+
encodedSize?: number | null;
|
|
14
|
+
decodedSize?: number | null;
|
|
15
|
+
};
|
|
16
|
+
export type ResourceTimingsConfig = {
|
|
17
|
+
sanitiseEndpoints: (url: string) => string | null;
|
|
18
|
+
mapResources: (url: string) => string | null;
|
|
19
|
+
xhrFilter?: (url: string) => boolean;
|
|
20
|
+
hasTimingHeaders?: (url: string) => boolean;
|
|
21
|
+
};
|
|
22
|
+
interface BasicResourceTiming {
|
|
23
|
+
startTime: number;
|
|
24
|
+
duration: number;
|
|
25
|
+
type: string;
|
|
26
|
+
workerStart: number;
|
|
27
|
+
fetchStart: number;
|
|
28
|
+
}
|
|
29
|
+
interface CacheableResourceTiming extends BasicResourceTiming {
|
|
30
|
+
transferType: string;
|
|
31
|
+
ttfb?: number;
|
|
32
|
+
}
|
|
33
|
+
interface NonCacheableResourceTiming extends BasicResourceTiming {
|
|
34
|
+
size: number;
|
|
35
|
+
ttfb: number;
|
|
36
|
+
}
|
|
37
|
+
export type ResourceTiming = BasicResourceTiming | NonCacheableResourceTiming | CacheableResourceTiming;
|
|
38
|
+
export type ResourceTimings = {
|
|
39
|
+
[key: string]: ResourceTiming;
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ResourceEntry } from '../types';
|
|
2
|
+
export declare const resourceTimingBuffer: {
|
|
3
|
+
timings: ResourceEntry[];
|
|
4
|
+
maxSize: number;
|
|
5
|
+
observer: PerformanceObserver | null;
|
|
6
|
+
transformResource: (entry: PerformanceResourceTiming) => ResourceEntry;
|
|
7
|
+
start: () => void;
|
|
8
|
+
stop: () => void;
|
|
9
|
+
addTimings: (list: PerformanceObserverEntryList) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const filterResourceTimings: (startTime: number, endTime: number) => ResourceEntry[] | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function startResourceTimingBuffer(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const roundEpsilon: (num: number, places?: number) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function generateId(length?: number): string;
|