react-markup 0.0.0-experimental-f7396427-20250501 → 0.0.0-experimental-b9cfa0d3-20250505

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.
@@ -9054,5 +9054,5 @@
9054
9054
  });
9055
9055
  });
9056
9056
  };
9057
- exports.version = "19.2.0-experimental-f7396427-20250501";
9057
+ exports.version = "19.2.0-experimental-b9cfa0d3-20250505";
9058
9058
  })();
@@ -6089,4 +6089,4 @@ exports.experimental_renderToHTML = function (children, options) {
6089
6089
  });
6090
6090
  });
6091
6091
  };
6092
- exports.version = "19.2.0-experimental-f7396427-20250501";
6092
+ exports.version = "19.2.0-experimental-b9cfa0d3-20250505";
@@ -1678,6 +1678,7 @@
1678
1678
  return "$B" + newTask.id.toString(16);
1679
1679
  }
1680
1680
  function renderModel(request, task, parent, key, value) {
1681
+ serializedSize += key.length;
1681
1682
  var prevKeyPath = task.keyPath,
1682
1683
  prevImplicitSlot = task.implicitSlot;
1683
1684
  try {
@@ -1755,7 +1756,6 @@
1755
1756
  value
1756
1757
  ) {
1757
1758
  task.model = value;
1758
- serializedSize += parentPropertyName.length;
1759
1759
  if (value === REACT_ELEMENT_TYPE) return "$";
1760
1760
  if (null === value) return null;
1761
1761
  if ("object" === typeof value) {
@@ -2524,41 +2524,34 @@
2524
2524
  }
2525
2525
  function emitChunk(request, task, value) {
2526
2526
  var id = task.id;
2527
- if (value instanceof ArrayBuffer)
2528
- emitTypedArrayChunk(request, id, "A", new Uint8Array(value));
2529
- else if (value instanceof Int8Array)
2530
- emitTypedArrayChunk(request, id, "O", value);
2531
- else if (value instanceof Uint8Array)
2532
- emitTypedArrayChunk(request, id, "o", value);
2533
- else if (value instanceof Uint8ClampedArray)
2534
- emitTypedArrayChunk(request, id, "U", value);
2535
- else if (value instanceof Int16Array)
2536
- emitTypedArrayChunk(request, id, "S", value);
2537
- else if (value instanceof Uint16Array)
2538
- emitTypedArrayChunk(request, id, "s", value);
2539
- else if (value instanceof Int32Array)
2540
- emitTypedArrayChunk(request, id, "L", value);
2541
- else if (value instanceof Uint32Array)
2542
- emitTypedArrayChunk(request, id, "l", value);
2543
- else if (value instanceof Float32Array)
2544
- emitTypedArrayChunk(request, id, "G", value);
2545
- else if (value instanceof Float64Array)
2546
- emitTypedArrayChunk(request, id, "g", value);
2547
- else if (value instanceof BigInt64Array)
2548
- emitTypedArrayChunk(request, id, "M", value);
2549
- else if (value instanceof BigUint64Array)
2550
- emitTypedArrayChunk(request, id, "m", value);
2551
- else if (value instanceof DataView)
2552
- emitTypedArrayChunk(request, id, "V", value);
2553
- else {
2554
- id = serializedSize;
2555
- try {
2556
- var json = stringify(value, task.toJSON);
2557
- emitModelChunk(request, task.id, json);
2558
- } finally {
2559
- serializedSize = id;
2560
- }
2561
- }
2527
+ value instanceof ArrayBuffer
2528
+ ? emitTypedArrayChunk(request, id, "A", new Uint8Array(value))
2529
+ : value instanceof Int8Array
2530
+ ? emitTypedArrayChunk(request, id, "O", value)
2531
+ : value instanceof Uint8Array
2532
+ ? emitTypedArrayChunk(request, id, "o", value)
2533
+ : value instanceof Uint8ClampedArray
2534
+ ? emitTypedArrayChunk(request, id, "U", value)
2535
+ : value instanceof Int16Array
2536
+ ? emitTypedArrayChunk(request, id, "S", value)
2537
+ : value instanceof Uint16Array
2538
+ ? emitTypedArrayChunk(request, id, "s", value)
2539
+ : value instanceof Int32Array
2540
+ ? emitTypedArrayChunk(request, id, "L", value)
2541
+ : value instanceof Uint32Array
2542
+ ? emitTypedArrayChunk(request, id, "l", value)
2543
+ : value instanceof Float32Array
2544
+ ? emitTypedArrayChunk(request, id, "G", value)
2545
+ : value instanceof Float64Array
2546
+ ? emitTypedArrayChunk(request, id, "g", value)
2547
+ : value instanceof BigInt64Array
2548
+ ? emitTypedArrayChunk(request, id, "M", value)
2549
+ : value instanceof BigUint64Array
2550
+ ? emitTypedArrayChunk(request, id, "m", value)
2551
+ : value instanceof DataView
2552
+ ? emitTypedArrayChunk(request, id, "V", value)
2553
+ : ((value = stringify(value, task.toJSON)),
2554
+ emitModelChunk(request, task.id, value));
2562
2555
  }
2563
2556
  function erroredTask$1(request, task, error) {
2564
2557
  task.timed && emitTimingChunk(request, task.id, performance.now());
@@ -2581,6 +2574,7 @@
2581
2574
  if (task.status === PENDING$3) {
2582
2575
  var prevDebugID = debugID;
2583
2576
  task.status = RENDERING$1;
2577
+ var parentSerializedSize = serializedSize;
2584
2578
  try {
2585
2579
  modelRoot = task.model;
2586
2580
  debugID = task.id;
@@ -2642,17 +2636,18 @@
2642
2636
  } else erroredTask$1(request, task, x);
2643
2637
  }
2644
2638
  } finally {
2645
- debugID = prevDebugID;
2639
+ (debugID = prevDebugID), (serializedSize = parentSerializedSize);
2646
2640
  }
2647
2641
  }
2648
2642
  }
