@lukso/transaction-view-headless 0.4.3-dev.a07a66f → 0.4.3-dev.e33b252

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.
Files changed (39) hide show
  1. package/.turbo/turbo-build.log +31 -33
  2. package/CONTEXT_VARIANT_GUIDE.md +4 -4
  3. package/dist/composables/index.cjs +1 -1
  4. package/dist/composables/index.cjs.map +1 -1
  5. package/dist/composables/index.d.cts +3 -3
  6. package/dist/composables/index.d.ts +3 -3
  7. package/dist/composables/index.js +1 -1
  8. package/dist/composables/index.js.map +1 -1
  9. package/dist/{index-CNUHqRdk.d.ts → index-CMLU1hKL.d.ts} +2 -2
  10. package/dist/{index-BqL7xdDl.d.cts → index-CSDjhiKV.d.cts} +2 -2
  11. package/dist/index.cjs +1 -60
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.d.cts +4 -5
  14. package/dist/index.d.ts +4 -5
  15. package/dist/index.js +1 -55
  16. package/dist/index.js.map +1 -1
  17. package/dist/registry/index.d.cts +2 -2
  18. package/dist/registry/index.d.ts +2 -2
  19. package/dist/types/index.cjs +0 -68
  20. package/dist/types/index.cjs.map +1 -1
  21. package/dist/types/index.d.cts +169 -229
  22. package/dist/types/index.d.ts +169 -229
  23. package/dist/types/index.js +0 -55
  24. package/dist/types/index.js.map +1 -1
  25. package/dist/utils/index.d.cts +1 -1
  26. package/dist/utils/index.d.ts +1 -1
  27. package/dist/{view-loader--mEEI8YY.d.ts → view-loader-dD86QAlQ.d.cts} +1 -1
  28. package/dist/{view-loader-D7ApWfdN.d.cts → view-loader-ii8AxiQR.d.ts} +1 -1
  29. package/package.json +3 -3
  30. package/src/composables/use-transaction-playback.ts +5 -8
  31. package/src/types/index.ts +0 -14
  32. package/ARG_ACCESS_PATTERN.md +0 -265
  33. package/EVENT_SYSTEM_SUMMARY.md +0 -601
  34. package/HEADER_EVENTS_GUIDE.md +0 -291
  35. package/RECOMPOSITION_REFERENCE.md +0 -303
  36. package/TRANSACTION_MODIFICATION_GUIDE.md +0 -927
  37. package/dist/view-matching-C9G3z8lQ.d.cts +0 -203
  38. package/dist/view-matching-C9G3z8lQ.d.ts +0 -203
  39. package/src/types/view-events.ts +0 -322
