@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
|
@@ -3,13 +3,12 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol
|
|
|
3
3
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
4
4
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
5
5
|
import { getConfig as getConfigUFO } from '../../../config';
|
|
6
|
-
import { withProfiling } from '../../../self-measurements';
|
|
7
6
|
var defaultAllowedParams = ['operationName', 'operation', 'q'];
|
|
8
|
-
|
|
7
|
+
function getAllowedParams() {
|
|
9
8
|
var config = getConfigUFO();
|
|
10
9
|
return (config === null || config === void 0 ? void 0 : config.allowedResourcesParams) || defaultAllowedParams;
|
|
11
|
-
}
|
|
12
|
-
|
|
10
|
+
}
|
|
11
|
+
function handleQueryParams(urlString) {
|
|
13
12
|
try {
|
|
14
13
|
if (typeof urlString !== 'string') {
|
|
15
14
|
return urlString;
|
|
@@ -36,7 +35,7 @@ var handleQueryParams = withProfiling(function handleQueryParams(urlString) {
|
|
|
36
35
|
} catch (e) {
|
|
37
36
|
return urlString;
|
|
38
37
|
}
|
|
39
|
-
}
|
|
38
|
+
}
|
|
40
39
|
var config = {
|
|
41
40
|
mapResources: function mapResources(url) {
|
|
42
41
|
return url;
|
|
@@ -45,7 +44,7 @@ var config = {
|
|
|
45
44
|
return handleQueryParams(url);
|
|
46
45
|
}
|
|
47
46
|
};
|
|
48
|
-
export
|
|
47
|
+
export function configure(resourceTimingConfig) {
|
|
49
48
|
var newConfig = {
|
|
50
49
|
mapResources: resourceTimingConfig.mapResources,
|
|
51
50
|
sanitiseEndpoints: function sanitiseEndpoints(url) {
|
|
@@ -57,7 +56,7 @@ export var configure = withProfiling(function configure(resourceTimingConfig) {
|
|
|
57
56
|
}
|
|
58
57
|
};
|
|
59
58
|
config = newConfig;
|
|
60
|
-
}
|
|
61
|
-
export
|
|
59
|
+
}
|
|
60
|
+
export function getConfig() {
|
|
62
61
|
return config;
|
|
63
|
-
}
|
|
62
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import { roundEpsilon } from '../../../round-number';
|
|
3
|
-
import { withProfiling } from '../../../self-measurements';
|
|
4
3
|
var getPerformanceObject = function getPerformanceObject() {
|
|
5
4
|
var _window;
|
|
6
5
|
return ((_window = window) !== null && _window !== void 0 ? _window : {}).performance;
|
|
@@ -13,7 +12,7 @@ export var resourceTimingBuffer = {
|
|
|
13
12
|
timings: [],
|
|
14
13
|
maxSize: 1000,
|
|
15
14
|
observer: null,
|
|
16
|
-
transformResource:
|
|
15
|
+
transformResource: function transformResource(entry) {
|
|
17
16
|
var _entry$serverTiming, _entry$serverTiming2;
|
|
18
17
|
var duration = roundEpsilon(entry.duration);
|
|
19
18
|
|
|
@@ -42,8 +41,8 @@ export var resourceTimingBuffer = {
|
|
|
42
41
|
encodedSize: roundEpsilon(entry.encodedBodySize),
|
|
43
42
|
decodedSize: roundEpsilon(entry.decodedBodySize)
|
|
44
43
|
};
|
|
45
|
-
}
|
|
46
|
-
start:
|
|
44
|
+
},
|
|
45
|
+
start: function start() {
|
|
47
46
|
var _performance$getEntri;
|
|
48
47
|
var performance = getPerformanceObject();
|
|
49
48
|
var PerformanceObserver = getPerformanceObserverObject();
|
|
@@ -63,15 +62,15 @@ export var resourceTimingBuffer = {
|
|
|
63
62
|
resourceTimingBuffer.observer.observe({
|
|
64
63
|
entryTypes: ['resource']
|
|
65
64
|
});
|
|
66
|
-
}
|
|
67
|
-
stop:
|
|
65
|
+
},
|
|
66
|
+
stop: function stop() {
|
|
68
67
|
if (resourceTimingBuffer.observer) {
|
|
69
68
|
resourceTimingBuffer.observer.disconnect();
|
|
70
69
|
resourceTimingBuffer.observer = null;
|
|
71
70
|
}
|
|
72
71
|
resourceTimingBuffer.timings = [];
|
|
73
|
-
}
|
|
74
|
-
addTimings:
|
|
72
|
+
},
|
|
73
|
+
addTimings: function addTimings(list) {
|
|
75
74
|
var _resourceTimingBuffer;
|
|
76
75
|
var entries = list.getEntries().map(function (entry) {
|
|
77
76
|
return resourceTimingBuffer.transformResource(entry);
|
|
@@ -82,12 +81,12 @@ export var resourceTimingBuffer = {
|
|
|
82
81
|
resourceTimingBuffer.timings.splice(0, fieldsToRemove);
|
|
83
82
|
}
|
|
84
83
|
(_resourceTimingBuffer = resourceTimingBuffer.timings).push.apply(_resourceTimingBuffer, _toConsumableArray(entries));
|
|
85
|
-
}
|
|
84
|
+
}
|
|
86
85
|
};
|
|
87
|
-
|
|
86
|
+
function isValidTiming(timing, startTime, endTime) {
|
|
88
87
|
return timing.startTime >= startTime && timing.startTime + timing.duration <= endTime;
|
|
89
|
-
}
|
|
90
|
-
export
|
|
88
|
+
}
|
|
89
|
+
export function filterResourceTimings(startTime, endTime) {
|
|
91
90
|
var performance = getPerformanceObject();
|
|
92
91
|
var PerformanceObserver = getPerformanceObserverObject();
|
|
93
92
|
if (!PerformanceObserver || !resourceTimingBuffer.observer) {
|
|
@@ -102,4 +101,4 @@ export var filterResourceTimings = withProfiling(function filterResourceTimings(
|
|
|
102
101
|
return resourceTimingBuffer.timings.filter(function (timing) {
|
|
103
102
|
return isValidTiming(timing, startTime, endTime);
|
|
104
103
|
});
|
|
105
|
-
}
|
|
104
|
+
}
|
|
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
5
|
import { getConfig as getConfigUFO } from '../config';
|
|
6
6
|
import { roundEpsilon } from '../round-number';
|
|
7
|
-
import { withProfiling } from '../self-measurements';
|
|
8
7
|
import { getConfig } from './common/utils/config';
|
|
9
8
|
import { filterResourceTimings } from './common/utils/resource-timing-buffer';
|
|
10
9
|
var alwaysCacheableTypes = ['script', 'link'];
|
|
@@ -12,7 +11,7 @@ var resourceTypes = ['fetch', 'xmlhttprequest'];
|
|
|
12
11
|
var CACHE_NETWORK = 'network';
|
|
13
12
|
var CACHE_MEMORY = 'memory';
|
|
14
13
|
var CACHE_DISK = 'disk';
|
|
15
|
-
|
|
14
|
+
function isCacheableType(url, type) {
|
|
16
15
|
if (alwaysCacheableTypes.includes(type)) {
|
|
17
16
|
return true;
|
|
18
17
|
}
|
|
@@ -20,10 +19,10 @@ var isCacheableType = withProfiling(function isCacheableType(url, type) {
|
|
|
20
19
|
return true;
|
|
21
20
|
}
|
|
22
21
|
return false;
|
|
23
|
-
}
|
|
22
|
+
}
|
|
24
23
|
|
|
25
24
|
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
26
|
-
|
|
25
|
+
function calculateTransferType(name, type, duration, size) {
|
|
27
26
|
if (!isCacheableType(name, type)) {
|
|
28
27
|
return CACHE_NETWORK;
|
|
29
28
|
}
|
|
@@ -37,14 +36,14 @@ var calculateTransferType = withProfiling(function calculateTransferType(name, t
|
|
|
37
36
|
return null;
|
|
38
37
|
}
|
|
39
38
|
return CACHE_NETWORK;
|
|
40
|
-
}
|
|
41
|
-
|
|
39
|
+
}
|
|
40
|
+
function getWindowObject() {
|
|
42
41
|
return typeof window !== 'undefined' && !!window ? window : undefined;
|
|
43
|
-
}
|
|
44
|
-
|
|
42
|
+
}
|
|
43
|
+
function hasAccessToResourceSize(url, type, entry, hasTimingHeaders) {
|
|
45
44
|
return !isCacheableType(url, type) || url.includes('localhost') || !!getWindowObject() && url.includes(window.location.hostname) || hasTimingHeaders(url, entry);
|
|
46
|
-
}
|
|
47
|
-
|
|
45
|
+
}
|
|
46
|
+
function getReportedInitiatorTypes(xhrEnabled) {
|
|
48
47
|
var ufoConfig = getConfigUFO();
|
|
49
48
|
if (!(ufoConfig !== null && ufoConfig !== void 0 && ufoConfig.allowedResources)) {
|
|
50
49
|
if (xhrEnabled) {
|
|
@@ -53,18 +52,18 @@ var getReportedInitiatorTypes = withProfiling(function getReportedInitiatorTypes
|
|
|
53
52
|
return ['script', 'link', 'fetch', 'other'];
|
|
54
53
|
}
|
|
55
54
|
return ufoConfig.allowedResources;
|
|
56
|
-
}
|
|
57
|
-
|
|
55
|
+
}
|
|
56
|
+
function evaluateAccessToResourceTimings(url, entry) {
|
|
58
57
|
return !(entry.responseStart === 0 && entry.startTime > entry.responseStart);
|
|
59
|
-
}
|
|
58
|
+
}
|
|
60
59
|
|
|
61
60
|
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
|
|
62
|
-
|
|
61
|
+
function getSizeObject(size) {
|
|
63
62
|
return size !== undefined ? {
|
|
64
63
|
size: size
|
|
65
64
|
} : null;
|
|
66
|
-
}
|
|
67
|
-
|
|
65
|
+
}
|
|
66
|
+
function getNetworkData(item, eventStart) {
|
|
68
67
|
var hasTimingHeaders = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : evaluateAccessToResourceTimings;
|
|
69
68
|
var name = item.name,
|
|
70
69
|
duration = item.duration,
|
|
@@ -98,8 +97,8 @@ var getNetworkData = withProfiling(function getNetworkData(item, eventStart) {
|
|
|
98
97
|
networkTime: networkTime,
|
|
99
98
|
requestStart: fg('ufo_return_relative_request_start') ? requestStartRelative : requestStart
|
|
100
99
|
}, getSizeObject(transferSize));
|
|
101
|
-
}
|
|
102
|
-
export
|
|
100
|
+
}
|
|
101
|
+
export function getResourceTimings(interactionStart, interactionEnd) {
|
|
103
102
|
var resourceTiming = {};
|
|
104
103
|
if (interactionStart === null) {
|
|
105
104
|
return resourceTiming;
|
|
@@ -150,4 +149,4 @@ export var getResourceTimings = withProfiling(function getResourceTimings(intera
|
|
|
150
149
|
}, getNetworkData(item, interactionStart, hasTimingHeaders));
|
|
151
150
|
});
|
|
152
151
|
return resourceTiming;
|
|
153
|
-
}
|
|
152
|
+
}
|
|
@@ -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,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export var roundEpsilon = withProfiling(function roundEpsilon(num) {
|
|
1
|
+
export function roundEpsilon(num) {
|
|
3
2
|
var places = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;
|
|
4
3
|
var factor = Math.pow(10, places);
|
|
5
4
|
return Math.round((num + Number.EPSILON) * factor) / factor;
|
|
6
|
-
}
|
|
5
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
var 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
|
-
var scheduleOnPaint = withProfiling(function scheduleOnPaint(_callback) {
|
|
1
|
+
function scheduleOnPaint(callback) {
|
|
3
2
|
var _globalThis$document;
|
|
4
|
-
var 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 @@ var scheduleOnPaint = withProfiling(function scheduleOnPaint(_callback) {
|
|
|
28
26
|
});
|
|
29
27
|
});
|
|
30
28
|
}
|
|
31
|
-
}
|
|
29
|
+
}
|
|
32
30
|
export default scheduleOnPaint;
|
|
@@ -13,7 +13,6 @@ import UFOInteractionContext from '../interaction-context';
|
|
|
13
13
|
import UFOInteractionIDContext from '../interaction-id-context';
|
|
14
14
|
import { abortByNewInteraction, addApdex as _addApdex, addCustomData as _addCustomData, addCustomTiming, addHold, addHoldByID, addMark as _addMark, addNewInteraction, addProfilerTimings, addRequestInfo, addSegment, addSpan, removeHoldByID, removeSegment, tryComplete } from '../interaction-metrics';
|
|
15
15
|
import UFORouteName from '../route-name-context';
|
|
16
|
-
import { withProfiling } from '../self-measurements';
|
|
17
16
|
import generateId from '../short-id';
|
|
18
17
|
import scheduleOnPaint from './schedule-on-paint';
|
|
19
18
|
var tryCompleteHandle;
|
|
@@ -71,7 +70,7 @@ export default function UFOSegment(_ref) {
|
|
|
71
70
|
var interactionId = useContext(UFOInteractionIDContext);
|
|
72
71
|
var interactionContext = useMemo(function () {
|
|
73
72
|
var lastCompleteEndTime = 0;
|
|
74
|
-
|
|
73
|
+
function complete() {
|
|
75
74
|
var endTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : performance.now();
|
|
76
75
|
if (interactionId.current) {
|
|
77
76
|
if (parentContext) {
|
|
@@ -85,7 +84,7 @@ export default function UFOSegment(_ref) {
|
|
|
85
84
|
var _cancelAnimationFrame;
|
|
86
85
|
(_cancelAnimationFrame = cancelAnimationFrame) === null || _cancelAnimationFrame === void 0 || _cancelAnimationFrame(tryCompleteHandle);
|
|
87
86
|
}
|
|
88
|
-
var onComplete =
|
|
87
|
+
var onComplete = function onComplete() {
|
|
89
88
|
if (capturedInteractionId === interactionId.current) {
|
|
90
89
|
var _globalThis$document;
|
|
91
90
|
var isPageVisible = (globalThis === null || globalThis === void 0 || (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.visibilityState) === 'visible';
|
|
@@ -102,11 +101,11 @@ export default function UFOSegment(_ref) {
|
|
|
102
101
|
tryComplete(interactionId.current, lastCompleteEndTime);
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
|
-
}
|
|
104
|
+
};
|
|
106
105
|
scheduleCallback(NormalPriority, onComplete);
|
|
107
106
|
}
|
|
108
107
|
}
|
|
109
|
-
}
|
|
108
|
+
}
|
|
110
109
|
function _internalHold(labelStack, name) {
|
|
111
110
|
var experimental = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
112
111
|
if (interactionId.current != null) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { addError, getActiveInteraction } from '../interaction-metrics';
|
|
2
|
-
|
|
3
|
-
export var setInteractionError = withProfiling(function setInteractionError(interactionName, error) {
|
|
2
|
+
export function setInteractionError(interactionName, error) {
|
|
4
3
|
var interaction = getActiveInteraction();
|
|
5
4
|
if (!interaction) {
|
|
6
5
|
return;
|
|
@@ -9,4 +8,4 @@ export var setInteractionError = withProfiling(function setInteractionError(inte
|
|
|
9
8
|
return;
|
|
10
9
|
}
|
|
11
10
|
addError(interaction.id, error.name, null, 'Manual interaction error', error.errorMessage, undefined, true);
|
|
12
|
-
}
|
|
11
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var generateId = withProfiling(function generateId() {
|
|
1
|
+
function generateId() {
|
|
3
2
|
var length = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 7;
|
|
4
3
|
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
5
4
|
var result = '';
|
|
@@ -7,5 +6,5 @@ var generateId = withProfiling(function generateId() {
|
|
|
7
6
|
result += characters.charAt(Math.floor(Math.random() * characters.length));
|
|
8
7
|
}
|
|
9
8
|
return result;
|
|
10
|
-
}
|
|
9
|
+
}
|
|
11
10
|
export default generateId;
|
package/dist/esm/ssr/index.js
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
-
import { withProfiling } from '../self-measurements';
|
|
3
2
|
var NESTED_METRIC_SEPARATOR = '/';
|
|
4
|
-
|
|
3
|
+
function filterEntry(entry) {
|
|
5
4
|
return !(!entry || _typeof(entry) !== 'object' || entry.startTime < 0 || entry.duration < 0);
|
|
6
|
-
}
|
|
7
|
-
|
|
5
|
+
}
|
|
6
|
+
function mapEntry(entry) {
|
|
8
7
|
return {
|
|
9
8
|
startTime: Math.round(entry.startTime),
|
|
10
9
|
duration: Math.round(entry.duration)
|
|
11
10
|
};
|
|
12
|
-
}
|
|
11
|
+
}
|
|
13
12
|
var SSR_PREFIX = 'ssr';
|
|
14
|
-
|
|
13
|
+
function mapKey(key) {
|
|
15
14
|
if (key === 'total') {
|
|
16
15
|
return SSR_PREFIX;
|
|
17
16
|
}
|
|
18
17
|
return "".concat(SSR_PREFIX).concat(NESTED_METRIC_SEPARATOR).concat(key);
|
|
19
|
-
}
|
|
18
|
+
}
|
|
20
19
|
var config;
|
|
21
|
-
export
|
|
20
|
+
export function configure(ssrConfig) {
|
|
22
21
|
config = ssrConfig;
|
|
23
|
-
}
|
|
24
|
-
export
|
|
22
|
+
}
|
|
23
|
+
export function getSSRTimings() {
|
|
25
24
|
var _config;
|
|
26
25
|
if (!((_config = config) !== null && _config !== void 0 && _config.getTimings)) {
|
|
27
26
|
return {};
|
|
@@ -37,16 +36,16 @@ export var getSSRTimings = withProfiling(function getSSRTimings() {
|
|
|
37
36
|
return acc;
|
|
38
37
|
}, {});
|
|
39
38
|
return ssrTimings;
|
|
40
|
-
}
|
|
41
|
-
export
|
|
39
|
+
}
|
|
40
|
+
export function getSSRSuccess() {
|
|
42
41
|
var _config2;
|
|
43
42
|
return !!((_config2 = config) !== null && _config2 !== void 0 && _config2.getDoneMark());
|
|
44
|
-
}
|
|
45
|
-
export
|
|
43
|
+
}
|
|
44
|
+
export function getSSRDoneTime() {
|
|
46
45
|
var _config$getDoneMark, _config3;
|
|
47
46
|
return (_config$getDoneMark = (_config3 = config) === null || _config3 === void 0 ? void 0 : _config3.getDoneMark()) !== null && _config$getDoneMark !== void 0 ? _config$getDoneMark : undefined;
|
|
48
|
-
}
|
|
49
|
-
export
|
|
47
|
+
}
|
|
48
|
+
export function getSSRFeatureFlags() {
|
|
50
49
|
var _config4;
|
|
51
50
|
if (!((_config4 = config) !== null && _config4 !== void 0 && _config4.getFeatureFlags)) {
|
|
52
51
|
return undefined;
|
|
@@ -57,4 +56,4 @@ export var getSSRFeatureFlags = withProfiling(function getSSRFeatureFlags() {
|
|
|
57
56
|
// eslint-disable-next-line no-empty
|
|
58
57
|
} catch (e) {}
|
|
59
58
|
return undefined;
|
|
60
|
-
}
|
|
59
|
+
}
|
|
@@ -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
|
-
var 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 @@ var mapToInteractionType = withProfiling(function mapToInteractionType(eventType
|
|
|
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 @@ var traceUFOInteraction = withProfiling(function traceUFOInteraction(name, event
|
|
|
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
|
var AWAITING_PAGELOAD_NAME = 'awaiting_pageload_name';
|
|
10
|
-
|
|
9
|
+
function traceUFOPageLoad(ufoName) {
|
|
11
10
|
var routeName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ufoName;
|
|
12
11
|
var activeInteraction = getActiveInteraction();
|
|
13
12
|
if (activeInteraction && !ufoName) {
|
|
@@ -31,9 +30,9 @@ var traceUFOPageLoad = withProfiling(function traceUFOPageLoad(ufoName) {
|
|
|
31
30
|
updatePageLoadInteractionName(ufoName, routeName);
|
|
32
31
|
removeHoldByID(activeInteraction.id, AWAITING_PAGELOAD_NAME);
|
|
33
32
|
}
|
|
34
|
-
}
|
|
33
|
+
}
|
|
35
34
|
export default traceUFOPageLoad;
|
|
36
|
-
export
|
|
35
|
+
export function updatePageloadName(ufoName) {
|
|
37
36
|
var routeName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ufoName;
|
|
38
37
|
var interaction = getActiveInteraction();
|
|
39
38
|
if (!interaction || interaction.type !== 'page_load' && interaction.type !== 'transition') {
|
|
@@ -49,4 +48,4 @@ export var updatePageloadName = withProfiling(function updatePageloadName(ufoNam
|
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
50
|
removeHoldByID(interaction.id, AWAITING_PAGELOAD_NAME);
|
|
52
|
-
}
|
|
51
|
+
}
|
|
@@ -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
|
-
var traceUFOPress = withProfiling(function traceUFOPress(name, timestamp) {
|
|
8
|
+
function traceUFOPress(name, timestamp) {
|
|
10
9
|
var rate = getInteractionRate(name, 'press');
|
|
11
10
|
var pressInteractionsList = getDoNotAbortActivePressInteraction();
|
|
12
11
|
if (pressInteractionsList !== null && pressInteractionsList !== void 0 && pressInteractionsList.includes(name)) {
|
|
@@ -25,5 +24,5 @@ var 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
|
-
var traceUFORedirect = withProfiling(function traceUFORedirect(fromUfoName, nextUfoName, nextRouteName, time) {
|
|
4
|
+
function traceUFORedirect(fromUfoName, nextUfoName, nextRouteName, time) {
|
|
6
5
|
UFORouteName.current = nextUfoName;
|
|
7
6
|
var 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) {
|
|
12
11
|
var routeName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ufoName;
|
|
13
12
|
var pressInteractionsList = getDoNotAbortActivePressInteractionOnTransition();
|
|
14
13
|
var interaction = getActiveInteraction();
|
|
@@ -28,7 +27,7 @@ var traceUFOTransition = withProfiling(function traceUFOTransition(ufoName) {
|
|
|
28
27
|
addNewInteraction(newId, ufoName, 'transition', performance.now(), rate, null, routeName, getActiveTrace());
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
|
-
}
|
|
30
|
+
}
|
|
32
31
|
export function useUFOTransitionCompleter() {
|
|
33
32
|
var interactionId = useContext(UFOInteractionIDContext);
|
|
34
33
|
var capturedInteractionId = interactionId.current;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export var generateSpanId = withProfiling(function generateSpanId() {
|
|
1
|
+
export function generateSpanId() {
|
|
3
2
|
return Array.from(new Array(16), function () {
|
|
4
3
|
return Math.floor(Math.random() * 16).toString(16);
|
|
5
4
|
}).join('');
|
|
6
|
-
}
|
|
5
|
+
}
|
|
@@ -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/esm/vc/index.js
CHANGED
|
@@ -9,7 +9,6 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
9
9
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
11
|
import { getConfig } from '../config';
|
|
12
|
-
import { markProfilingEnd, markProfilingStart, withProfiling } from '../self-measurements';
|
|
13
12
|
import { VCObserverNOOP } from './no-op-vc-observer';
|
|
14
13
|
import { VCObserver } from './vc-observer';
|
|
15
14
|
import VCObserverNew from './vc-observer-new';
|
|
@@ -18,7 +17,6 @@ var VCObserverWrapper = /*#__PURE__*/function () {
|
|
|
18
17
|
var _getConfig;
|
|
19
18
|
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
20
19
|
_classCallCheck(this, VCObserverWrapper);
|
|
21
|
-
var operationTimer = markProfilingStart('VCObserverWrapper constructor');
|
|
22
20
|
this.newVCObserver = null;
|
|
23
21
|
var isNewVCObserverEnabled = fg('platform_ufo_vc_observer_new') || ((_getConfig = getConfig()) === null || _getConfig === void 0 || (_getConfig = _getConfig.vc) === null || _getConfig === void 0 ? void 0 : _getConfig.enableVCObserverNew);
|
|
24
22
|
if (isNewVCObserverEnabled) {
|
|
@@ -27,16 +25,6 @@ var VCObserverWrapper = /*#__PURE__*/function () {
|
|
|
27
25
|
});
|
|
28
26
|
}
|
|
29
27
|
this.oldVCObserver = new VCObserver(opts);
|
|
30
|
-
this.start = withProfiling(this.start.bind(this), ['vc']);
|
|
31
|
-
this.stop = withProfiling(this.stop.bind(this), ['vc']);
|
|
32
|
-
this.getVCRawData = withProfiling(this.getVCRawData.bind(this), ['vc']);
|
|
33
|
-
this.getVCResult = withProfiling(this.getVCResult.bind(this), ['vc']);
|
|
34
|
-
this.setSSRElement = withProfiling(this.setSSRElement.bind(this), ['vc']);
|
|
35
|
-
this.setReactRootRenderStart = withProfiling(this.setReactRootRenderStart.bind(this), ['vc']);
|
|
36
|
-
this.setReactRootRenderStop = withProfiling(this.setReactRootRenderStop.bind(this), ['vc']);
|
|
37
|
-
markProfilingEnd(operationTimer, {
|
|
38
|
-
tags: ['vc']
|
|
39
|
-
});
|
|
40
28
|
}
|
|
41
29
|
return _createClass(VCObserverWrapper, [{
|
|
42
30
|
key: "start",
|
|
@@ -123,7 +111,7 @@ var VCObserverWrapper = /*#__PURE__*/function () {
|
|
|
123
111
|
var isServer = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.__SERVER__);
|
|
124
112
|
// Other products set this other variable to indicate it is running in SSR
|
|
125
113
|
var isReactSSR = typeof process !== 'undefined' && Boolean(((_process = process) === null || _process === void 0 || (_process = _process.env) === null || _process === void 0 ? void 0 : _process.REACT_SSR) || false);
|
|
126
|
-
export
|
|
114
|
+
export function isEnvironmentSupported() {
|
|
127
115
|
// SSR environment aren't supported
|
|
128
116
|
if (isReactSSR || isServer) {
|
|
129
117
|
return false;
|
|
@@ -138,12 +126,12 @@ export var isEnvironmentSupported = withProfiling(function isEnvironmentSupporte
|
|
|
138
126
|
return false;
|
|
139
127
|
}
|
|
140
128
|
return true;
|
|
141
|
-
}
|
|
142
|
-
export
|
|
129
|
+
}
|
|
130
|
+
export function getVCObserver() {
|
|
143
131
|
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
144
132
|
if (!globalThis.__vcObserver) {
|
|
145
133
|
var shouldMockVCObserver = !isEnvironmentSupported();
|
|
146
134
|
globalThis.__vcObserver = shouldMockVCObserver ? new VCObserverNOOP() : new VCObserverWrapper(opts);
|
|
147
135
|
}
|
|
148
136
|
return globalThis.__vcObserver;
|
|
149
|
-
}
|
|
137
|
+
}
|
|
@@ -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
|
var unbindWheel = bind(window, {
|
|
7
6
|
type: AbortEvent.wheel,
|
|
8
7
|
listener: function listener(e) {
|
|
@@ -32,4 +31,4 @@ export var attachAbortListeners = withProfiling(function attachAbortListeners(wi
|
|
|
32
31
|
}
|
|
33
32
|
});
|
|
34
33
|
return [unbindWheel, unbindKeydown, unbindResize];
|
|
35
|
-
}
|
|
34
|
+
}
|