2649
2643
  function tryStreamTask(request, task) {
2650
2644
  var prevDebugID = debugID;
2651
2645
  debugID = null;
2646
+ var parentSerializedSize = serializedSize;
2652
2647
  try {
2653
2648
  emitChunk(request, task, task.model);
2654
2649
  } finally {
2655
- debugID = prevDebugID;
2650
+ (serializedSize = parentSerializedSize), (debugID = prevDebugID);
2656
2651
  }
2657
2652
  }
2658
2653
  function performWork$1(request) {
@@ -12522,11 +12517,11 @@
12522
12517
  throw Error("useId can only be used while React is rendering");
12523
12518
  var id = currentRequest$1.identifierCount++;
12524
12519
  return (
12525
- ":" +
12520
+ "\u00ab" +
12526
12521
  currentRequest$1.identifierPrefix +
12527
12522
  "S" +
12528
12523
  id.toString(32) +
12529
- ":"
12524
+ "\u00bb"
12530
12525
  );
12531
12526
  },
12532
12527
  useHostTransitionStatus: unsupportedHook,
@@ -13894,5 +13889,5 @@
13894
13889
  });
13895
13890
  });
13896
13891
  };
13897
- exports.version = "19.2.0-experimental-f7396427-20250501";
13892
+ exports.version = "19.2.0-experimental-b9cfa0d3-20250505";
13898
13893
  })();
@@ -258,7 +258,13 @@ function useId$1() {
258
258
  if (null === currentRequest$1)
259
259
  throw Error("useId can only be used while React is rendering");
260
260
  var id = currentRequest$1.identifierCount++;
261
- return ":" + currentRequest$1.identifierPrefix + "S" + id.toString(32) + ":";
261
+ return (
262
+ "\u00ab" +
263
+ currentRequest$1.identifierPrefix +
264
+ "S" +
265
+ id.toString(32) +
266
+ "\u00bb"
267
+ );
262
268
  }