package/dist/index.cjs CHANGED
@@ -388,7 +388,6 @@ __export(src_exports, {
388
388
  CRITERIA_WEIGHTS: () => CRITERIA_WEIGHTS,
389
389
  DefaultViewRegistry: () => DefaultViewRegistry,
390
390
  LoaderHelpers: () => LoaderHelpers,
391
- TransactionViewEvents: () => TransactionViewEvents,
392
391
  UniversalViewLoader: () => UniversalViewLoader,
393
392
  ViewLoadingError: () => ViewLoadingError,
394
393
  addressQueryOptions: () => addressQueryOptions,
@@ -399,8 +398,6 @@ __export(src_exports, {
399
398
  createAddressResolutionState: () => createAddressResolutionState,
400
399
  createTransactionPlayback: () => createTransactionPlayback,
401
400
  currentChainSignal: () => currentChainSignal,
402
- dispatchHeaderInfo: () => dispatchHeaderInfo,
403
- dispatchTransactionModification: () => dispatchTransactionModification,
404
401
  findAllTransactionViews: () => findAllTransactionViews,
405
402
  findBestTransactionView: () => findBestTransactionView,
406
403
  findMatchingViews: () => findMatchingViews,
@@ -416,8 +413,6 @@ __export(src_exports, {
416
413
  getValidPlaybackIndices: () => getValidPlaybackIndices,
417
414
  initializeChainSignal: () => initializeChainSignal,
418
415
  isAddressResolutionEnabled: () => isAddressResolutionEnabled,
419
- isHeaderInfoEvent: () => isHeaderInfoEvent,
420
- isTransactionModificationEvent: () => isTransactionModificationEvent,
421
416
  isValidPlaybackIndex: () => isValidPlaybackIndex,
422
417
  queryAddress: () => queryAddress,
423
418
  queryAddresses: () => queryAddresses,
@@ -868,7 +863,7 @@ function resetGlobalRegistry() {
868
863
 
869
864
  // src/composables/use-transaction-playback.ts
870
865
  function isBatchTransaction(transaction) {
871
- return transaction.resultType === "executeBatch";
866
+ return transaction.resultType === "executeBatch" || transaction.resultType === "setDataBatch" || !!transaction.children?.length;
872
867
  }
873
868
  function getBatchChildren(transaction) {
874
869
  if (!isBatchTransaction(transaction)) {
@@ -1488,61 +1483,11 @@ function getAllAddressQueryKeys(address) {
1488
1483
 
1489
1484
  // src/index.ts
1490
1485
  init_useAddressResolution();
1491
-
1492
- // src/types/view-events.ts
1493
- var TransactionViewEvents = {
1494
- /**
1495
- * Emitted when a view wants to provide custom header information
1496
- * Parent containers should listen for this event and update their header accordingly
1497
- */
1498
- HEADER_INFO: "header-info",
1499
- /**
1500
- * Emitted when a view modifies its transaction data
1501
- * Parent containers should listen, re-wrap if needed, and update the transaction
1502
- */
1503
- TRANSACTION_MODIFICATION: "transaction-modification",
1504
- /**
1505
- * Emitted when a view's state changes (future use)
1506
- * @example Loading state, error state, interactive state changes
1507
- */
1508
- STATE_CHANGE: "view-state-change",
1509
- /**
1510
- * Emitted when a view has an action for the user (future use)
1511
- * @example "Approve", "Reject", "Sign"
1512
- */
1513
- ACTION: "view-action"
1514
- };
1515
- function dispatchHeaderInfo(element, headerInfo) {
1516
- element.dispatchEvent(
1517
- new CustomEvent(TransactionViewEvents.HEADER_INFO, {
1518
- bubbles: true,
1519
- composed: true,
1520
- // Allows event to cross shadow DOM boundaries
1521
- detail: headerInfo
1522
- })
1523
- );
1524
- }
1525
- function isHeaderInfoEvent(event) {
1526
- return event instanceof CustomEvent && event.type === TransactionViewEvents.HEADER_INFO;
1527
- }
1528
- function dispatchTransactionModification(element, modification) {
1529
- element.dispatchEvent(
1530
- new CustomEvent(TransactionViewEvents.TRANSACTION_MODIFICATION, {
1531
- bubbles: true,
1532
- composed: true,
1533
- detail: modification
1534
- })
1535
- );
1536
- }
1537
- function isTransactionModificationEvent(event) {
1538
- return event instanceof CustomEvent && event.type === TransactionViewEvents.TRANSACTION_MODIFICATION;
1539
- }
1540
1486
  // Annotate the CommonJS export names for ESM import in node:
1541
1487
  0 && (module.exports = {
1542
1488
  CRITERIA_WEIGHTS,
1543
1489
  DefaultViewRegistry,
1544
1490
  LoaderHelpers,
1545
- TransactionViewEvents,
1546
1491
  UniversalViewLoader,
1547
1492
  ViewLoadingError,
1548
1493
  addressQueryOptions,
@@ -1553,8 +1498,6 @@ function isTransactionModificationEvent(event) {
1553
1498
  createAddressResolutionState,
1554
1499
  createTransactionPlayback,
1555
1500
  currentChainSignal,
1556
- dispatchHeaderInfo,
1557
- dispatchTransactionModification,
1558
1501
  findAllTransactionViews,
1559
1502
  findBestTransactionView,
1560
1503
  findMatchingViews,
@@ -1570,8 +1513,6 @@ function isTransactionModificationEvent(event) {
1570
1513
  getValidPlaybackIndices,
1571
1514
  initializeChainSignal,
1572
1515
  isAddressResolutionEnabled,
1573
- isHeaderInfoEvent,
1574
- isTransactionModificationEvent,
1575
1516
  isValidPlaybackIndex,
1576
1517
  queryAddress,
1577
1518
  queryAddresses,