@atlaskit/react-ufo 3.6.6 → 3.6.7
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 +8 -0
- package/dist/cjs/additional-payload/utils/cache-hit-ratio/index.js +5 -6
- package/dist/cjs/additional-payload/utils/lighthouse-metrics/cls/index.js +3 -4
- package/dist/cjs/additional-payload/utils/lighthouse-metrics/index.js +6 -6
- package/dist/cjs/additional-payload/utils/lighthouse-metrics/tbt/index.js +3 -4
- package/dist/cjs/additional-payload/utils/lighthouse-metrics/utils/buffer/index.js +0 -3
- package/dist/cjs/additional-payload/utils/lighthouse-metrics/utils/observer/index.js +10 -10
- package/dist/cjs/assets/index.js +14 -17
- package/dist/cjs/assets/utils.js +13 -10
- package/dist/cjs/bundle-eval-timing/index.js +8 -8
- package/dist/cjs/coinflip/index.js +2 -3
- package/dist/cjs/config/index.js +42 -30
- package/dist/cjs/create-experimental-interaction-metrics-payload/index.js +41 -29
- package/dist/cjs/create-payload/common/utils/index.js +20 -16
- package/dist/cjs/create-payload/index.js +120 -128
- package/dist/cjs/create-payload/utils/get-interaction-status.js +2 -3
- package/dist/cjs/create-payload/utils/get-page-visibility-up-to-ttai.js +2 -3
- package/dist/cjs/create-payload/utils/get-react-ufo-payload-version.js +3 -4
- package/dist/cjs/create-payload/utils/get-ssr-done-time-value.js +2 -3
- package/dist/cjs/create-payload/utils/get-vc-metrics.js +7 -8
- package/dist/cjs/create-post-interaction-log-payload/index.js +12 -13
- package/dist/cjs/custom-data/index.js +14 -6
- package/dist/cjs/custom-mark/index.js +3 -4
- package/dist/cjs/custom-spans/index.js +3 -4
- package/dist/cjs/custom-timings/index.js +6 -6
- package/dist/cjs/experience-trace-id-context/index.js +21 -16
- package/dist/cjs/experience-trace-id-context/utils/make-trace-http-request-headers/index.js +3 -4
- package/dist/cjs/feature-flags-accessed/common/utils/index.js +12 -12
- package/dist/cjs/feature-flags-accessed/index.js +4 -4
- package/dist/cjs/generate-id/index.js +2 -3
- package/dist/cjs/global-error-handler/index.js +16 -15
- package/dist/cjs/initial-page-load-extra-timing/index.js +6 -6
- package/dist/cjs/interaction-metrics/index.js +146 -110
- package/dist/cjs/interaction-metrics/post-interaction-log.js +0 -10
- package/dist/cjs/interaction-metrics-init/index.js +15 -16
- package/dist/cjs/interaction-metrics-init/schedule-idle-callback.js +2 -3
- package/dist/cjs/resource-timing/common/utils/config.js +10 -10
- package/dist/cjs/resource-timing/common/utils/resource-timing-buffer.js +14 -14
- package/dist/cjs/resource-timing/main.js +19 -20
- package/dist/cjs/resource-timing/utils.js +3 -4
- package/dist/cjs/round-number/index.js +3 -4
- package/dist/cjs/route-name/index.js +2 -3
- package/dist/cjs/segment/schedule-on-paint.js +2 -4
- package/dist/cjs/segment/segment.js +4 -5
- package/dist/cjs/set-interaction-error/index.js +3 -4
- package/dist/cjs/short-id/index.js +2 -3
- package/dist/cjs/ssr/index.js +21 -18
- package/dist/cjs/trace-interaction/index.js +4 -5
- package/dist/cjs/trace-pageload/index.js +6 -6
- package/dist/cjs/trace-press/index.js +2 -3
- package/dist/cjs/trace-redirect/index.js +2 -3
- package/dist/cjs/trace-transition/index.js +2 -3
- package/dist/cjs/trace-transition/utils/generate-span-id/index.js +3 -4
- package/dist/cjs/trace-transition/utils/set-interaction-active-trace/index.js +3 -4
- package/dist/cjs/vc/index.js +6 -17
- package/dist/cjs/vc/vc-observer/attachAbortListeners.js +3 -4
- package/dist/cjs/vc/vc-observer/getVCRevisionsData.js +22 -13
- package/dist/cjs/vc/vc-observer/getViewport.js +6 -6
- package/dist/cjs/vc/vc-observer/heatmap/heatmap.js +10 -20
- package/dist/cjs/vc/vc-observer/index.js +119 -145
- package/dist/cjs/vc/vc-observer/media-wrapper/vc-utils.js +3 -4
- package/dist/cjs/vc/vc-observer/observers/editor-lnv/index.js +0 -17
- package/dist/cjs/vc/vc-observer/observers/index.js +2 -29
- package/dist/cjs/vc/vc-observer/observers/non-visual-styles/is-non-visual-style-mutation.js +2 -3
- package/dist/cjs/vc/vc-observer/observers/ssr-placeholders/index.js +0 -16
- package/dist/cjs/vc/vc-observer/revisions/fy25_01.js +0 -2
- package/dist/cjs/vc/vc-observer/revisions/fy25_02.js +0 -2
- package/dist/cjs/vc/vc-observer/revisions/revisions.js +3 -4
- package/dist/cjs/vc/vc-observer-new/entries-timeline/index.js +0 -9
- package/dist/cjs/vc/vc-observer-new/get-element-name.js +2 -3
- package/dist/cjs/vc/vc-observer-new/get-unique-element-name.js +10 -11
- package/dist/cjs/vc/vc-observer-new/index.js +0 -9
- package/dist/cjs/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +0 -2
- package/dist/cjs/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -6
- package/dist/cjs/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/canvas-pixel.js +12 -20
- package/dist/cjs/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/index.js +26 -26
- package/dist/cjs/vc/vc-observer-new/metric-calculator/percentile-calc/heatmap/heatmap.js +6 -18
- package/dist/cjs/vc/vc-observer-new/metric-calculator/percentile-calc/heatmap/index.js +13 -25
- package/dist/cjs/vc/vc-observer-new/metric-calculator/percentile-calc/index.js +7 -8
- package/dist/cjs/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/calc-union-area.js +39 -48
- package/dist/cjs/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/index.js +7 -8
- package/dist/cjs/vc/vc-observer-new/metric-calculator/utils/get-viewport-height.js +2 -3
- package/dist/cjs/vc/vc-observer-new/metric-calculator/utils/get-viewport-width.js +2 -3
- package/dist/cjs/vc/vc-observer-new/metric-calculator/utils/is-viewport-entry-data.js +2 -3
- package/dist/cjs/vc/vc-observer-new/metric-calculator/utils/task-yield.js +7 -8
- package/dist/cjs/vc/vc-observer-new/viewport-observer/index.js +7 -15
- package/dist/cjs/vc/vc-observer-new/viewport-observer/intersection-observer/index.js +7 -8
- package/dist/cjs/vc/vc-observer-new/viewport-observer/mutation-observer/index.js +14 -15
- package/dist/cjs/vc/vc-observer-new/viewport-observer/performance-observer/index.js +9 -9
- package/dist/cjs/vc/vc-observer-new/window-event-observer/index.js +1 -7
- package/dist/es2019/additional-payload/utils/cache-hit-ratio/index.js +4 -5
- package/dist/es2019/additional-payload/utils/lighthouse-metrics/cls/index.js +2 -3
- package/dist/es2019/additional-payload/utils/lighthouse-metrics/index.js +4 -5
- package/dist/es2019/additional-payload/utils/lighthouse-metrics/tbt/index.js +2 -3
- package/dist/es2019/additional-payload/utils/lighthouse-metrics/utils/buffer/index.js +0 -3
- package/dist/es2019/additional-payload/utils/lighthouse-metrics/utils/observer/index.js +8 -9
- package/dist/es2019/assets/index.js +14 -19
- package/dist/es2019/assets/utils.js +8 -10
- package/dist/es2019/bundle-eval-timing/index.js +6 -7
- package/dist/es2019/coinflip/index.js +2 -4
- package/dist/es2019/config/index.js +28 -29
- package/dist/es2019/create-experimental-interaction-metrics-payload/index.js +15 -18
- package/dist/es2019/create-payload/common/utils/index.js +14 -15
- package/dist/es2019/create-payload/index.js +75 -84
- package/dist/es2019/create-payload/utils/get-interaction-status.js +2 -4
- package/dist/es2019/create-payload/utils/get-page-visibility-up-to-ttai.js +2 -3
- package/dist/es2019/create-payload/utils/get-react-ufo-payload-version.js +2 -3
- package/dist/es2019/create-payload/utils/get-ssr-done-time-value.js +2 -3
- package/dist/es2019/create-payload/utils/get-vc-metrics.js +2 -3
- package/dist/es2019/create-post-interaction-log-payload/index.js +12 -13
- package/dist/es2019/custom-data/index.js +13 -5
- package/dist/es2019/custom-mark/index.js +2 -3
- package/dist/es2019/custom-spans/index.js +2 -3
- package/dist/es2019/custom-timings/index.js +4 -5
- package/dist/es2019/experience-trace-id-context/index.js +14 -15
- package/dist/es2019/experience-trace-id-context/utils/make-trace-http-request-headers/index.js +2 -3
- package/dist/es2019/feature-flags-accessed/common/utils/index.js +10 -11
- package/dist/es2019/feature-flags-accessed/index.js +2 -3
- package/dist/es2019/generate-id/index.js +2 -3
- package/dist/es2019/global-error-handler/index.js +13 -14
- package/dist/es2019/initial-page-load-extra-timing/index.js +4 -5
- package/dist/es2019/interaction-metrics/index.js +108 -109
- package/dist/es2019/interaction-metrics/post-interaction-log.js +0 -10
- package/dist/es2019/interaction-metrics-init/index.js +14 -15
- package/dist/es2019/interaction-metrics-init/schedule-idle-callback.js +2 -3
- package/dist/es2019/resource-timing/common/utils/config.js +8 -9
- package/dist/es2019/resource-timing/common/utils/resource-timing-buffer.js +12 -13
- package/dist/es2019/resource-timing/main.js +18 -19
- package/dist/es2019/resource-timing/utils.js +2 -3
- package/dist/es2019/round-number/index.js +2 -3
- package/dist/es2019/route-name/index.js +2 -3
- package/dist/es2019/segment/schedule-on-paint.js +2 -4
- package/dist/es2019/segment/segment.js +4 -5
- package/dist/es2019/set-interaction-error/index.js +2 -3
- package/dist/es2019/short-id/index.js +2 -3
- package/dist/es2019/ssr/index.js +16 -17
- package/dist/es2019/trace-interaction/index.js +4 -5
- package/dist/es2019/trace-pageload/index.js +4 -5
- package/dist/es2019/trace-press/index.js +2 -3
- package/dist/es2019/trace-redirect/index.js +2 -3
- package/dist/es2019/trace-transition/index.js +2 -3
- package/dist/es2019/trace-transition/utils/generate-span-id/index.js +2 -3
- package/dist/es2019/trace-transition/utils/set-interaction-active-trace/index.js +2 -3
- package/dist/es2019/vc/index.js +4 -16
- package/dist/es2019/vc/vc-observer/attachAbortListeners.js +2 -3
- package/dist/es2019/vc/vc-observer/getVCRevisionsData.js +4 -5
- package/dist/es2019/vc/vc-observer/getViewport.js +4 -5
- package/dist/es2019/vc/vc-observer/heatmap/heatmap.js +8 -20
- package/dist/es2019/vc/vc-observer/index.js +104 -134
- package/dist/es2019/vc/vc-observer/media-wrapper/vc-utils.js +2 -3
- package/dist/es2019/vc/vc-observer/observers/editor-lnv/index.js +0 -17
- package/dist/es2019/vc/vc-observer/observers/index.js +2 -29
- package/dist/es2019/vc/vc-observer/observers/non-visual-styles/is-non-visual-style-mutation.js +2 -4
- package/dist/es2019/vc/vc-observer/observers/ssr-placeholders/index.js +0 -16
- package/dist/es2019/vc/vc-observer/revisions/fy25_01.js +0 -2
- package/dist/es2019/vc/vc-observer/revisions/fy25_02.js +0 -2
- package/dist/es2019/vc/vc-observer/revisions/revisions.js +2 -3
- package/dist/es2019/vc/vc-observer-new/entries-timeline/index.js +0 -9
- package/dist/es2019/vc/vc-observer-new/get-element-name.js +2 -3
- package/dist/es2019/vc/vc-observer-new/get-unique-element-name.js +10 -11
- package/dist/es2019/vc/vc-observer-new/index.js +0 -9
- package/dist/es2019/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +0 -2
- package/dist/es2019/vc/vc-observer-new/metric-calculator/fy25_03/index.js +0 -3
- package/dist/es2019/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/canvas-pixel.js +4 -14
- package/dist/es2019/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/index.js +4 -5
- package/dist/es2019/vc/vc-observer-new/metric-calculator/percentile-calc/heatmap/heatmap.js +6 -18
- package/dist/es2019/vc/vc-observer-new/metric-calculator/percentile-calc/heatmap/index.js +8 -20
- package/dist/es2019/vc/vc-observer-new/metric-calculator/percentile-calc/index.js +2 -3
- package/dist/es2019/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/calc-union-area.js +8 -9
- package/dist/es2019/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/index.js +2 -3
- package/dist/es2019/vc/vc-observer-new/metric-calculator/utils/get-viewport-height.js +2 -3
- package/dist/es2019/vc/vc-observer-new/metric-calculator/utils/get-viewport-width.js +2 -3
- package/dist/es2019/vc/vc-observer-new/metric-calculator/utils/is-viewport-entry-data.js +2 -3
- package/dist/es2019/vc/vc-observer-new/metric-calculator/utils/task-yield.js +2 -4
- package/dist/es2019/vc/vc-observer-new/viewport-observer/index.js +7 -15
- package/dist/es2019/vc/vc-observer-new/viewport-observer/intersection-observer/index.js +8 -8
- package/dist/es2019/vc/vc-observer-new/viewport-observer/mutation-observer/index.js +15 -15
- package/dist/es2019/vc/vc-observer-new/viewport-observer/performance-observer/index.js +8 -9
- package/dist/es2019/vc/vc-observer-new/window-event-observer/index.js +1 -7
- package/dist/esm/additional-payload/utils/cache-hit-ratio/index.js +4 -5
- package/dist/esm/additional-payload/utils/lighthouse-metrics/cls/index.js +2 -3
- package/dist/esm/additional-payload/utils/lighthouse-metrics/index.js +4 -5
- package/dist/esm/additional-payload/utils/lighthouse-metrics/tbt/index.js +2 -3
- package/dist/esm/additional-payload/utils/lighthouse-metrics/utils/buffer/index.js +0 -3
- package/dist/esm/additional-payload/utils/lighthouse-metrics/utils/observer/index.js +8 -9
- package/dist/esm/assets/index.js +14 -17
- package/dist/esm/assets/utils.js +8 -10
- package/dist/esm/bundle-eval-timing/index.js +6 -7
- package/dist/esm/coinflip/index.js +2 -4
- package/dist/esm/config/index.js +28 -29
- package/dist/esm/create-experimental-interaction-metrics-payload/index.js +36 -28
- package/dist/esm/create-payload/common/utils/index.js +14 -15
- package/dist/esm/create-payload/index.js +119 -127
- package/dist/esm/create-payload/utils/get-interaction-status.js +2 -4
- package/dist/esm/create-payload/utils/get-page-visibility-up-to-ttai.js +2 -3
- package/dist/esm/create-payload/utils/get-react-ufo-payload-version.js +2 -3
- package/dist/esm/create-payload/utils/get-ssr-done-time-value.js +2 -3
- package/dist/esm/create-payload/utils/get-vc-metrics.js +7 -8
- package/dist/esm/create-post-interaction-log-payload/index.js +12 -13
- package/dist/esm/custom-data/index.js +13 -5
- package/dist/esm/custom-mark/index.js +2 -3
- package/dist/esm/custom-spans/index.js +2 -3
- package/dist/esm/custom-timings/index.js +4 -5
- package/dist/esm/experience-trace-id-context/index.js +14 -15
- package/dist/esm/experience-trace-id-context/utils/make-trace-http-request-headers/index.js +2 -3
- package/dist/esm/feature-flags-accessed/common/utils/index.js +10 -11
- package/dist/esm/feature-flags-accessed/index.js +2 -3
- package/dist/esm/generate-id/index.js +2 -3
- package/dist/esm/global-error-handler/index.js +13 -14
- package/dist/esm/initial-page-load-extra-timing/index.js +4 -5
- package/dist/esm/interaction-metrics/index.js +108 -109
- package/dist/esm/interaction-metrics/post-interaction-log.js +0 -10
- package/dist/esm/interaction-metrics-init/index.js +14 -15
- package/dist/esm/interaction-metrics-init/schedule-idle-callback.js +2 -3
- package/dist/esm/resource-timing/common/utils/config.js +8 -9
- package/dist/esm/resource-timing/common/utils/resource-timing-buffer.js +12 -13
- package/dist/esm/resource-timing/main.js +18 -19
- package/dist/esm/resource-timing/utils.js +2 -3
- package/dist/esm/round-number/index.js +2 -3
- package/dist/esm/route-name/index.js +2 -3
- package/dist/esm/segment/schedule-on-paint.js +2 -4
- package/dist/esm/segment/segment.js +4 -5
- package/dist/esm/set-interaction-error/index.js +2 -3
- package/dist/esm/short-id/index.js +2 -3
- package/dist/esm/ssr/index.js +16 -17
- package/dist/esm/trace-interaction/index.js +4 -5
- package/dist/esm/trace-pageload/index.js +4 -5
- package/dist/esm/trace-press/index.js +2 -3
- package/dist/esm/trace-redirect/index.js +2 -3
- package/dist/esm/trace-transition/index.js +2 -3
- package/dist/esm/trace-transition/utils/generate-span-id/index.js +2 -3
- package/dist/esm/trace-transition/utils/set-interaction-active-trace/index.js +2 -3
- package/dist/esm/vc/index.js +4 -16
- package/dist/esm/vc/vc-observer/attachAbortListeners.js +2 -3
- package/dist/esm/vc/vc-observer/getVCRevisionsData.js +21 -12
- package/dist/esm/vc/vc-observer/getViewport.js +4 -5
- package/dist/esm/vc/vc-observer/heatmap/heatmap.js +10 -20
- package/dist/esm/vc/vc-observer/index.js +119 -145
- package/dist/esm/vc/vc-observer/media-wrapper/vc-utils.js +2 -3
- package/dist/esm/vc/vc-observer/observers/editor-lnv/index.js +0 -17
- package/dist/esm/vc/vc-observer/observers/index.js +2 -29
- package/dist/esm/vc/vc-observer/observers/non-visual-styles/is-non-visual-style-mutation.js +2 -4
- package/dist/esm/vc/vc-observer/observers/ssr-placeholders/index.js +0 -16
- package/dist/esm/vc/vc-observer/revisions/fy25_01.js +0 -2
- package/dist/esm/vc/vc-observer/revisions/fy25_02.js +0 -2
- package/dist/esm/vc/vc-observer/revisions/revisions.js +2 -3
- package/dist/esm/vc/vc-observer-new/entries-timeline/index.js +0 -9
- package/dist/esm/vc/vc-observer-new/get-element-name.js +2 -3
- package/dist/esm/vc/vc-observer-new/get-unique-element-name.js +10 -11
- package/dist/esm/vc/vc-observer-new/index.js +0 -9
- package/dist/esm/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +0 -2
- package/dist/esm/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -6
- package/dist/esm/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/canvas-pixel.js +9 -19
- package/dist/esm/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/index.js +24 -25
- package/dist/esm/vc/vc-observer-new/metric-calculator/percentile-calc/heatmap/heatmap.js +6 -18
- package/dist/esm/vc/vc-observer-new/metric-calculator/percentile-calc/heatmap/index.js +13 -25
- package/dist/esm/vc/vc-observer-new/metric-calculator/percentile-calc/index.js +7 -8
- package/dist/esm/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/calc-union-area.js +39 -48
- package/dist/esm/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/index.js +7 -8
- package/dist/esm/vc/vc-observer-new/metric-calculator/utils/get-viewport-height.js +2 -3
- package/dist/esm/vc/vc-observer-new/metric-calculator/utils/get-viewport-width.js +2 -3
- package/dist/esm/vc/vc-observer-new/metric-calculator/utils/is-viewport-entry-data.js +2 -3
- package/dist/esm/vc/vc-observer-new/metric-calculator/utils/task-yield.js +7 -9
- package/dist/esm/vc/vc-observer-new/viewport-observer/index.js +7 -15
- package/dist/esm/vc/vc-observer-new/viewport-observer/intersection-observer/index.js +7 -8
- package/dist/esm/vc/vc-observer-new/viewport-observer/mutation-observer/index.js +14 -15
- package/dist/esm/vc/vc-observer-new/viewport-observer/performance-observer/index.js +7 -9
- package/dist/esm/vc/vc-observer-new/window-event-observer/index.js +1 -7
- package/dist/types/additional-payload/utils/cache-hit-ratio/index.d.ts +2 -2
- package/dist/types/additional-payload/utils/lighthouse-metrics/cls/index.d.ts +1 -1
- package/dist/types/additional-payload/utils/lighthouse-metrics/index.d.ts +3 -3
- package/dist/types/additional-payload/utils/lighthouse-metrics/tbt/index.d.ts +1 -1
- package/dist/types/additional-payload/utils/lighthouse-metrics/utils/observer/index.d.ts +2 -2
- package/dist/types/assets/index.d.ts +1 -3
- package/dist/types/assets/utils.d.ts +4 -4
- package/dist/types/bundle-eval-timing/index.d.ts +2 -2
- package/dist/types/coinflip/index.d.ts +1 -1
- package/dist/types/common/react-ufo-payload-schema.d.ts +1 -0
- package/dist/types/config/index.d.ts +16 -14
- package/dist/types/create-experimental-interaction-metrics-payload/index.d.ts +4 -5
- package/dist/types/create-payload/common/utils/index.d.ts +8 -7
- package/dist/types/create-payload/index.d.ts +1 -97
- package/dist/types/create-payload/utils/get-interaction-status.d.ts +1 -1
- package/dist/types/create-payload/utils/get-page-visibility-up-to-ttai.d.ts +1 -1
- package/dist/types/create-payload/utils/get-react-ufo-payload-version.d.ts +1 -1
- package/dist/types/create-payload/utils/get-ssr-done-time-value.d.ts +1 -1
- package/dist/types/create-payload/utils/get-vc-metrics.d.ts +2 -2
- package/dist/types/create-post-interaction-log-payload/index.d.ts +1 -1
- package/dist/types/custom-data/index.d.ts +1 -1
- package/dist/types/custom-mark/index.d.ts +1 -1
- package/dist/types/custom-spans/index.d.ts +1 -1
- package/dist/types/custom-timings/index.d.ts +2 -2
- package/dist/types/experience-trace-id-context/index.d.ts +7 -7
- package/dist/types/experience-trace-id-context/utils/make-trace-http-request-headers/index.d.ts +1 -1
- package/dist/types/feature-flags-accessed/common/utils/index.d.ts +2 -2
- package/dist/types/feature-flags-accessed/index.d.ts +1 -1
- package/dist/types/generate-id/index.d.ts +1 -1
- package/dist/types/global-error-handler/index.d.ts +3 -3
- package/dist/types/initial-page-load-extra-timing/index.d.ts +2 -2
- package/dist/types/interaction-context/index.d.ts +1 -1
- package/dist/types/interaction-metrics/index.d.ts +44 -44
- package/dist/types/interaction-metrics/post-interaction-log.d.ts +0 -1
- package/dist/types/interaction-metrics-init/index.d.ts +1 -1
- package/dist/types/interaction-metrics-init/schedule-idle-callback.d.ts +1 -1
- package/dist/types/resource-timing/common/utils/config.d.ts +2 -2
- package/dist/types/resource-timing/common/utils/resource-timing-buffer.d.ts +5 -5
- package/dist/types/resource-timing/main.d.ts +1 -1
- package/dist/types/resource-timing/utils.d.ts +1 -1
- package/dist/types/round-number/index.d.ts +1 -1
- package/dist/types/route-name/index.d.ts +3 -3
- package/dist/types/segment/schedule-on-paint.d.ts +1 -1
- package/dist/types/set-interaction-error/index.d.ts +1 -1
- package/dist/types/short-id/index.d.ts +1 -1
- package/dist/types/ssr/index.d.ts +5 -5
- package/dist/types/trace-interaction/index.d.ts +1 -1
- package/dist/types/trace-pageload/index.d.ts +2 -2
- package/dist/types/trace-press/index.d.ts +1 -1
- package/dist/types/trace-redirect/index.d.ts +1 -1
- package/dist/types/trace-transition/index.d.ts +1 -1
- package/dist/types/trace-transition/utils/generate-span-id/index.d.ts +1 -1
- package/dist/types/trace-transition/utils/set-interaction-active-trace/index.d.ts +1 -1
- package/dist/types/vc/index.d.ts +2 -2
- package/dist/types/vc/vc-observer/attachAbortListeners.d.ts +2 -2
- package/dist/types/vc/vc-observer/getVCRevisionsData.d.ts +5 -5
- package/dist/types/vc/vc-observer/getViewport.d.ts +2 -2
- package/dist/types/vc/vc-observer/heatmap/heatmap.d.ts +1 -1
- package/dist/types/vc/vc-observer/index.d.ts +4 -4
- package/dist/types/vc/vc-observer/media-wrapper/vc-utils.d.ts +1 -1
- package/dist/types/vc/vc-observer/observers/non-visual-styles/is-non-visual-style-mutation.d.ts +4 -4
- package/dist/types/vc/vc-observer/revisions/revisions.d.ts +1 -1
- package/dist/types/vc/vc-observer-new/get-element-name.d.ts +1 -1
- package/dist/types/vc/vc-observer-new/get-unique-element-name.d.ts +1 -1
- package/dist/types/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/canvas-pixel.d.ts +3 -2
- package/dist/types/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/index.d.ts +2 -2
- package/dist/types/vc/vc-observer-new/metric-calculator/percentile-calc/heatmap/index.d.ts +2 -2
- package/dist/types/vc/vc-observer-new/metric-calculator/percentile-calc/index.d.ts +1 -1
- package/dist/types/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/calc-union-area.d.ts +1 -1
- package/dist/types/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/index.d.ts +2 -2
- package/dist/types/vc/vc-observer-new/metric-calculator/utils/get-viewport-height.d.ts +1 -1
- package/dist/types/vc/vc-observer-new/metric-calculator/utils/get-viewport-width.d.ts +1 -1
- package/dist/types/vc/vc-observer-new/metric-calculator/utils/is-viewport-entry-data.d.ts +1 -1
- package/dist/types/vc/vc-observer-new/metric-calculator/utils/task-yield.d.ts +1 -1
- package/dist/types/vc/vc-observer-new/viewport-observer/index.d.ts +1 -1
- package/dist/types/vc/vc-observer-new/viewport-observer/intersection-observer/index.d.ts +1 -1
- package/dist/types/vc/vc-observer-new/viewport-observer/mutation-observer/index.d.ts +1 -1
- package/dist/types/vc/vc-observer-new/viewport-observer/performance-observer/index.d.ts +2 -2
- package/dist/types-ts4.5/additional-payload/utils/cache-hit-ratio/index.d.ts +2 -2
- package/dist/types-ts4.5/additional-payload/utils/lighthouse-metrics/cls/index.d.ts +1 -1
- package/dist/types-ts4.5/additional-payload/utils/lighthouse-metrics/index.d.ts +3 -3
- package/dist/types-ts4.5/additional-payload/utils/lighthouse-metrics/tbt/index.d.ts +1 -1
- package/dist/types-ts4.5/additional-payload/utils/lighthouse-metrics/utils/observer/index.d.ts +2 -2
- package/dist/types-ts4.5/assets/index.d.ts +1 -3
- package/dist/types-ts4.5/assets/utils.d.ts +4 -4
- package/dist/types-ts4.5/bundle-eval-timing/index.d.ts +2 -2
- package/dist/types-ts4.5/coinflip/index.d.ts +1 -1
- package/dist/types-ts4.5/common/react-ufo-payload-schema.d.ts +1 -0
- package/dist/types-ts4.5/config/index.d.ts +20 -14
- package/dist/types-ts4.5/create-experimental-interaction-metrics-payload/index.d.ts +4 -5
- package/dist/types-ts4.5/create-payload/common/utils/index.d.ts +8 -7
- package/dist/types-ts4.5/create-payload/index.d.ts +1 -97
- package/dist/types-ts4.5/create-payload/utils/get-interaction-status.d.ts +1 -1
- package/dist/types-ts4.5/create-payload/utils/get-page-visibility-up-to-ttai.d.ts +1 -1
- package/dist/types-ts4.5/create-payload/utils/get-react-ufo-payload-version.d.ts +1 -1
- package/dist/types-ts4.5/create-payload/utils/get-ssr-done-time-value.d.ts +1 -1
- package/dist/types-ts4.5/create-payload/utils/get-vc-metrics.d.ts +2 -2
- package/dist/types-ts4.5/create-post-interaction-log-payload/index.d.ts +1 -1
- package/dist/types-ts4.5/custom-data/index.d.ts +1 -1
- package/dist/types-ts4.5/custom-mark/index.d.ts +1 -1
- package/dist/types-ts4.5/custom-spans/index.d.ts +1 -1
- package/dist/types-ts4.5/custom-timings/index.d.ts +2 -2
- package/dist/types-ts4.5/experience-trace-id-context/index.d.ts +7 -7
- package/dist/types-ts4.5/experience-trace-id-context/utils/make-trace-http-request-headers/index.d.ts +1 -1
- package/dist/types-ts4.5/feature-flags-accessed/common/utils/index.d.ts +2 -2
- package/dist/types-ts4.5/feature-flags-accessed/index.d.ts +1 -1
- package/dist/types-ts4.5/generate-id/index.d.ts +1 -1
- package/dist/types-ts4.5/global-error-handler/index.d.ts +3 -3
- package/dist/types-ts4.5/initial-page-load-extra-timing/index.d.ts +2 -2
- package/dist/types-ts4.5/interaction-context/index.d.ts +1 -1
- package/dist/types-ts4.5/interaction-metrics/index.d.ts +44 -44
- package/dist/types-ts4.5/interaction-metrics/post-interaction-log.d.ts +0 -1
- package/dist/types-ts4.5/interaction-metrics-init/index.d.ts +1 -1
- package/dist/types-ts4.5/interaction-metrics-init/schedule-idle-callback.d.ts +1 -1
- package/dist/types-ts4.5/resource-timing/common/utils/config.d.ts +2 -2
- package/dist/types-ts4.5/resource-timing/common/utils/resource-timing-buffer.d.ts +5 -5
- package/dist/types-ts4.5/resource-timing/main.d.ts +1 -1
- package/dist/types-ts4.5/resource-timing/utils.d.ts +1 -1
- package/dist/types-ts4.5/round-number/index.d.ts +1 -1
- package/dist/types-ts4.5/route-name/index.d.ts +3 -3
- package/dist/types-ts4.5/segment/schedule-on-paint.d.ts +1 -1
- package/dist/types-ts4.5/set-interaction-error/index.d.ts +1 -1
- package/dist/types-ts4.5/short-id/index.d.ts +1 -1
- package/dist/types-ts4.5/ssr/index.d.ts +5 -5
- package/dist/types-ts4.5/trace-interaction/index.d.ts +1 -1
- package/dist/types-ts4.5/trace-pageload/index.d.ts +2 -2
- package/dist/types-ts4.5/trace-press/index.d.ts +1 -1
- package/dist/types-ts4.5/trace-redirect/index.d.ts +1 -1
- package/dist/types-ts4.5/trace-transition/index.d.ts +1 -1
- package/dist/types-ts4.5/trace-transition/utils/generate-span-id/index.d.ts +1 -1
- package/dist/types-ts4.5/trace-transition/utils/set-interaction-active-trace/index.d.ts +1 -1
- package/dist/types-ts4.5/vc/index.d.ts +2 -2
- package/dist/types-ts4.5/vc/vc-observer/attachAbortListeners.d.ts +2 -2
- package/dist/types-ts4.5/vc/vc-observer/getVCRevisionsData.d.ts +5 -5
- package/dist/types-ts4.5/vc/vc-observer/getViewport.d.ts +2 -2
- package/dist/types-ts4.5/vc/vc-observer/heatmap/heatmap.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer/index.d.ts +4 -4
- package/dist/types-ts4.5/vc/vc-observer/media-wrapper/vc-utils.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer/observers/non-visual-styles/is-non-visual-style-mutation.d.ts +4 -4
- package/dist/types-ts4.5/vc/vc-observer/revisions/revisions.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer-new/get-element-name.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer-new/get-unique-element-name.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/canvas-pixel.d.ts +3 -2
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/index.d.ts +2 -2
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/percentile-calc/heatmap/index.d.ts +2 -2
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/percentile-calc/index.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/calc-union-area.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/percentile-calc/rect-sweeping-line/index.d.ts +2 -2
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/utils/get-viewport-height.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/utils/get-viewport-width.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/utils/is-viewport-entry-data.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/utils/task-yield.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer-new/viewport-observer/index.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer-new/viewport-observer/intersection-observer/index.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer-new/viewport-observer/mutation-observer/index.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer-new/viewport-observer/performance-observer/index.d.ts +2 -2
- package/package.json +4 -1
- package/dist/cjs/self-measurements/index.js +0 -261
- package/dist/es2019/self-measurements/index.js +0 -213
- package/dist/esm/self-measurements/index.js +0 -246
- package/dist/types/self-measurements/index.d.ts +0 -57
- package/dist/types-ts4.5/self-measurements/index.d.ts +0 -57
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { roundEpsilon } from '../../../round-number';
|
|
2
|
-
import { withProfiling } from '../../../self-measurements';
|
|
3
2
|
const getPerformanceObject = () => {
|
|
4
3
|
var _window;
|
|
5
4
|
return ((_window = window) !== null && _window !== void 0 ? _window : {}).performance;
|
|
@@ -12,7 +11,7 @@ export const resourceTimingBuffer = {
|
|
|
12
11
|
timings: [],
|
|
13
12
|
maxSize: 1000,
|
|
14
13
|
observer: null,
|
|
15
|
-
transformResource
|
|
14
|
+
transformResource(entry) {
|
|
16
15
|
var _entry$serverTiming, _entry$serverTiming2;
|
|
17
16
|
const duration = roundEpsilon(entry.duration);
|
|
18
17
|
|
|
@@ -37,8 +36,8 @@ export const resourceTimingBuffer = {
|
|
|
37
36
|
encodedSize: roundEpsilon(entry.encodedBodySize),
|
|
38
37
|
decodedSize: roundEpsilon(entry.decodedBodySize)
|
|
39
38
|
};
|
|
40
|
-
}
|
|
41
|
-
start
|
|
39
|
+
},
|
|
40
|
+
start() {
|
|
42
41
|
var _performance$getEntri;
|
|
43
42
|
const performance = getPerformanceObject();
|
|
44
43
|
const PerformanceObserver = getPerformanceObserverObject();
|
|
@@ -56,15 +55,15 @@ export const resourceTimingBuffer = {
|
|
|
56
55
|
resourceTimingBuffer.observer.observe({
|
|
57
56
|
entryTypes: ['resource']
|
|
58
57
|
});
|
|
59
|
-
}
|
|
60
|
-
stop
|
|
58
|
+
},
|
|
59
|
+
stop() {
|
|
61
60
|
if (resourceTimingBuffer.observer) {
|
|
62
61
|
resourceTimingBuffer.observer.disconnect();
|
|
63
62
|
resourceTimingBuffer.observer = null;
|
|
64
63
|
}
|
|
65
64
|
resourceTimingBuffer.timings = [];
|
|
66
|
-
}
|
|
67
|
-
addTimings
|
|
65
|
+
},
|
|
66
|
+
addTimings(list) {
|
|
68
67
|
const entries = list.getEntries().map(entry => resourceTimingBuffer.transformResource(entry));
|
|
69
68
|
const overflow = resourceTimingBuffer.timings.length + entries.length;
|
|
70
69
|
if (overflow > resourceTimingBuffer.maxSize) {
|
|
@@ -72,12 +71,12 @@ export const resourceTimingBuffer = {
|
|
|
72
71
|
resourceTimingBuffer.timings.splice(0, fieldsToRemove);
|
|
73
72
|
}
|
|
74
73
|
resourceTimingBuffer.timings.push(...entries);
|
|
75
|
-
}
|
|
74
|
+
}
|
|
76
75
|
};
|
|
77
|
-
|
|
76
|
+
function isValidTiming(timing, startTime, endTime) {
|
|
78
77
|
return timing.startTime >= startTime && timing.startTime + timing.duration <= endTime;
|
|
79
|
-
}
|
|
80
|
-
export
|
|
78
|
+
}
|
|
79
|
+
export function filterResourceTimings(startTime, endTime) {
|
|
81
80
|
const performance = getPerformanceObject();
|
|
82
81
|
const PerformanceObserver = getPerformanceObserverObject();
|
|
83
82
|
if (!PerformanceObserver || !resourceTimingBuffer.observer) {
|
|
@@ -88,4 +87,4 @@ export const filterResourceTimings = withProfiling(function filterResourceTiming
|
|
|
88
87
|
return null;
|
|
89
88
|
}
|
|
90
89
|
return resourceTimingBuffer.timings.filter(timing => isValidTiming(timing, startTime, endTime));
|
|
91
|
-
}
|
|
90
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
2
|
import { getConfig as getConfigUFO } from '../config';
|
|
3
3
|
import { roundEpsilon } from '../round-number';
|
|
4
|
-
import { withProfiling } from '../self-measurements';
|
|
5
4
|
import { getConfig } from './common/utils/config';
|
|
6
5
|
import { filterResourceTimings } from './common/utils/resource-timing-buffer';
|
|
7
6
|
const alwaysCacheableTypes = ['script', 'link'];
|
|
@@ -9,7 +8,7 @@ const resourceTypes = ['fetch', 'xmlhttprequest'];
|
|
|
9
8
|
const CACHE_NETWORK = 'network';
|
|
10
9
|
const CACHE_MEMORY = 'memory';
|
|
11
10
|
const CACHE_DISK = 'disk';
|
|
12
|
-
|
|
11
|
+
function isCacheableType(url, type) {
|
|
13
12
|
if (alwaysCacheableTypes.includes(type)) {
|
|
14
13
|
return true;
|
|
15
14
|
}
|
|
@@ -17,10 +16,10 @@ const isCacheableType = withProfiling(function isCacheableType(url, type) {
|
|
|
17
16
|
return true;
|
|
18
17
|
}
|
|
19
18
|
return false;
|
|
20
|
-
}
|
|
19
|
+
}
|
|
21
20
|
|
|
22
21
|
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
23
|
-
|
|
22
|
+
function calculateTransferType(name, type, duration, size) {
|
|
24
23
|
if (!isCacheableType(name, type)) {
|
|
25
24
|
return CACHE_NETWORK;
|
|
26
25
|
}
|
|
@@ -34,14 +33,14 @@ const calculateTransferType = withProfiling(function calculateTransferType(name,
|
|
|
34
33
|
return null;
|
|
35
34
|
}
|
|
36
35
|
return CACHE_NETWORK;
|
|
37
|
-
}
|
|
38
|
-
|
|
36
|
+
}
|
|
37
|
+
function getWindowObject() {
|
|
39
38
|
return typeof window !== 'undefined' && !!window ? window : undefined;
|
|
40
|
-
}
|
|
41
|
-
|
|
39
|
+
}
|
|
40
|
+
function hasAccessToResourceSize(url, type, entry, hasTimingHeaders) {
|
|
42
41
|
return !isCacheableType(url, type) || url.includes('localhost') || !!getWindowObject() && url.includes(window.location.hostname) || hasTimingHeaders(url, entry);
|
|
43
|
-
}
|
|
44
|
-
|
|
42
|
+
}
|
|
43
|
+
function getReportedInitiatorTypes(xhrEnabled) {
|
|
45
44
|
const ufoConfig = getConfigUFO();
|
|
46
45
|
if (!(ufoConfig !== null && ufoConfig !== void 0 && ufoConfig.allowedResources)) {
|
|
47
46
|
if (xhrEnabled) {
|
|
@@ -50,18 +49,18 @@ const getReportedInitiatorTypes = withProfiling(function getReportedInitiatorTyp
|
|
|
50
49
|
return ['script', 'link', 'fetch', 'other'];
|
|
51
50
|
}
|
|
52
51
|
return ufoConfig.allowedResources;
|
|
53
|
-
}
|
|
54
|
-
|
|
52
|
+
}
|
|
53
|
+
function evaluateAccessToResourceTimings(url, entry) {
|
|
55
54
|
return !(entry.responseStart === 0 && entry.startTime > entry.responseStart);
|
|
56
|
-
}
|
|
55
|
+
}
|
|
57
56
|
|
|
58
57
|
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
59
|
-
|
|
58
|
+
function getSizeObject(size) {
|
|
60
59
|
return size !== undefined ? {
|
|
61
60
|
size
|
|
62
61
|
} : null;
|
|
63
|
-
}
|
|
64
|
-
|
|
62
|
+
}
|
|
63
|
+
function getNetworkData(item, eventStart, hasTimingHeaders = evaluateAccessToResourceTimings) {
|
|
65
64
|
const {
|
|
66
65
|
name,
|
|
67
66
|
duration,
|
|
@@ -98,8 +97,8 @@ const getNetworkData = withProfiling(function getNetworkData(item, eventStart, h
|
|
|
98
97
|
requestStart: fg('ufo_return_relative_request_start') ? requestStartRelative : requestStart,
|
|
99
98
|
...getSizeObject(transferSize)
|
|
100
99
|
};
|
|
101
|
-
}
|
|
102
|
-
export
|
|
100
|
+
}
|
|
101
|
+
export function getResourceTimings(interactionStart, interactionEnd) {
|
|
103
102
|
const resourceTiming = {};
|
|
104
103
|
if (interactionStart === null) {
|
|
105
104
|
return resourceTiming;
|
|
@@ -154,4 +153,4 @@ export const getResourceTimings = withProfiling(function getResourceTimings(inte
|
|
|
154
153
|
};
|
|
155
154
|
});
|
|
156
155
|
return resourceTiming;
|
|
157
|
-
}
|
|
156
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { withProfiling } from '../self-measurements';
|
|
2
1
|
import { resourceTimingBuffer } from './common/utils/resource-timing-buffer';
|
|
3
|
-
export
|
|
2
|
+
export function startResourceTimingBuffer() {
|
|
4
3
|
resourceTimingBuffer.start();
|
|
5
|
-
}
|
|
4
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export const roundEpsilon = withProfiling(function roundEpsilon(num, places = 3) {
|
|
1
|
+
export function roundEpsilon(num, places = 3) {
|
|
3
2
|
const factor = Math.pow(10, places);
|
|
4
3
|
return Math.round((num + Number.EPSILON) * factor) / factor;
|
|
5
|
-
}
|
|
4
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
const getUFORouteName = withProfiling(function getUFORouteName(route) {
|
|
1
|
+
function getUFORouteName(route) {
|
|
3
2
|
if (route.ufoName != null) {
|
|
4
3
|
return route.ufoName;
|
|
5
4
|
}
|
|
6
5
|
return route.name;
|
|
7
|
-
}
|
|
6
|
+
}
|
|
8
7
|
export default getUFORouteName;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
const scheduleOnPaint = withProfiling(function scheduleOnPaint(_callback) {
|
|
1
|
+
function scheduleOnPaint(callback) {
|
|
3
2
|
var _globalThis$document;
|
|
4
|
-
const callback = withProfiling(_callback);
|
|
5
3
|
if (((_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.visibilityState) !== 'visible') {
|
|
6
4
|
// last resort fallback
|
|
7
5
|
setTimeout(callback, 100);
|
|
@@ -28,5 +26,5 @@ const scheduleOnPaint = withProfiling(function scheduleOnPaint(_callback) {
|
|
|
28
26
|
});
|
|
29
27
|
});
|
|
30
28
|
}
|
|
31
|
-
}
|
|
29
|
+
}
|
|
32
30
|
export default scheduleOnPaint;
|
|
@@ -9,7 +9,6 @@ import UFOInteractionContext from '../interaction-context';
|
|
|
9
9
|
import UFOInteractionIDContext from '../interaction-id-context';
|
|
10
10
|
import { abortByNewInteraction, addApdex, addCustomData, addCustomTiming, addHold, addHoldByID, addMark, addNewInteraction, addProfilerTimings, addRequestInfo, addSegment, addSpan, removeHoldByID, removeSegment, tryComplete } from '../interaction-metrics';
|
|
11
11
|
import UFORouteName from '../route-name-context';
|
|
12
|
-
import { withProfiling } from '../self-measurements';
|
|
13
12
|
import generateId from '../short-id';
|
|
14
13
|
import scheduleOnPaint from './schedule-on-paint';
|
|
15
14
|
let tryCompleteHandle;
|
|
@@ -61,7 +60,7 @@ export default function UFOSegment({
|
|
|
61
60
|
const interactionId = useContext(UFOInteractionIDContext);
|
|
62
61
|
const interactionContext = useMemo(() => {
|
|
63
62
|
let lastCompleteEndTime = 0;
|
|
64
|
-
|
|
63
|
+
function complete(endTime = performance.now()) {
|
|
65
64
|
if (interactionId.current) {
|
|
66
65
|
if (parentContext) {
|
|
67
66
|
parentContext.complete();
|
|
@@ -74,7 +73,7 @@ export default function UFOSegment({
|
|
|
74
73
|
var _cancelAnimationFrame;
|
|
75
74
|
(_cancelAnimationFrame = cancelAnimationFrame) === null || _cancelAnimationFrame === void 0 ? void 0 : _cancelAnimationFrame(tryCompleteHandle);
|
|
76
75
|
}
|
|
77
|
-
const onComplete =
|
|
76
|
+
const onComplete = () => {
|
|
78
77
|
if (capturedInteractionId === interactionId.current) {
|
|
79
78
|
var _globalThis$document;
|
|
80
79
|
const isPageVisible = (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.visibilityState) === 'visible';
|
|
@@ -91,11 +90,11 @@ export default function UFOSegment({
|
|
|
91
90
|
tryComplete(interactionId.current, lastCompleteEndTime);
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
|
-
}
|
|
93
|
+
};
|
|
95
94
|
scheduleCallback(NormalPriority, onComplete);
|
|
96
95
|
}
|
|
97
96
|
}
|
|
98
|
-
}
|
|
97
|
+
}
|
|
99
98
|
function _internalHold(labelStack, name, experimental = false) {
|
|
100
99
|
if (interactionId.current != null) {
|
|
101
100
|
if (parentContext) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { addError, getActiveInteraction } from '../interaction-metrics';
|
|
2
|
-
|
|
3
|
-
export const setInteractionError = withProfiling(function setInteractionError(interactionName, error) {
|
|
2
|
+
export function setInteractionError(interactionName, error) {
|
|
4
3
|
const interaction = getActiveInteraction();
|
|
5
4
|
if (!interaction) {
|
|
6
5
|
return;
|
|
@@ -9,4 +8,4 @@ export const setInteractionError = withProfiling(function setInteractionError(in
|
|
|
9
8
|
return;
|
|
10
9
|
}
|
|
11
10
|
addError(interaction.id, error.name, null, 'Manual interaction error', error.errorMessage, undefined, true);
|
|
12
|
-
}
|
|
11
|
+
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
const generateId = withProfiling(function generateId(length = 7) {
|
|
1
|
+
function generateId(length = 7) {
|
|
3
2
|
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
4
3
|
let result = '';
|
|
5
4
|
for (let i = 0; i < length; i++) {
|
|
6
5
|
result += characters.charAt(Math.floor(Math.random() * characters.length));
|
|
7
6
|
}
|
|
8
7
|
return result;
|
|
9
|
-
}
|
|
8
|
+
}
|
|
10
9
|
export default generateId;
|
package/dist/es2019/ssr/index.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { withProfiling } from '../self-measurements';
|
|
2
1
|
const NESTED_METRIC_SEPARATOR = '/';
|
|
3
|
-
|
|
2
|
+
function filterEntry(entry) {
|
|
4
3
|
return !(!entry || typeof entry !== 'object' || entry.startTime < 0 || entry.duration < 0);
|
|
5
|
-
}
|
|
6
|
-
|
|
4
|
+
}
|
|
5
|
+
function mapEntry(entry) {
|
|
7
6
|
return {
|
|
8
7
|
startTime: Math.round(entry.startTime),
|
|
9
8
|
duration: Math.round(entry.duration)
|
|
10
9
|
};
|
|
11
|
-
}
|
|
10
|
+
}
|
|
12
11
|
const SSR_PREFIX = 'ssr';
|
|
13
|
-
|
|
12
|
+
function mapKey(key) {
|
|
14
13
|
if (key === 'total') {
|
|
15
14
|
return SSR_PREFIX;
|
|
16
15
|
}
|
|
17
16
|
return `${SSR_PREFIX}${NESTED_METRIC_SEPARATOR}${key}`;
|
|
18
|
-
}
|
|
17
|
+
}
|
|
19
18
|
let config;
|
|
20
|
-
export
|
|
19
|
+
export function configure(ssrConfig) {
|
|
21
20
|
config = ssrConfig;
|
|
22
|
-
}
|
|
23
|
-
export
|
|
21
|
+
}
|
|
22
|
+
export function getSSRTimings() {
|
|
24
23
|
var _config;
|
|
25
24
|
if (!((_config = config) !== null && _config !== void 0 && _config.getTimings)) {
|
|
26
25
|
return {};
|
|
@@ -36,16 +35,16 @@ export const getSSRTimings = withProfiling(function getSSRTimings() {
|
|
|
36
35
|
return acc;
|
|
37
36
|
}, {});
|
|
38
37
|
return ssrTimings;
|
|
39
|
-
}
|
|
40
|
-
export
|
|
38
|
+
}
|
|
39
|
+
export function getSSRSuccess() {
|
|
41
40
|
var _config2;
|
|
42
41
|
return !!((_config2 = config) !== null && _config2 !== void 0 && _config2.getDoneMark());
|
|
43
|
-
}
|
|
44
|
-
export
|
|
42
|
+
}
|
|
43
|
+
export function getSSRDoneTime() {
|
|
45
44
|
var _config$getDoneMark, _config3;
|
|
46
45
|
return (_config$getDoneMark = (_config3 = config) === null || _config3 === void 0 ? void 0 : _config3.getDoneMark()) !== null && _config$getDoneMark !== void 0 ? _config$getDoneMark : undefined;
|
|
47
|
-
}
|
|
48
|
-
export
|
|
46
|
+
}
|
|
47
|
+
export function getSSRFeatureFlags() {
|
|
49
48
|
var _config4;
|
|
50
49
|
if (!((_config4 = config) !== null && _config4 !== void 0 && _config4.getFeatureFlags)) {
|
|
51
50
|
return undefined;
|
|
@@ -56,4 +55,4 @@ export const getSSRFeatureFlags = withProfiling(function getSSRFeatureFlags() {
|
|
|
56
55
|
// eslint-disable-next-line no-empty
|
|
57
56
|
} catch (e) {}
|
|
58
57
|
return undefined;
|
|
59
|
-
}
|
|
58
|
+
}
|
|
@@ -4,8 +4,7 @@ import { getDoNotAbortActivePressInteraction, getInteractionRate } from '../conf
|
|
|
4
4
|
import { DefaultInteractionID } from '../interaction-id-context';
|
|
5
5
|
import { abortAll, addNewInteraction, getActiveInteraction } from '../interaction-metrics';
|
|
6
6
|
import UFORouteName from '../route-name-context';
|
|
7
|
-
|
|
8
|
-
const mapToInteractionType = withProfiling(function mapToInteractionType(eventType) {
|
|
7
|
+
function mapToInteractionType(eventType) {
|
|
9
8
|
if (eventType === 'click' || eventType === 'dblclick' || eventType === 'mousedown') {
|
|
10
9
|
return 'press';
|
|
11
10
|
}
|
|
@@ -13,8 +12,8 @@ const mapToInteractionType = withProfiling(function mapToInteractionType(eventTy
|
|
|
13
12
|
return 'hover';
|
|
14
13
|
}
|
|
15
14
|
return undefined;
|
|
16
|
-
}
|
|
17
|
-
|
|
15
|
+
}
|
|
16
|
+
function traceUFOInteraction(name, event) {
|
|
18
17
|
if (!event || !event.isTrusted) {
|
|
19
18
|
return;
|
|
20
19
|
}
|
|
@@ -39,5 +38,5 @@ const traceUFOInteraction = withProfiling(function traceUFOInteraction(name, eve
|
|
|
39
38
|
DefaultInteractionID.current = newId;
|
|
40
39
|
addNewInteraction(newId, name, 'press', startTimestamp, rate, [], UFORouteName.current);
|
|
41
40
|
}
|
|
42
|
-
}
|
|
41
|
+
}
|
|
43
42
|
export default traceUFOInteraction;
|
|
@@ -5,9 +5,8 @@ import { getActiveTrace } from '../experience-trace-id-context';
|
|
|
5
5
|
import { DefaultInteractionID } from '../interaction-id-context';
|
|
6
6
|
import { abort, addHoldByID, addNewInteraction, getActiveInteraction, removeHoldByID, updatePageLoadInteractionName } from '../interaction-metrics';
|
|
7
7
|
import UFORouteName from '../route-name-context';
|
|
8
|
-
import { withProfiling } from '../self-measurements';
|
|
9
8
|
const AWAITING_PAGELOAD_NAME = 'awaiting_pageload_name';
|
|
10
|
-
|
|
9
|
+
function traceUFOPageLoad(ufoName, routeName = ufoName) {
|
|
11
10
|
const activeInteraction = getActiveInteraction();
|
|
12
11
|
if (activeInteraction && !ufoName) {
|
|
13
12
|
return;
|
|
@@ -30,9 +29,9 @@ const traceUFOPageLoad = withProfiling(function traceUFOPageLoad(ufoName, routeN
|
|
|
30
29
|
updatePageLoadInteractionName(ufoName, routeName);
|
|
31
30
|
removeHoldByID(activeInteraction.id, AWAITING_PAGELOAD_NAME);
|
|
32
31
|
}
|
|
33
|
-
}
|
|
32
|
+
}
|
|
34
33
|
export default traceUFOPageLoad;
|
|
35
|
-
export
|
|
34
|
+
export function updatePageloadName(ufoName, routeName = ufoName) {
|
|
36
35
|
const interaction = getActiveInteraction();
|
|
37
36
|
if (!interaction || interaction.type !== 'page_load' && interaction.type !== 'transition') {
|
|
38
37
|
return;
|
|
@@ -47,4 +46,4 @@ export const updatePageloadName = withProfiling(function updatePageloadName(ufoN
|
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
48
|
removeHoldByID(interaction.id, AWAITING_PAGELOAD_NAME);
|
|
50
|
-
}
|
|
49
|
+
}
|
|
@@ -5,8 +5,7 @@ import { getActiveTrace, setInteractionActiveTrace } from '../experience-trace-i
|
|
|
5
5
|
import { DefaultInteractionID } from '../interaction-id-context';
|
|
6
6
|
import { abortAll, addNewInteraction, getActiveInteraction } from '../interaction-metrics';
|
|
7
7
|
import UFORouteName from '../route-name-context';
|
|
8
|
-
|
|
9
|
-
const traceUFOPress = withProfiling(function traceUFOPress(name, timestamp) {
|
|
8
|
+
function traceUFOPress(name, timestamp) {
|
|
10
9
|
const rate = getInteractionRate(name, 'press');
|
|
11
10
|
const pressInteractionsList = getDoNotAbortActivePressInteraction();
|
|
12
11
|
if (pressInteractionsList !== null && pressInteractionsList !== void 0 && pressInteractionsList.includes(name)) {
|
|
@@ -25,5 +24,5 @@ const traceUFOPress = withProfiling(function traceUFOPress(name, timestamp) {
|
|
|
25
24
|
DefaultInteractionID.current = newId;
|
|
26
25
|
addNewInteraction(newId, name, 'press', startTimestamp, rate, [], UFORouteName.current, getActiveTrace());
|
|
27
26
|
}
|
|
28
|
-
}
|
|
27
|
+
}
|
|
29
28
|
export default traceUFOPress;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { DefaultInteractionID } from '../interaction-id-context';
|
|
2
2
|
import { addRedirect } from '../interaction-metrics';
|
|
3
3
|
import UFORouteName from '../route-name-context';
|
|
4
|
-
|
|
5
|
-
const traceUFORedirect = withProfiling(function traceUFORedirect(fromUfoName, nextUfoName, nextRouteName, time) {
|
|
4
|
+
function traceUFORedirect(fromUfoName, nextUfoName, nextRouteName, time) {
|
|
6
5
|
UFORouteName.current = nextUfoName;
|
|
7
6
|
const interactionId = DefaultInteractionID.current;
|
|
8
7
|
if (interactionId) {
|
|
9
8
|
addRedirect(interactionId, fromUfoName, nextUfoName, nextRouteName, time);
|
|
10
9
|
}
|
|
11
|
-
}
|
|
10
|
+
}
|
|
12
11
|
export default traceUFORedirect;
|
|
@@ -6,9 +6,8 @@ import { getActiveTrace } from '../experience-trace-id-context';
|
|
|
6
6
|
import UFOInteractionIDContext, { DefaultInteractionID } from '../interaction-id-context';
|
|
7
7
|
import { abortAll, addNewInteraction, addOnCancelCallback, getActiveInteraction, tryComplete } from '../interaction-metrics';
|
|
8
8
|
import UFORouteName from '../route-name-context';
|
|
9
|
-
import { withProfiling } from '../self-measurements';
|
|
10
9
|
import { setInteractionActiveTrace } from './utils/set-interaction-active-trace';
|
|
11
|
-
|
|
10
|
+
function traceUFOTransition(ufoName, routeName = ufoName) {
|
|
12
11
|
const pressInteractionsList = getDoNotAbortActivePressInteractionOnTransition();
|
|
13
12
|
const interaction = getActiveInteraction();
|
|
14
13
|
if (pressInteractionsList && interaction) {
|
|
@@ -27,7 +26,7 @@ const traceUFOTransition = withProfiling(function traceUFOTransition(ufoName, ro
|
|
|
27
26
|
addNewInteraction(newId, ufoName, 'transition', performance.now(), rate, null, routeName, getActiveTrace());
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
|
-
}
|
|
29
|
+
}
|
|
31
30
|
export function useUFOTransitionCompleter() {
|
|
32
31
|
const interactionId = useContext(UFOInteractionIDContext);
|
|
33
32
|
const capturedInteractionId = interactionId.current;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export const generateSpanId = withProfiling(function generateSpanId() {
|
|
1
|
+
export function generateSpanId() {
|
|
3
2
|
return Array.from(new Array(16), () => Math.floor(Math.random() * 16).toString(16)).join('');
|
|
4
|
-
}
|
|
3
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { setActiveTrace } from '../../../experience-trace-id-context';
|
|
2
|
-
import { withProfiling } from '../../../self-measurements';
|
|
3
2
|
import { generateSpanId } from '../generate-span-id';
|
|
4
|
-
export
|
|
3
|
+
export function setInteractionActiveTrace(newId) {
|
|
5
4
|
setActiveTrace(newId.replace(/-/g, ''), generateSpanId(), 'transition');
|
|
6
|
-
}
|
|
5
|
+
}
|
package/dist/es2019/vc/index.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
var _process, _process$env;
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
3
|
import { getConfig } from '../config';
|
|
4
|
-
import { markProfilingEnd, markProfilingStart, withProfiling } from '../self-measurements';
|
|
5
4
|
import { VCObserverNOOP } from './no-op-vc-observer';
|
|
6
5
|
import { VCObserver } from './vc-observer';
|
|
7
6
|
import VCObserverNew from './vc-observer-new';
|
|
8
7
|
class VCObserverWrapper {
|
|
9
8
|
constructor(opts = {}) {
|
|
10
9
|
var _getConfig, _getConfig$vc;
|
|
11
|
-
const operationTimer = markProfilingStart('VCObserverWrapper constructor');
|
|
12
10
|
this.newVCObserver = null;
|
|
13
11
|
const isNewVCObserverEnabled = fg('platform_ufo_vc_observer_new') || ((_getConfig = getConfig()) === null || _getConfig === void 0 ? void 0 : (_getConfig$vc = _getConfig.vc) === null || _getConfig$vc === void 0 ? void 0 : _getConfig$vc.enableVCObserverNew);
|
|
14
12
|
if (isNewVCObserverEnabled) {
|
|
@@ -17,16 +15,6 @@ class VCObserverWrapper {
|
|
|
17
15
|
});
|
|
18
16
|
}
|
|
19
17
|
this.oldVCObserver = new VCObserver(opts);
|
|
20
|
-
this.start = withProfiling(this.start.bind(this), ['vc']);
|
|
21
|
-
this.stop = withProfiling(this.stop.bind(this), ['vc']);
|
|
22
|
-
this.getVCRawData = withProfiling(this.getVCRawData.bind(this), ['vc']);
|
|
23
|
-
this.getVCResult = withProfiling(this.getVCResult.bind(this), ['vc']);
|
|
24
|
-
this.setSSRElement = withProfiling(this.setSSRElement.bind(this), ['vc']);
|
|
25
|
-
this.setReactRootRenderStart = withProfiling(this.setReactRootRenderStart.bind(this), ['vc']);
|
|
26
|
-
this.setReactRootRenderStop = withProfiling(this.setReactRootRenderStop.bind(this), ['vc']);
|
|
27
|
-
markProfilingEnd(operationTimer, {
|
|
28
|
-
tags: ['vc']
|
|
29
|
-
});
|
|
30
18
|
}
|
|
31
19
|
start(startArg) {
|
|
32
20
|
var _this$oldVCObserver, _this$newVCObserver;
|
|
@@ -77,7 +65,7 @@ class VCObserverWrapper {
|
|
|
77
65
|
let isServer = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.__SERVER__);
|
|
78
66
|
// Other products set this other variable to indicate it is running in SSR
|
|
79
67
|
let isReactSSR = typeof process !== 'undefined' && Boolean(((_process = process) === null || _process === void 0 ? void 0 : (_process$env = _process.env) === null || _process$env === void 0 ? void 0 : _process$env.REACT_SSR) || false);
|
|
80
|
-
export
|
|
68
|
+
export function isEnvironmentSupported() {
|
|
81
69
|
// SSR environment aren't supported
|
|
82
70
|
if (isReactSSR || isServer) {
|
|
83
71
|
return false;
|
|
@@ -92,11 +80,11 @@ export const isEnvironmentSupported = withProfiling(function isEnvironmentSuppor
|
|
|
92
80
|
return false;
|
|
93
81
|
}
|
|
94
82
|
return true;
|
|
95
|
-
}
|
|
96
|
-
export
|
|
83
|
+
}
|
|
84
|
+
export function getVCObserver(opts = {}) {
|
|
97
85
|
if (!globalThis.__vcObserver) {
|
|
98
86
|
const shouldMockVCObserver = !isEnvironmentSupported();
|
|
99
87
|
globalThis.__vcObserver = shouldMockVCObserver ? new VCObserverNOOP() : new VCObserverWrapper(opts);
|
|
100
88
|
}
|
|
101
89
|
return globalThis.__vcObserver;
|
|
102
|
-
}
|
|
90
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { bind } from 'bind-event-listener';
|
|
2
2
|
import { AbortEvent } from '../../common/vc/types';
|
|
3
|
-
import { withProfiling } from '../../self-measurements';
|
|
4
3
|
import { getViewportHeight, getViewportWidth } from './getViewport';
|
|
5
|
-
export
|
|
4
|
+
export function attachAbortListeners(window, initialViewPort, callback) {
|
|
6
5
|
const unbindWheel = bind(window, {
|
|
7
6
|
type: AbortEvent.wheel,
|
|
8
7
|
listener: e => {
|
|
@@ -32,4 +31,4 @@ export const attachAbortListeners = withProfiling(function attachAbortListeners(
|
|
|
32
31
|
}
|
|
33
32
|
});
|
|
34
33
|
return [unbindWheel, unbindKeydown, unbindResize];
|
|
35
|
-
}
|
|
34
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
2
|
import { getPageVisibilityState } from '../../hidden-timing';
|
|
3
|
-
import { withProfiling } from '../../self-measurements';
|
|
4
3
|
import { getRevisions } from './revisions/revisions';
|
|
5
4
|
const VCParts = ['25', '50', '75', '80', '85', '90', '95', '98', '99'];
|
|
6
5
|
const READONLY_EMPTY_ARRAY = Array.from({
|
|
@@ -8,7 +7,7 @@ const READONLY_EMPTY_ARRAY = Array.from({
|
|
|
8
7
|
});
|
|
9
8
|
|
|
10
9
|
// Helper function to create vcDetails object to avoid code duplication
|
|
11
|
-
|
|
10
|
+
function createVCDetails(calculatedVC, shouldHaveVCmetric) {
|
|
12
11
|
if (!shouldHaveVCmetric || !calculatedVC || !calculatedVC.VC || !calculatedVC.VCBox) {
|
|
13
12
|
return {};
|
|
14
13
|
}
|
|
@@ -25,10 +24,10 @@ const createVCDetails = withProfiling(function createVCDetails(calculatedVC, sho
|
|
|
25
24
|
};
|
|
26
25
|
}
|
|
27
26
|
return details;
|
|
28
|
-
}
|
|
27
|
+
}
|
|
29
28
|
|
|
30
29
|
// Optimized implementation (current one)
|
|
31
|
-
export
|
|
30
|
+
export function getVCRevisionsData({
|
|
32
31
|
fullPrefix,
|
|
33
32
|
interaction,
|
|
34
33
|
isVCClean,
|
|
@@ -88,4 +87,4 @@ export const getVCRevisionsData = withProfiling(function getVCRevisionsData({
|
|
|
88
87
|
return {
|
|
89
88
|
[`${fullPrefix}vc:rev`]: [ttvcV1Revision, ttvcV2Revision]
|
|
90
89
|
};
|
|
91
|
-
}
|
|
90
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export const getViewportWidth = withProfiling(function getViewportWidth(document = window.document) {
|
|
1
|
+
export function getViewportWidth(document = window.document) {
|
|
3
2
|
let documentWidth;
|
|
4
3
|
try {
|
|
5
4
|
documentWidth = document.documentElement.clientWidth || 0;
|
|
@@ -7,8 +6,8 @@ export const getViewportWidth = withProfiling(function getViewportWidth(document
|
|
|
7
6
|
documentWidth = 0;
|
|
8
7
|
}
|
|
9
8
|
return Math.max(documentWidth, window.innerWidth || 0);
|
|
10
|
-
}
|
|
11
|
-
export
|
|
9
|
+
}
|
|
10
|
+
export function getViewportHeight(document = window.document) {
|
|
12
11
|
let documentHeight;
|
|
13
12
|
try {
|
|
14
13
|
documentHeight = document.documentElement.clientHeight || 0;
|
|
@@ -16,4 +15,4 @@ export const getViewportHeight = withProfiling(function getViewportHeight(docume
|
|
|
16
15
|
documentHeight = 0;
|
|
17
16
|
}
|
|
18
17
|
return Math.max(documentHeight, window.innerHeight || 0);
|
|
19
|
-
}
|
|
18
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { getPageVisibilityState } from '../../../hidden-timing';
|
|
3
|
-
import { markProfilingEnd, markProfilingStart, withProfiling } from '../../../self-measurements';
|
|
4
3
|
const UNUSED_SECTOR = 0;
|
|
5
4
|
export class MultiRevisionHeatmap {
|
|
6
5
|
constructor({
|
|
@@ -41,7 +40,6 @@ export class MultiRevisionHeatmap {
|
|
|
41
40
|
} = mappedValues;
|
|
42
41
|
return (r - l) * (b - t) / (this.arraySize.w * this.arraySize.h);
|
|
43
42
|
});
|
|
44
|
-
const operationTimer = markProfilingStart('MultiRevisionHeatmap constructor');
|
|
45
43
|
this.viewport = viewport;
|
|
46
44
|
this.revisions = revisions;
|
|
47
45
|
if (arraySize) {
|
|
@@ -56,16 +54,6 @@ export class MultiRevisionHeatmap {
|
|
|
56
54
|
this.componentsLogs[i] = {};
|
|
57
55
|
this.vcRatios[i] = {};
|
|
58
56
|
});
|
|
59
|
-
this.handleUpdate = withProfiling(this.handleUpdate.bind(this), ['vc']);
|
|
60
|
-
this.getData = withProfiling(this.getData.bind(this), ['vc']);
|
|
61
|
-
this.getPayloadShapedData = withProfiling(this.getPayloadShapedData.bind(this), ['vc']);
|
|
62
|
-
this.processData = withProfiling(this.processData.bind(this), ['vc']);
|
|
63
|
-
this.mapPixelsToHeatmap = withProfiling(this.mapPixelsToHeatmap.bind(this), ['vc']);
|
|
64
|
-
this.getElementRatio = withProfiling(this.getElementRatio.bind(this), ['vc']);
|
|
65
|
-
this.applyChangesToHeatMap = withProfiling(this.applyChangesToHeatMap.bind(this), ['vc']);
|
|
66
|
-
this.getIndex = withProfiling(this.getIndex.bind(this), ['vc']);
|
|
67
|
-
this.getCleanHeatmap = withProfiling(this.getCleanHeatmap.bind(this), ['vc']);
|
|
68
|
-
markProfilingEnd(operationTimer);
|
|
69
57
|
}
|
|
70
58
|
handleUpdate({
|
|
71
59
|
time,
|
|
@@ -249,11 +237,11 @@ export class MultiRevisionHeatmap {
|
|
|
249
237
|
getCleanHeatmap() {
|
|
250
238
|
return new Int32Array(this.arraySize.w * this.arraySize.h);
|
|
251
239
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}
|
|
240
|
+
static makeVCReturnObj(VCParts) {
|
|
241
|
+
const vc = {};
|
|
242
|
+
VCParts.forEach(v => {
|
|
243
|
+
vc[v] = null;
|
|
244
|
+
});
|
|
245
|
+
return vc;
|
|
246
|
+
}
|
|
247
|
+
}
|