263
269
  function use$1(usable) {
264
270
  if (
@@ -711,7 +717,7 @@ function serializeReadableStream(request, task, stream) {
711
717
  try {
712
718
  (streamTask.model = entry.value),
713
719
  request.pendingChunks++,
714
- emitChunk(request, streamTask, streamTask.model),
720
+ tryStreamTask(request, streamTask),
715
721
  enqueueFlush(request),
716
722
  reader.read().then(progress, error);
717
723
  } catch (x$9) {
@@ -786,7 +792,7 @@ function serializeAsyncIterable(request, task, iterable, iterator) {
786
792
  try {
787
793
  (streamTask.model = entry.value),
788
794
  request.pendingChunks++,
789
- emitChunk(request, streamTask, streamTask.model),
795
+ tryStreamTask(request, streamTask),
790
796
  enqueueFlush(request),
791
797
  iterator.next().then(progress, error);
792
798
  } catch (x$10) {
@@ -1015,6 +1021,7 @@ function createTask(request, model, keyPath, implicitSlot, abortSet) {
1015
1021
  return pingTask$1(request, task);
1016
1022
  },
1017
1023
  toJSON: function (parentPropertyName, value) {
1024
+ serializedSize += parentPropertyName.length;
1018
1025
  var prevKeyPath = task.keyPath,
1019
1026
  prevImplicitSlot = task.implicitSlot;
1020
1027
  try {
@@ -1167,7 +1174,6 @@ function renderModelDestructive(
1167
1174
  value
1168
1175
  ) {
1169
1176
  task.model = value;
1170
- serializedSize += parentPropertyName.length;
1171
1177
  if (value === REACT_ELEMENT_TYPE) return "$";
1172
1178
  if (null === value) return null;
1173
1179
  if ("object" === typeof value) {
@@ -1521,41 +1527,34 @@ function emitTypedArrayChunk(request, id, tag, typedArray) {
1521
1527
  }
1522
1528
  function emitChunk(request, task, value) {
1523
1529
  var id = task.id;
1524
- if (value instanceof ArrayBuffer)
1525
- emitTypedArrayChunk(request, id, "A", new Uint8Array(value));
1526
- else if (value instanceof Int8Array)
1527
- emitTypedArrayChunk(request, id, "O", value);
1528
- else if (value instanceof Uint8Array)
1529
- emitTypedArrayChunk(request, id, "o", value);
1530
- else if (value instanceof Uint8ClampedArray)
1531
- emitTypedArrayChunk(request, id, "U", value);
1532
- else if (value instanceof Int16Array)
1533
- emitTypedArrayChunk(request, id, "S", value);
1534
- else if (value instanceof Uint16Array)
1535
- emitTypedArrayChunk(request, id, "s", value);
1536
- else if (value instanceof Int32Array)
1537
- emitTypedArrayChunk(request, id, "L", value);
1538
- else if (value instanceof Uint32Array)
1539
- emitTypedArrayChunk(request, id, "l", value);
1540
- else if (value instanceof Float32Array)
1541
- emitTypedArrayChunk(request, id, "G", value);
1542
- else if (value instanceof Float64Array)
1543
- emitTypedArrayChunk(request, id, "g", value);
1544
- else if (value instanceof BigInt64Array)
1545
- emitTypedArrayChunk(request, id, "M", value);
1546
- else if (value instanceof BigUint64Array)
1547
- emitTypedArrayChunk(request, id, "m", value);
1548
- else if (value instanceof DataView)
1549
- emitTypedArrayChunk(request, id, "V", value);
1550
- else {
1551
- id = serializedSize;
1552
- try {
1553
- var json = stringify(value, task.toJSON);
1554
- emitModelChunk(request, task.id, json);
1555
- } finally {
1556
- serializedSize = id;
1557
- }
1558
- }
1530
+ value instanceof ArrayBuffer
1531
+ ? emitTypedArrayChunk(request, id, "A", new Uint8Array(value))
1532
+ : value instanceof Int8Array
1533
+ ? emitTypedArrayChunk(request, id, "O", value)
1534
+ : value instanceof Uint8Array
1535
+ ? emitTypedArrayChunk(request, id, "o", value)
1536
+ : value instanceof Uint8ClampedArray
1537
+ ? emitTypedArrayChunk(request, id, "U", value)
1538
+ : value instanceof Int16Array
1539
+ ? emitTypedArrayChunk(request, id, "S", value)
1540
+ : value instanceof Uint16Array
1541
+ ? emitTypedArrayChunk(request, id, "s", value)
1542
+ : value instanceof Int32Array
1543
+ ? emitTypedArrayChunk(request, id, "L", value)
1544
+ : value instanceof Uint32Array
1545
+ ? emitTypedArrayChunk(request, id, "l", value)
1546
+ : value instanceof Float32Array
1547
+ ? emitTypedArrayChunk(request, id, "G", value)
1548
+ : value instanceof Float64Array
1549
+ ? emitTypedArrayChunk(request, id, "g", value)
1550
+ : value instanceof BigInt64Array
1551
+ ? emitTypedArrayChunk(request, id, "M", value)
1552
+ : value instanceof BigUint64Array
1553
+ ? emitTypedArrayChunk(request, id, "m", value)
1554
+ : value instanceof DataView
1555
+ ? emitTypedArrayChunk(request, id, "V", value)
1556
+ : ((value = stringify(value, task.toJSON)),
1557
+ emitModelChunk(request, task.id, value));
1559
1558
  }
1560
1559
  function erroredTask$1(request, task, error) {
1561
1560
  task.status = 4;
@@ -1573,6 +1572,7 @@ var emptyRoot = {};
1573
1572
  function retryTask$1(request, task) {
1574
1573
  if (0 === task.status) {
1575
1574
  task.status = 5;
1575
+ var parentSerializedSize = serializedSize;
1576
1576
  try {
1577
1577
  modelRoot = task.model;
1578
1578
  var resolvedModel = renderModelDestructive(
@@ -1627,9 +1627,18 @@ function retryTask$1(request, task) {
1627
1627
  } else erroredTask$1(request, task, x);
1628
1628
  }
1629
1629
  } finally {
1630
+ serializedSize = parentSerializedSize;
1630
1631
  }
1631
1632
  }
1632
1633
  }
1634
+ function tryStreamTask(request, task) {
1635
+ var parentSerializedSize = serializedSize;
1636
+ try {
1637
+ emitChunk(request, task, task.model);
1638
+ } finally {
1639
+ serializedSize = parentSerializedSize;
1640
+ }
1641
+ }
1633
1642
  function performWork$1(request) {
1634
1643
  var prevDispatcher = ReactSharedInternalsServer.H;
1635
1644
  ReactSharedInternalsServer.H = HooksDispatcher$1;
@@ -9052,4 +9061,4 @@ exports.experimental_renderToHTML = function (children, options) {
9052
9061
  });
9053
9062
  });
9054
9063
  };
9055
- exports.version = "19.2.0-experimental-f7396427-20250501";
9064
+ exports.version = "19.2.0-experimental-b9cfa0d3-20250505";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-markup",
3
- "version": "0.0.0-experimental-f7396427-20250501",
3
+ "version": "0.0.0-experimental-b9cfa0d3-20250505",
4
4
  "description": "React package generating embedded markup such as e-mails with support for Server Components.",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "homepage": "https://react.dev/",
19
19
  "peerDependencies": {
20
- "react": "0.0.0-experimental-f7396427-20250501"
20
+ "react": "0.0.0-experimental-b9cfa0d3-20250505"
21
21
  },
22
22
  "files": [
23
23
  "LICENSE",