@rozenite/network-activity-plugin 1.0.0-alpha.3 → 1.0.0-alpha.4

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ![rozenite-baner](https://github.com/user-attachments/assets/6d21839f-e624-4d8b-85a2-5f7ef1600b28)
1
+ ![rozenite-banner](https://www.rozenite.dev/rozenite-banner.jpg)
2
2
 
3
3
  ### A Rozenite plugin that provides comprehensive network activity monitoring for React Native applications.
4
4
 
@@ -44,9 +44,7 @@ function App() {
44
44
  // Enable Network Activity DevTools in development
45
45
  useNetworkActivityDevTools();
46
46
 
47
- return (
48
- <YourApp />
49
- );
47
+ return <YourApp />;
50
48
  }
51
49
  ```
52
50
 
@@ -70,4 +68,4 @@ Like the project? ⚛️ [Join the team](https://callstack.com/careers/?utm_camp
70
68
  [prs-welcome-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge
71
69
  [prs-welcome]: https://github.com/callstackincubator/rozenite/blob/main/CONTRIBUTING.md
72
70
  [chat-badge]: https://img.shields.io/discord/426714625279524876.svg?style=for-the-badge
73
- [chat]: https://discord.gg/xgGt7KAjxv
71
+ [chat]: https://discord.gg/xgGt7KAjxv
@@ -1187,22 +1187,6 @@ function requireCreatePrefixer() {
1187
1187
  }
1188
1188
  var createPrefixerExports = requireCreatePrefixer();
1189
1189
  const createPrefixer = /* @__PURE__ */ getDefaultExportFromCjs(createPrefixerExports);
1190
- var backgroundClip$1 = {};
1191
- var hasRequiredBackgroundClip;
1192
- function requireBackgroundClip() {
1193
- if (hasRequiredBackgroundClip) return backgroundClip$1;
1194
- hasRequiredBackgroundClip = 1;
1195
- Object.defineProperty(backgroundClip$1, "__esModule", {
1196
- value: true
1197
- });
1198
- backgroundClip$1.default = backgroundClip2;
1199
- function backgroundClip2() {
1200
- return null;
1201
- }
1202
- return backgroundClip$1;
1203
- }
1204
- var backgroundClipExports = requireBackgroundClip();
1205
- const backgroundClip = /* @__PURE__ */ getDefaultExportFromCjs(backgroundClipExports);
1206
1190
  var crossFade$1 = {};
1207
1191
  function _typeof(obj) {
1208
1192
  "@babel/helpers - typeof";
@@ -1429,56 +1413,6 @@ function requireCrossFade() {
1429
1413
  }
1430
1414
  var crossFadeExports = requireCrossFade();
1431
1415
  const crossFade = /* @__PURE__ */ getDefaultExportFromCjs(crossFadeExports);
1432
- var cursor$1 = {};
1433
- var hasRequiredCursor;
1434
- function requireCursor() {
1435
- if (hasRequiredCursor) return cursor$1;
1436
- hasRequiredCursor = 1;
1437
- Object.defineProperty(cursor$1, "__esModule", {
1438
- value: true
1439
- });
1440
- cursor$1.default = cursor2;
1441
- var prefixes2 = ["-webkit-", "-moz-", ""];
1442
- var values = {
1443
- "zoom-in": true,
1444
- "zoom-out": true,
1445
- grab: true,
1446
- grabbing: true
1447
- };
1448
- function cursor2(property, value) {
1449
- if (property === "cursor" && values.hasOwnProperty(value)) {
1450
- return prefixes2.map(function(prefix) {
1451
- return prefix + value;
1452
- });
1453
- }
1454
- }
1455
- return cursor$1;
1456
- }
1457
- var cursorExports = requireCursor();
1458
- const cursor = /* @__PURE__ */ getDefaultExportFromCjs(cursorExports);
1459
- var filter$1 = {};
1460
- var hasRequiredFilter;
1461
- function requireFilter() {
1462
- if (hasRequiredFilter) return filter$1;
1463
- hasRequiredFilter = 1;
1464
- Object.defineProperty(filter$1, "__esModule", {
1465
- value: true
1466
- });
1467
- filter$1.default = filter2;
1468
- var _cssInJsUtils = require$$0$1;
1469
- var FILTER_REGEX = /filter\(/g;
1470
- var prefixes2 = ["-webkit-", ""];
1471
- function filter2(property, value) {
1472
- if (typeof value === "string" && !(0, _cssInJsUtils.isPrefixedValue)(value) && value.indexOf("filter(") !== -1) {
1473
- return prefixes2.map(function(prefix) {
1474
- return value.replace(FILTER_REGEX, prefix + "filter(");
1475
- });
1476
- }
1477
- }
1478
- return filter$1;
1479
- }
1480
- var filterExports = requireFilter();
1481
- const filter = /* @__PURE__ */ getDefaultExportFromCjs(filterExports);
1482
1416
  var imageSet$1 = {};
1483
1417
  var isPrefixedValue = {};
1484
1418
  var hasRequiredIsPrefixedValue;
@@ -1728,7 +1662,7 @@ var wm = ["Webkit", "Moz"];
1728
1662
  var wms = ["Webkit", "ms"];
1729
1663
  var wmms = ["Webkit", "Moz", "ms"];
1730
1664
  const staticData = {
1731
- plugins: [backgroundClip, crossFade, cursor, filter, imageSet, logical, position, sizing, transition],
1665
+ plugins: [crossFade, imageSet, logical, position, sizing, transition],
1732
1666
  prefixMap: {
1733
1667
  appearance: wmms,
1734
1668
  userSelect: wm,
@@ -2080,7 +2014,7 @@ function createAtomicRules(identifier, property, value) {
2080
2014
  var _block3 = createDeclarationBlock({
2081
2015
  pointerEvents: "auto"
2082
2016
  });
2083
- rules.push(selector + ">*" + _block3);
2017
+ rules.push(selector + " * " + _block3);
2084
2018
  }
2085
2019
  }
2086
2020
  var _block4 = createDeclarationBlock({
@@ -2436,6 +2370,21 @@ var createTextShadowValue = (style) => {
2436
2370
  return offsetX + " " + offsetY + " " + blurRadius + " " + color;
2437
2371
  }
2438
2372
  };
2373
+ var mapBoxShadow = (boxShadow) => {
2374
+ if (typeof boxShadow === "string") {
2375
+ return boxShadow;
2376
+ }
2377
+ var offsetX = normalizeValueWithProperty(boxShadow.offsetX) || 0;
2378
+ var offsetY = normalizeValueWithProperty(boxShadow.offsetY) || 0;
2379
+ var blurRadius = normalizeValueWithProperty(boxShadow.blurRadius) || 0;
2380
+ var spreadDistance = normalizeValueWithProperty(boxShadow.spreadDistance) || 0;
2381
+ var color = normalizeColor(boxShadow.color) || "black";
2382
+ var position2 = boxShadow.inset ? "inset " : "";
2383
+ return "" + position2 + offsetX + " " + offsetY + " " + blurRadius + " " + spreadDistance + " " + color;
2384
+ };
2385
+ var createBoxShadowArrayValue = (value) => {
2386
+ return value.map(mapBoxShadow).join(", ");
2387
+ };
2439
2388
  var mapTransform = (transform) => {
2440
2389
  var type = Object.keys(transform)[0];
2441
2390
  var value = transform[type];
@@ -2449,6 +2398,9 @@ var mapTransform = (transform) => {
2449
2398
  var createTransformValue = (value) => {
2450
2399
  return value.map(mapTransform).join(" ");
2451
2400
  };
2401
+ var createTransformOriginValue = (value) => {
2402
+ return value.map((v2) => normalizeValueWithProperty(v2)).join(" ");
2403
+ };
2452
2404
  var PROPERTIES_STANDARD = {
2453
2405
  borderBottomEndRadius: "borderEndEndRadius",
2454
2406
  borderBottomStartRadius: "borderEndStartRadius",
@@ -2485,18 +2437,16 @@ var preprocess = function preprocess2(originalStyle, options) {
2485
2437
  var nextStyle = {};
2486
2438
  if (options.shadow === true, style.shadowColor != null || style.shadowOffset != null || style.shadowOpacity != null || style.shadowRadius != null) {
2487
2439
  var boxShadowValue = createBoxShadowValue(style);
2488
- if (boxShadowValue != null && nextStyle.boxShadow == null) {
2489
- var boxShadow = style.boxShadow;
2490
- var value = boxShadow ? boxShadow + ", " + boxShadowValue : boxShadowValue;
2491
- nextStyle.boxShadow = value;
2440
+ if (boxShadowValue != null) {
2441
+ nextStyle.boxShadow = boxShadowValue;
2492
2442
  }
2493
2443
  }
2494
2444
  if (options.textShadow === true, style.textShadowColor != null || style.textShadowOffset != null || style.textShadowRadius != null) {
2495
2445
  var textShadowValue = createTextShadowValue(style);
2496
2446
  if (textShadowValue != null && nextStyle.textShadow == null) {
2497
2447
  var textShadow = style.textShadow;
2498
- var _value = textShadow ? textShadow + ", " + textShadowValue : textShadowValue;
2499
- nextStyle.textShadow = _value;
2448
+ var value = textShadow ? textShadow + ", " + textShadowValue : textShadowValue;
2449
+ nextStyle.textShadow = value;
2500
2450
  }
2501
2451
  }
2502
2452
  for (var originalProp in style) {
@@ -2508,28 +2458,39 @@ var preprocess = function preprocess2(originalStyle, options) {
2508
2458
  }
2509
2459
  var originalValue = style[originalProp];
2510
2460
  var prop = PROPERTIES_STANDARD[originalProp] || originalProp;
2511
- var _value2 = originalValue;
2461
+ var _value = originalValue;
2512
2462
  if (!Object.prototype.hasOwnProperty.call(style, originalProp) || prop !== originalProp && style[prop] != null) {
2513
2463
  continue;
2514
2464
  }
2515
- if (prop === "aspectRatio" && typeof _value2 === "number") {
2516
- nextStyle[prop] = _value2.toString();
2465
+ if (prop === "aspectRatio" && typeof _value === "number") {
2466
+ nextStyle[prop] = _value.toString();
2467
+ } else if (prop === "boxShadow") {
2468
+ if (Array.isArray(_value)) {
2469
+ _value = createBoxShadowArrayValue(_value);
2470
+ }
2471
+ var boxShadow = nextStyle.boxShadow;
2472
+ nextStyle.boxShadow = boxShadow ? _value + ", " + boxShadow : _value;
2517
2473
  } else if (prop === "fontVariant") {
2518
- if (Array.isArray(_value2) && _value2.length > 0) {
2519
- _value2 = _value2.join(" ");
2474
+ if (Array.isArray(_value) && _value.length > 0) {
2475
+ _value = _value.join(" ");
2520
2476
  }
2521
- nextStyle[prop] = _value2;
2477
+ nextStyle[prop] = _value;
2522
2478
  } else if (prop === "textAlignVertical") {
2523
2479
  if (style.verticalAlign == null) {
2524
- nextStyle.verticalAlign = _value2 === "center" ? "middle" : _value2;
2480
+ nextStyle.verticalAlign = _value === "center" ? "middle" : _value;
2525
2481
  }
2526
2482
  } else if (prop === "transform") {
2527
- if (Array.isArray(_value2)) {
2528
- _value2 = createTransformValue(_value2);
2483
+ if (Array.isArray(_value)) {
2484
+ _value = createTransformValue(_value);
2485
+ }
2486
+ nextStyle.transform = _value;
2487
+ } else if (prop === "transformOrigin") {
2488
+ if (Array.isArray(_value)) {
2489
+ _value = createTransformOriginValue(_value);
2529
2490
  }
2530
- nextStyle.transform = _value2;
2491
+ nextStyle.transformOrigin = _value;
2531
2492
  } else {
2532
- nextStyle[prop] = _value2;
2493
+ nextStyle[prop] = _value;
2533
2494
  }
2534
2495
  }
2535
2496
  return nextStyle;
@@ -3440,6 +3401,7 @@ var createElement = (component, props, options) => {
3440
3401
  }) : element;
3441
3402
  return elementWithLocaleProvider;
3442
3403
  };
3404
+ var client = {};
3443
3405
  var reactDom = { exports: {} };
3444
3406
  var reactDom_production_min = {};
3445
3407
  var scheduler = { exports: {} };
@@ -10027,11 +9989,11 @@ function requireReactDom_production_min() {
10027
9989
  };
10028
9990
  Gb = Qk;
10029
9991
  Hb = Rk;
10030
- var sl = { usingClientEntryPoint: false, Events: [Cb, ue, Db, Eb, Fb, Qk] }, tl = { findFiberByHostInstance: Wc, bundleType: 0, version: "18.3.1", rendererPackageName: "react-dom" };
9992
+ var sl = { usingClientEntryPoint: false, Events: [Cb, ue, Db, Eb, Fb, Qk] }, tl = { findFiberByHostInstance: Wc, bundleType: 0, version: "18.3.0", rendererPackageName: "react-dom" };
10031
9993
  var ul = { bundleType: tl.bundleType, version: tl.version, rendererPackageName: tl.rendererPackageName, rendererConfig: tl.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, overrideProps: null, overridePropsDeletePath: null, overridePropsRenamePath: null, setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, currentDispatcherRef: ua.ReactCurrentDispatcher, findHostInstanceByFiber: function(a) {
10032
9994
  a = Zb(a);
10033
9995
  return null === a ? null : a.stateNode;
10034
- }, findFiberByHostInstance: tl.findFiberByHostInstance || jl, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, reconcilerVersion: "18.3.1-next-f1338f8080-20240426" };
9996
+ }, findFiberByHostInstance: tl.findFiberByHostInstance || jl, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, reconcilerVersion: "18.3.0-next-8a015b68cc-20240425" };
10035
9997
  if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
10036
9998
  var vl = __REACT_DEVTOOLS_GLOBAL_HOOK__;
10037
9999
  if (!vl.isDisabled && vl.supportsFiber) try {
@@ -10106,7 +10068,7 @@ function requireReactDom_production_min() {
10106
10068
  if (null == a || void 0 === a._reactInternals) throw Error(p(38));
10107
10069
  return rl(a, b, c, false, d);
10108
10070
  };
10109
- reactDom_production_min.version = "18.3.1-next-f1338f8080-20240426";
10071
+ reactDom_production_min.version = "18.3.0-next-8a015b68cc-20240425";
10110
10072
  return reactDom_production_min;
10111
10073
  }
10112
10074
  var hasRequiredReactDom;
@@ -10129,8 +10091,6 @@ function requireReactDom() {
10129
10091
  }
10130
10092
  return reactDom.exports;
10131
10093
  }
10132
- var reactDomExports = requireReactDom();
10133
- var client = {};
10134
10094
  var hasRequiredClient;
10135
10095
  function requireClient() {
10136
10096
  if (hasRequiredClient) return client;
@@ -10143,7 +10103,6 @@ function requireClient() {
10143
10103
  return client;
10144
10104
  }
10145
10105
  var clientExports = requireClient();
10146
- const unmountComponentAtNode = reactDomExports.unmountComponentAtNode;
10147
10106
  function hydrate(element, root) {
10148
10107
  createSheet(root);
10149
10108
  return clientExports.hydrateRoot(root, element);
@@ -10154,23 +10113,9 @@ function render(element, root) {
10154
10113
  reactRoot.render(element);
10155
10114
  return reactRoot;
10156
10115
  }
10157
- function hydrateLegacy(element, root, callback) {
10158
- createSheet(root);
10159
- reactDomExports.hydrate(element, root, callback);
10160
- return {
10161
- unmount: function unmount() {
10162
- return unmountComponentAtNode(root);
10163
- }
10164
- };
10165
- }
10166
- function renderLegacy(element, root, callback) {
10167
- createSheet(root);
10168
- reactDomExports.render(element, root, callback);
10169
- return {
10170
- unmount: function unmount() {
10171
- return unmountComponentAtNode(root);
10172
- }
10173
- };
10116
+ function unmountComponentAtNode(rootTag) {
10117
+ rootTag.unmount();
10118
+ return true;
10174
10119
  }
10175
10120
  var getBoundingClientRect$1 = (node) => {
10176
10121
  if (node != null) {
@@ -11496,6 +11441,7 @@ var View = /* @__PURE__ */ reactExports.forwardRef((props, forwardedRef) => {
11496
11441
  View.displayName = "View";
11497
11442
  var styles$6 = stylesheet.create({
11498
11443
  view$raw: {
11444
+ alignContent: "flex-start",
11499
11445
  alignItems: "stretch",
11500
11446
  backgroundColor: "transparent",
11501
11447
  border: "0 solid black",
@@ -11572,8 +11518,8 @@ var styles$5 = stylesheet.create({
11572
11518
  }
11573
11519
  });
11574
11520
  function renderApplication(RootComponent, WrapperComponent, callback, options) {
11575
- var shouldHydrate = options.hydrate, initialProps = options.initialProps, mode = options.mode, rootTag = options.rootTag;
11576
- var renderFn = shouldHydrate ? mode === "concurrent" ? hydrate : hydrateLegacy : mode === "concurrent" ? render : renderLegacy;
11521
+ var shouldHydrate = options.hydrate, initialProps = options.initialProps, rootTag = options.rootTag;
11522
+ var renderFn = shouldHydrate ? hydrate : render;
11577
11523
  invariant(rootTag, "Expect to have a valid rootTag, instead got ", rootTag);
11578
11524
  return renderFn(/* @__PURE__ */ React.createElement(AppContainer, {
11579
11525
  WrapperComponent,
@@ -11656,6 +11602,7 @@ class AppRegistry {
11656
11602
  unmountComponentAtNode(rootTag);
11657
11603
  }
11658
11604
  }
11605
+ var reactDomExports = requireReactDom();
11659
11606
  var jsxRuntime = { exports: {} };
11660
11607
  var reactJsxRuntime_production_min = {};
11661
11608
  /**
@@ -12223,7 +12170,7 @@ var isContentEditable = function isContentEditable2(node) {
12223
12170
  var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, "contenteditable");
12224
12171
  return attValue === "" || attValue === "true";
12225
12172
  };
12226
- var getCandidates = function getCandidates2(el, includeContainer, filter2) {
12173
+ var getCandidates = function getCandidates2(el, includeContainer, filter) {
12227
12174
  if (isInert(el)) {
12228
12175
  return [];
12229
12176
  }
@@ -12231,7 +12178,7 @@ var getCandidates = function getCandidates2(el, includeContainer, filter2) {
12231
12178
  if (includeContainer && matches.call(el, candidateSelector)) {
12232
12179
  candidates.unshift(el);
12233
12180
  }
12234
- candidates = candidates.filter(filter2);
12181
+ candidates = candidates.filter(filter);
12235
12182
  return candidates;
12236
12183
  };
12237
12184
  var getCandidatesIteratively = function getCandidatesIteratively2(elements, includeContainer, options) {
package/dist/panel.html CHANGED
@@ -22,7 +22,7 @@
22
22
  <script>
23
23
  var __ROZENITE_PANEL__ = true;
24
24
  </script>
25
- <script type="module" crossorigin src="./assets/panel-CU9Fj1Ml.js"></script>
25
+ <script type="module" crossorigin src="./assets/panel-C0o5JcM0.js"></script>
26
26
  <link rel="stylesheet" crossorigin href="./assets/panel-DXGMsavf.css">
27
27
  </head>
28
28
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rozenite/network-activity-plugin",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.4",
4
4
  "description": "Network Activity for Rozenite.",
5
5
  "type": "module",
6
6
  "main": "./dist/react-native.cjs",
@@ -9,19 +9,22 @@
9
9
  "dependencies": {
10
10
  "@tanstack/react-virtual": "^3.0.0",
11
11
  "@floating-ui/react": "^0.26.0",
12
- "@rozenite/plugin-bridge": "1.0.0-alpha.3"
12
+ "@rozenite/plugin-bridge": "1.0.0-alpha.4"
13
13
  },
14
14
  "devDependencies": {
15
- "typescript": "^5.7.3",
16
15
  "vite": "^6.0.0",
17
- "react": "*",
18
- "react-native": "*",
19
- "@rozenite/vite-plugin": "1.0.0-alpha.3",
20
- "rozenite": "1.0.0-alpha.3"
16
+ "typescript": "^5.7.3",
17
+ "react-native-web": "0.21.0",
18
+ "react": "18.3.1",
19
+ "react-dom": "18.3.0",
20
+ "react-native": "0.76.0",
21
+ "@types/react": "~18.3.12",
22
+ "rozenite": "1.0.0-alpha.4",
23
+ "@rozenite/vite-plugin": "1.0.0-alpha.4"
21
24
  },
22
25
  "peerDependencies": {
23
- "react": ">= 17.0.0",
24
- "react-native": ">= 0.74.0"
26
+ "react": "*",
27
+ "react-native": "*"
25
28
  },
26
29
  "license": "MIT",
27
30
  "scripts": {
package/project.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
3
+ "name": "@rozenite/network-activity-plugin",
4
+ "targets": {
5
+ "build": {
6
+ "cache": true,
7
+ "dependsOn": ["^build"],
8
+ "inputs": ["{projectRoot}/src/**/*"],
9
+ "outputs": ["{projectRoot}/dist"]
10
+ }
11
+ }
12
+ }
@@ -0,0 +1 @@
1
+ {"root":["./src/css-modules.d.ts","./src/react-native/network-inspector.ts","./src/react-native/network-requests-registry.ts","./src/react-native/usenetworkactivitydevtools.ts","./src/react-native/xhr-interceptor.ts","./src/react-native/xml-request.d.ts","./src/types/client.ts","./src/types/network.ts","./src/ui/components.tsx","./src/ui/network-details.tsx","./src/ui/network-list.tsx","./src/ui/network-toolbar.tsx","./src/ui/panel.tsx","./src/ui/tanstack-query.tsx","./src/ui/utils.ts","./react-native.ts","./rozenite.config.ts"],"errors":true,"version":"5.8.3"}