@player-devtools/plugin 0.13.1--canary.13.753 → 0.14.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -474,7 +474,7 @@ var DevtoolsPlugin = function() {
474
474
  var generateUUID = // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/devtools/plugin/core/src/helpers/uuid.ts
475
475
  function generateUUID() {
476
476
  var d = /* @__PURE__ */ new Date().getTime();
477
- var d2 = typeof performance !== "undefined" && performance.now && performance.now() * 1e3 || 0;
477
+ var d2 = getNowTime() * 1e3;
478
478
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
479
479
  var r = Math.random() * 16;
480
480
  if (d > 0) {
@@ -547,9 +547,55 @@ var DevtoolsPlugin = function() {
547
547
  },
548
548
  generateUUID: function() {
549
549
  return generateUUID;
550
+ },
551
+ getNowTime: function() {
552
+ return getNowTime;
550
553
  }
551
554
  });
552
555
  // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/@player-devtools+utils@0.0.0/node_modules/@player-devtools/utils/dist/index.mjs
556
+ var useStateReducer = function(reducer2, initialState) {
557
+ var state = initialState;
558
+ var subscribers = /* @__PURE__ */ new Set();
559
+ return {
560
+ getState: function() {
561
+ return state;
562
+ },
563
+ /** Subscribe to state changes; returns an unsubscribe function. */ subscribe: function subscribe(subscriber) {
564
+ subscribers.add(subscriber);
565
+ subscriber(state);
566
+ return function() {
567
+ return subscribers.delete(subscriber);
568
+ };
569
+ },
570
+ /** Dispatch an action through the reducer, then run side-effects. */ dispatch: function dispatch(action) {
571
+ var prevState = state;
572
+ var nextState = reducer2(prevState, action);
573
+ if (nextState !== prevState) {
574
+ state = nextState;
575
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
576
+ try {
577
+ for(var _iterator = subscribers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
578
+ var sub = _step.value;
579
+ sub(state);
580
+ }
581
+ } catch (err) {
582
+ _didIteratorError = true;
583
+ _iteratorError = err;
584
+ } finally{
585
+ try {
586
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
587
+ _iterator.return();
588
+ }
589
+ } finally{
590
+ if (_didIteratorError) {
591
+ throw _iteratorError;
592
+ }
593
+ }
594
+ }
595
+ }
596
+ }
597
+ };
598
+ };
553
599
  function deepAssign(target, source) {
554
600
  var merge = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
555
601
  if (Array.isArray(target) && Array.isArray(source)) {
@@ -937,50 +983,6 @@ var DevtoolsPlugin = function() {
937
983
  }
938
984
  var immer = new Immer2();
939
985
  var produce = immer.produce;
940
- // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/devtools/plugin/core/src/state.ts
941
- var useStateReducer = function(reducer2, initialState) {
942
- var state = initialState;
943
- var subscribers = /* @__PURE__ */ new Set();
944
- return {
945
- getState: function() {
946
- return state;
947
- },
948
- /** Subscribe to state changes; returns an unsubscribe function. */ subscribe: function subscribe(subscriber) {
949
- subscribers.add(subscriber);
950
- subscriber(state);
951
- return function() {
952
- return subscribers.delete(subscriber);
953
- };
954
- },
955
- /** Dispatch an action through the reducer, then run side-effects. */ dispatch: function dispatch(action) {
956
- var prevState = state;
957
- var nextState = reducer2(prevState, action);
958
- if (nextState !== prevState) {
959
- state = nextState;
960
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
961
- try {
962
- for(var _iterator = subscribers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
963
- var sub = _step.value;
964
- sub(state);
965
- }
966
- } catch (err) {
967
- _didIteratorError = true;
968
- _iteratorError = err;
969
- } finally{
970
- try {
971
- if (!_iteratorNormalCompletion && _iterator.return != null) {
972
- _iterator.return();
973
- }
974
- } finally{
975
- if (_didIteratorError) {
976
- throw _iteratorError;
977
- }
978
- }
979
- }
980
- }
981
- }
982
- };
983
- };
984
986
  // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/node_modules/.aspect_rules_js/dequal@2.0.3/node_modules/dequal/dist/index.mjs
985
987
  var has2 = Object.prototype.hasOwnProperty;
986
988
  function dequal(foo, bar) {
@@ -1153,6 +1155,12 @@ var DevtoolsPlugin = function() {
1153
1155
  PLAYER_SELECTED: "player-selected"
1154
1156
  };
1155
1157
  var PLUGIN_INACTIVE_WARNING = "The plugin has been registered, but the Player development tools are not active. If you are working in a production environment, it is recommended to remove the plugin. To activate, enable through the browser extension popup for web or configure the FlipperClient for mobile.";
1158
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/devtools/plugin/core/src/helpers/getNowTime.ts
1159
+ var getNowTime = globalThis.performance ? function() {
1160
+ return globalThis.performance.now();
1161
+ } : function() {
1162
+ return Date.now();
1163
+ };
1156
1164
  // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/devtools/plugin/core/src/helpers/genDataChangeTransaction.ts
1157
1165
  var NOOP_ID = -1;
1158
1166
  var genDataChangeTransaction = function(param) {
@@ -1189,9 +1197,12 @@ var DevtoolsPlugin = function() {
1189
1197
  this.lastProcessedInteraction = 0;
1190
1198
  this.store.subscribe(function(param) {
1191
1199
  var interactions = param.interactions;
1200
+ var start = _this.lastProcessedInteraction;
1192
1201
  var _interactions_length;
1193
- if (_this.lastProcessedInteraction < ((_interactions_length = interactions.length) !== null && _interactions_length !== void 0 ? _interactions_length : 0)) {
1194
- interactions.slice(_this.lastProcessedInteraction).forEach(_this.processInteraction.bind(_this));
1202
+ var end = (_interactions_length = interactions.length) !== null && _interactions_length !== void 0 ? _interactions_length : 0;
1203
+ if (start < end) {
1204
+ _this.lastProcessedInteraction = end;
1205
+ interactions.slice(start, end).forEach(_this.processInteraction.bind(_this));
1195
1206
  }
1196
1207
  });
1197
1208
  }
@@ -1326,7 +1337,6 @@ var DevtoolsPlugin = function() {
1326
1337
  _messenger_: true
1327
1338
  });
1328
1339
  }
1329
- this.lastProcessedInteraction += 1;
1330
1340
  }
1331
1341
  },
1332
1342
  {