@atlaskit/react-ufo 4.14.0 → 4.14.2

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.
@@ -73,9 +73,9 @@ var ViewportObserver = /*#__PURE__*/function () {
73
73
  });
74
74
  _defineProperty(this, "handleChildListMutation", /*#__PURE__*/function () {
75
75
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref4) {
76
- var target, addedNodes, removedNodes, timestamp, removedNodeRects, targetNode, _iterator, _step, _loop, _ret;
77
- return _regeneratorRuntime.wrap(function _callee$(_context3) {
78
- while (1) switch (_context3.prev = _context3.next) {
76
+ var target, addedNodes, removedNodes, timestamp, removedNodeRects, targetNode, _iterator, _step, addedNodeRef, addedNode, _iterator2, _step2, _loop, _ret;
77
+ return _regeneratorRuntime.wrap(function _callee$(_context2) {
78
+ while (1) switch (_context2.prev = _context2.next) {
79
79
  case 0:
80
80
  target = _ref4.target, addedNodes = _ref4.addedNodes, removedNodes = _ref4.removedNodes, timestamp = _ref4.timestamp;
81
81
  removedNodeRects = removedNodes.map(function (ref) {
@@ -87,179 +87,31 @@ var ViewportObserver = /*#__PURE__*/function () {
87
87
  });
88
88
  targetNode = target.deref();
89
89
  _iterator = _createForOfIteratorHelper(addedNodes);
90
- _context3.prev = 4;
90
+ _context2.prev = 4;
91
+ _iterator.s();
92
+ case 6:
93
+ if ((_step = _iterator.n()).done) {
94
+ _context2.next = 32;
95
+ break;
96
+ }
97
+ addedNodeRef = _step.value;
98
+ addedNode = addedNodeRef.deref();
99
+ if (addedNode) {
100
+ _context2.next = 11;
101
+ break;
102
+ }
103
+ return _context2.abrupt("continue", 30);
104
+ case 11:
105
+ _iterator2 = _createForOfIteratorHelper(getMutatedElements(addedNode));
106
+ _context2.prev = 12;
91
107
  _loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
92
- var addedNodeRef, addedNode, _iterator2, _step2, _loop2, _ret2, ssrState, SSRStateEnum, _this$intersectionObs0, _this$intersectionObs1, ssrPlaceholderHandler, _this$intersectionObs10, result, _this$intersectionObs11, sameDeletedNode, isInIgnoreLsMarker, _this$intersectionObs12, _this$intersectionObs13, _checkWithinComponent, isWithinThirdPartySegment, _this$intersectionObs14, _iterator3, _step3, _step3$value, isDisplayContentsElementChildren, element, _this$intersectionObs15, _this$intersectionObs16;
93
- return _regeneratorRuntime.wrap(function _loop$(_context2) {
94
- while (1) switch (_context2.prev = _context2.next) {
108
+ var _step2$value, isDisplayContentsElementChildren, element, ssrState, SSRStateEnum, _this$intersectionObs, _this$intersectionObs2, ssrPlaceholderHandler, _this$intersectionObs3, result, _this$intersectionObs4, sameDeletedNode, isInIgnoreLsMarker, _this$intersectionObs5, _this$intersectionObs6, _ref6, isWithinThirdPartySegment, _this$intersectionObs7, _this$intersectionObs8, _this$intersectionObs9;
109
+ return _regeneratorRuntime.wrap(function _loop$(_context) {
110
+ while (1) switch (_context.prev = _context.next) {
95
111
  case 0:
96
- addedNodeRef = _step.value;
97
- addedNode = addedNodeRef.deref();
98
- if (addedNode) {
99
- _context2.next = 4;
100
- break;
101
- }
102
- return _context2.abrupt("return", 0);
103
- case 4:
104
- if (!fg('platform_ufo_ssr_placeholders_for_display_contents')) {
105
- _context2.next = 26;
106
- break;
107
- }
108
- _iterator2 = _createForOfIteratorHelper(getMutatedElements(addedNode));
109
- _context2.prev = 6;
110
- _loop2 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop2() {
111
- var _step2$value, isDisplayContentsElementChildren, element, ssrState, SSRStateEnum, _this$intersectionObs, _this$intersectionObs2, ssrPlaceholderHandler, _this$intersectionObs3, result, _this$intersectionObs4, sameDeletedNode, isInIgnoreLsMarker, _this$intersectionObs5, _this$intersectionObs6, _ref6, isWithinThirdPartySegment, _this$intersectionObs7, _this$intersectionObs8, _this$intersectionObs9;
112
- return _regeneratorRuntime.wrap(function _loop2$(_context) {
113
- while (1) switch (_context.prev = _context.next) {
114
- case 0:
115
- _step2$value = _step2.value, isDisplayContentsElementChildren = _step2$value.isDisplayContentsElementChildren, element = _step2$value.element;
116
- if (!_this.getSSRState) {
117
- _context.next = 16;
118
- break;
119
- }
120
- ssrState = _this.getSSRState();
121
- SSRStateEnum = {
122
- normal: 1,
123
- waitingForFirstRender: 2,
124
- ignoring: 3
125
- };
126
- if (!(ssrState.state === SSRStateEnum.waitingForFirstRender && timestamp > ssrState.renderStart && targetNode === ssrState.reactRootElement)) {
127
- _context.next = 9;
128
- break;
129
- }
130
- ssrState.state = SSRStateEnum.ignoring;
131
- if (ssrState.renderStop === -1) {
132
- // arbitrary 500ms DOM update window
133
- ssrState.renderStop = timestamp + 500;
134
- }
135
- (_this$intersectionObs = _this.intersectionObserver) === null || _this$intersectionObs === void 0 || _this$intersectionObs.watchAndTag(element, 'ssr-hydration');
136
- return _context.abrupt("return", 0);
137
- case 9:
138
- if (!(ssrState.state === SSRStateEnum.ignoring && timestamp > ssrState.renderStart && targetNode === ssrState.reactRootElement)) {
139
- _context.next = 16;
140
- break;
141
- }
142
- if (!(timestamp <= ssrState.renderStop)) {
143
- _context.next = 15;
144
- break;
145
- }
146
- (_this$intersectionObs2 = _this.intersectionObserver) === null || _this$intersectionObs2 === void 0 || _this$intersectionObs2.watchAndTag(element, 'ssr-hydration');
147
- return _context.abrupt("return", 0);
148
- case 15:
149
- ssrState.state = SSRStateEnum.normal;
150
- case 16:
151
- if (!_this.getSSRPlaceholderHandler) {
152
- _context.next = 30;
153
- break;
154
- }
155
- ssrPlaceholderHandler = _this.getSSRPlaceholderHandler();
156
- if (!ssrPlaceholderHandler) {
157
- _context.next = 30;
158
- break;
159
- }
160
- if (!(ssrPlaceholderHandler.isPlaceholder(element) || ssrPlaceholderHandler.isPlaceholderIgnored(element))) {
161
- _context.next = 23;
162
- break;
163
- }
164
- if (!ssrPlaceholderHandler.checkIfExistedAndSizeMatchingV3(element)) {
165
- _context.next = 23;
166
- break;
167
- }
168
- (_this$intersectionObs3 = _this.intersectionObserver) === null || _this$intersectionObs3 === void 0 || _this$intersectionObs3.watchAndTag(element, 'mutation:ssr-placeholder');
169
- return _context.abrupt("return", 0);
170
- case 23:
171
- if (!(ssrPlaceholderHandler.isPlaceholderReplacement(element) || ssrPlaceholderHandler.isPlaceholderIgnored(element))) {
172
- _context.next = 30;
173
- break;
174
- }
175
- _context.next = 26;
176
- return ssrPlaceholderHandler.validateReactComponentMatchToPlaceholder(element);
177
- case 26:
178
- result = _context.sent;
179
- if (!(result !== false)) {
180
- _context.next = 30;
181
- break;
182
- }
183
- (_this$intersectionObs4 = _this.intersectionObserver) === null || _this$intersectionObs4 === void 0 || _this$intersectionObs4.watchAndTag(element, 'mutation:ssr-placeholder');
184
- return _context.abrupt("return", 0);
185
- case 30:
186
- sameDeletedNode = removedNodes.find(function (ref) {
187
- var n = ref.deref();
188
- if (!n || !element) {
189
- return false;
190
- }
191
- return n.isEqualNode(element);
192
- });
193
- isInIgnoreLsMarker = element instanceof HTMLElement ? isInVCIgnoreIfNoLayoutShiftMarker(element) : false;
194
- if (!(sameDeletedNode && isInIgnoreLsMarker)) {
195
- _context.next = 35;
196
- break;
197
- }
198
- (_this$intersectionObs5 = _this.intersectionObserver) === null || _this$intersectionObs5 === void 0 || _this$intersectionObs5.watchAndTag(element, 'mutation:remount');
199
- return _context.abrupt("return", 0);
200
- case 35:
201
- if (!isContainedWithinMediaWrapper(element)) {
202
- _context.next = 38;
203
- break;
204
- }
205
- (_this$intersectionObs6 = _this.intersectionObserver) === null || _this$intersectionObs6 === void 0 || _this$intersectionObs6.watchAndTag(element, 'mutation:media');
206
- return _context.abrupt("return", 0);
207
- case 38:
208
- _ref6 = element instanceof HTMLElement ? checkWithinComponent(element, 'UFOThirdPartySegment', _this.mapIs3pResult) : {
209
- isWithin: false
210
- }, isWithinThirdPartySegment = _ref6.isWithin;
211
- if (!isWithinThirdPartySegment) {
212
- _context.next = 42;
213
- break;
214
- }
215
- (_this$intersectionObs7 = _this.intersectionObserver) === null || _this$intersectionObs7 === void 0 || _this$intersectionObs7.watchAndTag(element, 'mutation:third-party-element');
216
- return _context.abrupt("return", 0);
217
- case 42:
218
- if (isDisplayContentsElementChildren) {
219
- (_this$intersectionObs8 = _this.intersectionObserver) === null || _this$intersectionObs8 === void 0 || _this$intersectionObs8.watchAndTag(element, 'mutation:display-contents-children-element');
220
- } else {
221
- (_this$intersectionObs9 = _this.intersectionObserver) === null || _this$intersectionObs9 === void 0 || _this$intersectionObs9.watchAndTag(element, createElementMutationsWatcher(removedNodeRects));
222
- }
223
- case 43:
224
- case "end":
225
- return _context.stop();
226
- }
227
- }, _loop2);
228
- });
229
- _iterator2.s();
230
- case 9:
231
- if ((_step2 = _iterator2.n()).done) {
232
- _context2.next = 16;
233
- break;
234
- }
235
- return _context2.delegateYield(_loop2(), "t0", 11);
236
- case 11:
237
- _ret2 = _context2.t0;
238
- if (!(_ret2 === 0)) {
239
- _context2.next = 14;
240
- break;
241
- }
242
- return _context2.abrupt("continue", 14);
243
- case 14:
244
- _context2.next = 9;
245
- break;
246
- case 16:
247
- _context2.next = 21;
248
- break;
249
- case 18:
250
- _context2.prev = 18;
251
- _context2.t1 = _context2["catch"](6);
252
- _iterator2.e(_context2.t1);
253
- case 21:
254
- _context2.prev = 21;
255
- _iterator2.f();
256
- return _context2.finish(21);
257
- case 24:
258
- _context2.next = 69;
259
- break;
260
- case 26:
112
+ _step2$value = _step2.value, isDisplayContentsElementChildren = _step2$value.isDisplayContentsElementChildren, element = _step2$value.element;
261
113
  if (!_this.getSSRState) {
262
- _context2.next = 41;
114
+ _context.next = 16;
263
115
  break;
264
116
  }
265
117
  ssrState = _this.getSSRState();
@@ -269,7 +121,7 @@ var ViewportObserver = /*#__PURE__*/function () {
269
121
  ignoring: 3
270
122
  };
271
123
  if (!(ssrState.state === SSRStateEnum.waitingForFirstRender && timestamp > ssrState.renderStart && targetNode === ssrState.reactRootElement)) {
272
- _context2.next = 34;
124
+ _context.next = 9;
273
125
  break;
274
126
  }
275
127
  ssrState.state = SSRStateEnum.ignoring;
@@ -277,153 +129,159 @@ var ViewportObserver = /*#__PURE__*/function () {
277
129
  // arbitrary 500ms DOM update window
278
130
  ssrState.renderStop = timestamp + 500;
279
131
  }
280
- (_this$intersectionObs0 = _this.intersectionObserver) === null || _this$intersectionObs0 === void 0 || _this$intersectionObs0.watchAndTag(addedNode, 'ssr-hydration');
281
- return _context2.abrupt("return", 0);
282
- case 34:
132
+ (_this$intersectionObs = _this.intersectionObserver) === null || _this$intersectionObs === void 0 || _this$intersectionObs.watchAndTag(element, 'ssr-hydration');
133
+ return _context.abrupt("return", 0);
134
+ case 9:
283
135
  if (!(ssrState.state === SSRStateEnum.ignoring && timestamp > ssrState.renderStart && targetNode === ssrState.reactRootElement)) {
284
- _context2.next = 41;
136
+ _context.next = 16;
285
137
  break;
286
138
  }
287
139
  if (!(timestamp <= ssrState.renderStop)) {
288
- _context2.next = 40;
140
+ _context.next = 15;
289
141
  break;
290
142
  }
291
- (_this$intersectionObs1 = _this.intersectionObserver) === null || _this$intersectionObs1 === void 0 || _this$intersectionObs1.watchAndTag(addedNode, 'ssr-hydration');
292
- return _context2.abrupt("return", 0);
293
- case 40:
143
+ (_this$intersectionObs2 = _this.intersectionObserver) === null || _this$intersectionObs2 === void 0 || _this$intersectionObs2.watchAndTag(element, 'ssr-hydration');
144
+ return _context.abrupt("return", 0);
145
+ case 15:
294
146
  ssrState.state = SSRStateEnum.normal;
295
- case 41:
147
+ case 16:
296
148
  if (!_this.getSSRPlaceholderHandler) {
297
- _context2.next = 55;
149
+ _context.next = 30;
298
150
  break;
299
151
  }
300
152
  ssrPlaceholderHandler = _this.getSSRPlaceholderHandler();
301
153
  if (!ssrPlaceholderHandler) {
302
- _context2.next = 55;
154
+ _context.next = 30;
303
155
  break;
304
156
  }
305
- if (!(ssrPlaceholderHandler.isPlaceholder(addedNode) || ssrPlaceholderHandler.isPlaceholderIgnored(addedNode))) {
306
- _context2.next = 48;
157
+ if (!(ssrPlaceholderHandler.isPlaceholder(element) || ssrPlaceholderHandler.isPlaceholderIgnored(element))) {
158
+ _context.next = 23;
307
159
  break;
308
160
  }
309
- if (!ssrPlaceholderHandler.checkIfExistedAndSizeMatchingV3(addedNode)) {
310
- _context2.next = 48;
161
+ if (!ssrPlaceholderHandler.checkIfExistedAndSizeMatchingV3(element)) {
162
+ _context.next = 23;
311
163
  break;
312
164
  }
313
- (_this$intersectionObs10 = _this.intersectionObserver) === null || _this$intersectionObs10 === void 0 || _this$intersectionObs10.watchAndTag(addedNode, 'mutation:ssr-placeholder');
314
- return _context2.abrupt("return", 0);
315
- case 48:
316
- if (!(ssrPlaceholderHandler.isPlaceholderReplacement(addedNode) || ssrPlaceholderHandler.isPlaceholderIgnored(addedNode))) {
317
- _context2.next = 55;
165
+ (_this$intersectionObs3 = _this.intersectionObserver) === null || _this$intersectionObs3 === void 0 || _this$intersectionObs3.watchAndTag(element, 'mutation:ssr-placeholder');
166
+ return _context.abrupt("return", 0);
167
+ case 23:
168
+ if (!(ssrPlaceholderHandler.isPlaceholderReplacement(element) || ssrPlaceholderHandler.isPlaceholderIgnored(element))) {
169
+ _context.next = 30;
318
170
  break;
319
171
  }
320
- _context2.next = 51;
321
- return ssrPlaceholderHandler.validateReactComponentMatchToPlaceholder(addedNode);
322
- case 51:
323
- result = _context2.sent;
172
+ _context.next = 26;
173
+ return ssrPlaceholderHandler.validateReactComponentMatchToPlaceholder(element);
174
+ case 26:
175
+ result = _context.sent;
324
176
  if (!(result !== false)) {
325
- _context2.next = 55;
177
+ _context.next = 30;
326
178
  break;
327
179
  }
328
- (_this$intersectionObs11 = _this.intersectionObserver) === null || _this$intersectionObs11 === void 0 || _this$intersectionObs11.watchAndTag(addedNode, 'mutation:ssr-placeholder');
329
- return _context2.abrupt("return", 0);
330
- case 55:
180
+ (_this$intersectionObs4 = _this.intersectionObserver) === null || _this$intersectionObs4 === void 0 || _this$intersectionObs4.watchAndTag(element, 'mutation:ssr-placeholder');
181
+ return _context.abrupt("return", 0);
182
+ case 30:
331
183
  sameDeletedNode = removedNodes.find(function (ref) {
332
184
  var n = ref.deref();
333
- if (!n || !addedNode) {
185
+ if (!n || !element) {
334
186
  return false;
335
187
  }
336
- return n.isEqualNode(addedNode);
188
+ return n.isEqualNode(element);
337
189
  });
338
- isInIgnoreLsMarker = isInVCIgnoreIfNoLayoutShiftMarker(addedNode);
190
+ isInIgnoreLsMarker = element instanceof HTMLElement ? isInVCIgnoreIfNoLayoutShiftMarker(element) : false;
339
191
  if (!(sameDeletedNode && isInIgnoreLsMarker)) {
340
- _context2.next = 60;
192
+ _context.next = 35;
341
193
  break;
342
194
  }
343
- (_this$intersectionObs12 = _this.intersectionObserver) === null || _this$intersectionObs12 === void 0 || _this$intersectionObs12.watchAndTag(addedNode, 'mutation:remount');
344
- return _context2.abrupt("return", 0);
345
- case 60:
346
- if (!isContainedWithinMediaWrapper(addedNode)) {
347
- _context2.next = 63;
195
+ (_this$intersectionObs5 = _this.intersectionObserver) === null || _this$intersectionObs5 === void 0 || _this$intersectionObs5.watchAndTag(element, 'mutation:remount');
196
+ return _context.abrupt("return", 0);
197
+ case 35:
198
+ if (!isContainedWithinMediaWrapper(element)) {
199
+ _context.next = 38;
348
200
  break;
349
201
  }
350
- (_this$intersectionObs13 = _this.intersectionObserver) === null || _this$intersectionObs13 === void 0 || _this$intersectionObs13.watchAndTag(addedNode, 'mutation:media');
351
- return _context2.abrupt("return", 0);
352
- case 63:
353
- _checkWithinComponent = checkWithinComponent(addedNode, 'UFOThirdPartySegment', _this.mapIs3pResult), isWithinThirdPartySegment = _checkWithinComponent.isWithin;
202
+ (_this$intersectionObs6 = _this.intersectionObserver) === null || _this$intersectionObs6 === void 0 || _this$intersectionObs6.watchAndTag(element, 'mutation:media');
203
+ return _context.abrupt("return", 0);
204
+ case 38:
205
+ _ref6 = element instanceof HTMLElement ? checkWithinComponent(element, 'UFOThirdPartySegment', _this.mapIs3pResult) : {
206
+ isWithin: false
207
+ }, isWithinThirdPartySegment = _ref6.isWithin;
354
208
  if (!isWithinThirdPartySegment) {
355
- _context2.next = 67;
209
+ _context.next = 42;
356
210
  break;
357
211
  }
358
- (_this$intersectionObs14 = _this.intersectionObserver) === null || _this$intersectionObs14 === void 0 || _this$intersectionObs14.watchAndTag(addedNode, 'mutation:third-party-element');
359
- return _context2.abrupt("return", 0);
360
- case 67:
361
- _iterator3 = _createForOfIteratorHelper(getMutatedElements(addedNode));
362
- try {
363
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
364
- _step3$value = _step3.value, isDisplayContentsElementChildren = _step3$value.isDisplayContentsElementChildren, element = _step3$value.element;
365
- if (isDisplayContentsElementChildren) {
366
- (_this$intersectionObs15 = _this.intersectionObserver) === null || _this$intersectionObs15 === void 0 || _this$intersectionObs15.watchAndTag(element, 'mutation:display-contents-children-element');
367
- } else {
368
- (_this$intersectionObs16 = _this.intersectionObserver) === null || _this$intersectionObs16 === void 0 || _this$intersectionObs16.watchAndTag(element, createElementMutationsWatcher(removedNodeRects));
369
- }
370
- }
371
- } catch (err) {
372
- _iterator3.e(err);
373
- } finally {
374
- _iterator3.f();
212
+ (_this$intersectionObs7 = _this.intersectionObserver) === null || _this$intersectionObs7 === void 0 || _this$intersectionObs7.watchAndTag(element, 'mutation:third-party-element');
213
+ return _context.abrupt("return", 0);
214
+ case 42:
215
+ if (isDisplayContentsElementChildren) {
216
+ (_this$intersectionObs8 = _this.intersectionObserver) === null || _this$intersectionObs8 === void 0 || _this$intersectionObs8.watchAndTag(element, 'mutation:display-contents-children-element');
217
+ } else {
218
+ (_this$intersectionObs9 = _this.intersectionObserver) === null || _this$intersectionObs9 === void 0 || _this$intersectionObs9.watchAndTag(element, createElementMutationsWatcher(removedNodeRects));
375
219
  }
376
- case 69:
220
+ case 43:
377
221
  case "end":
378
- return _context2.stop();
222
+ return _context.stop();
379
223
  }
380
- }, _loop, null, [[6, 18, 21, 24]]);
224
+ }, _loop);
381
225
  });
382
- _iterator.s();
383
- case 7:
384
- if ((_step = _iterator.n()).done) {
385
- _context3.next = 14;
226
+ _iterator2.s();
227
+ case 15:
228
+ if ((_step2 = _iterator2.n()).done) {
229
+ _context2.next = 22;
386
230
  break;
387
231
  }
388
- return _context3.delegateYield(_loop(), "t0", 9);
389
- case 9:
390
- _ret = _context3.t0;
232
+ return _context2.delegateYield(_loop(), "t0", 17);
233
+ case 17:
234
+ _ret = _context2.t0;
391
235
  if (!(_ret === 0)) {
392
- _context3.next = 12;
236
+ _context2.next = 20;
393
237
  break;
394
238
  }
395
- return _context3.abrupt("continue", 12);
396
- case 12:
397
- _context3.next = 7;
239
+ return _context2.abrupt("continue", 20);
240
+ case 20:
241
+ _context2.next = 15;
398
242
  break;
399
- case 14:
400
- _context3.next = 19;
243
+ case 22:
244
+ _context2.next = 27;
401
245
  break;
402
- case 16:
403
- _context3.prev = 16;
404
- _context3.t1 = _context3["catch"](4);
405
- _iterator.e(_context3.t1);
406
- case 19:
407
- _context3.prev = 19;
246
+ case 24:
247
+ _context2.prev = 24;
248
+ _context2.t1 = _context2["catch"](12);
249
+ _iterator2.e(_context2.t1);
250
+ case 27:
251
+ _context2.prev = 27;
252
+ _iterator2.f();
253
+ return _context2.finish(27);
254
+ case 30:
255
+ _context2.next = 6;
256
+ break;
257
+ case 32:
258
+ _context2.next = 37;
259
+ break;
260
+ case 34:
261
+ _context2.prev = 34;
262
+ _context2.t2 = _context2["catch"](4);
263
+ _iterator.e(_context2.t2);
264
+ case 37:
265
+ _context2.prev = 37;
408
266
  _iterator.f();
409
- return _context3.finish(19);
410
- case 22:
267
+ return _context2.finish(37);
268
+ case 40:
411
269
  case "end":
412
- return _context3.stop();
270
+ return _context2.stop();
413
271
  }
414
- }, _callee, null, [[4, 16, 19, 22]]);
272
+ }, _callee, null, [[4, 34, 37, 40], [12, 24, 27, 30]]);
415
273
  }));
416
274
  return function (_x) {
417
275
  return _ref5.apply(this, arguments);
418
276
  };
419
277
  }());
420
278
  _defineProperty(this, "handleAttributeMutation", function (_ref7) {
421
- var _this$intersectionObs17;
279
+ var _this$intersectionObs0;
422
280
  var target = _ref7.target,
423
281
  attributeName = _ref7.attributeName,
424
282
  oldValue = _ref7.oldValue,
425
283
  newValue = _ref7.newValue;
426
- (_this$intersectionObs17 = _this.intersectionObserver) === null || _this$intersectionObs17 === void 0 || _this$intersectionObs17.watchAndTag(target, function (_ref8) {
284
+ (_this$intersectionObs0 = _this.intersectionObserver) === null || _this$intersectionObs0 === void 0 || _this$intersectionObs0.watchAndTag(target, function (_ref8) {
427
285
  var target = _ref8.target,
428
286
  rect = _ref8.rect;
429
287
  if (isContainedWithinMediaWrapper(target)) {
@@ -437,8 +295,8 @@ var ViewportObserver = /*#__PURE__*/function () {
437
295
  };
438
296
  }
439
297
  if (fg('platform_ufo_exclude_3p_attribute_changes')) {
440
- var _checkWithinComponent2 = checkWithinComponent(target, 'UFOThirdPartySegment', _this.mapIs3pResult),
441
- isWithinThirdPartySegment = _checkWithinComponent2.isWithin;
298
+ var _checkWithinComponent = checkWithinComponent(target, 'UFOThirdPartySegment', _this.mapIs3pResult),
299
+ isWithinThirdPartySegment = _checkWithinComponent.isWithin;
442
300
  if (isWithinThirdPartySegment) {
443
301
  return {
444
302
  type: 'mutation:third-party-attribute',
@@ -499,11 +357,11 @@ var ViewportObserver = /*#__PURE__*/function () {
499
357
  _defineProperty(this, "handleLayoutShift", function (_ref9) {
500
358
  var time = _ref9.time,
501
359
  changedRects = _ref9.changedRects;
502
- var _iterator4 = _createForOfIteratorHelper(changedRects),
503
- _step4;
360
+ var _iterator3 = _createForOfIteratorHelper(changedRects),
361
+ _step3;
504
362
  try {
505
- for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
506
- var changedRect = _step4.value;
363
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
364
+ var changedRect = _step3.value;
507
365
  var target = changedRect.node;
508
366
  if (target) {
509
367
  var isSameCurrentAndPreviousRects = isSameRectDimensions(changedRect.rect, changedRect.previousRect);
@@ -518,9 +376,9 @@ var ViewportObserver = /*#__PURE__*/function () {
518
376
  }
519
377
  }
520
378
  } catch (err) {
521
- _iterator4.e(err);
379
+ _iterator3.e(err);
522
380
  } finally {
523
- _iterator4.f();
381
+ _iterator3.f();
524
382
  }
525
383
  });
526
384
  this.mapVisibleNodeRects = new WeakMap();
@@ -577,12 +435,12 @@ var ViewportObserver = /*#__PURE__*/function () {
577
435
  }, {
578
436
  key: "stop",
579
437
  value: function stop() {
580
- var _this$mutationObserve2, _this$intersectionObs18, _this$performanceObse2;
438
+ var _this$mutationObserve2, _this$intersectionObs1, _this$performanceObse2;
581
439
  if (!this.isStarted) {
582
440
  return;
583
441
  }
584
442
  (_this$mutationObserve2 = this.mutationObserver) === null || _this$mutationObserve2 === void 0 || _this$mutationObserve2.disconnect();
585
- (_this$intersectionObs18 = this.intersectionObserver) === null || _this$intersectionObs18 === void 0 || _this$intersectionObs18.disconnect();
443
+ (_this$intersectionObs1 = this.intersectionObserver) === null || _this$intersectionObs1 === void 0 || _this$intersectionObs1.disconnect();
586
444
  (_this$performanceObse2 = this.performanceObserver) === null || _this$performanceObse2 === void 0 || _this$performanceObse2.disconnect();
587
445
  this.isStarted = false;
588
446
  // Clean up caches when stopping
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "4.14.0",
3
+ "version": "4.14.2",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -89,9 +89,6 @@
89
89
  "platform_ufo_enable_media_for_ttvc_v3": {
90
90
  "type": "boolean"
91
91
  },
92
- "ufo_targeting_confluence_hello": {
93
- "type": "boolean"
94
- },
95
92
  "platform_ufo_remove_deprecated_config_fields": {
96
93
  "type": "boolean"
97
94
  },
@@ -110,9 +107,6 @@
110
107
  "platform_ufo_critical_metrics_payload": {
111
108
  "type": "boolean"
112
109
  },
113
- "platform_ufo_ssr_placeholders_for_display_contents": {
114
- "type": "boolean"
115
- },
116
110
  "platform_ufo_enable_interactivity_jsm": {
117
111
  "type": "boolean"
118
112
  },
@@ -152,9 +146,6 @@
152
146
  "platform_ufo_enable_finish_interaction_transition": {
153
147
  "type": "boolean"
154
148
  },
155
- "react_ufo_unified_search_ignoring_sain_metric": {
156
- "type": "boolean"
157
- },
158
149
  "platform_ufo_always_send_post_interaction_log": {
159
150
  "type": "boolean"
160
151
  },