@stellar-expert/ui-framework 1.16.8 → 1.17.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.
Files changed (78) hide show
  1. package/CLAUDE.md +35 -0
  2. package/README.md +1125 -3
  3. package/account/account-address.js +127 -127
  4. package/account/available-balance.js +22 -22
  5. package/account/identicon.js +90 -90
  6. package/account/signer-key.js +65 -64
  7. package/api/explorer-api-hooks.js +209 -202
  8. package/api/explorer-api-paginated-list-hooks.js +441 -440
  9. package/api/explorer-batch-info-loader.js +111 -85
  10. package/api/explorer-tx-api.js +28 -28
  11. package/api/ledger-stream.js +15 -0
  12. package/asset/amount.js +56 -56
  13. package/asset/asset-icon.js +41 -41
  14. package/asset/asset-issuer.js +21 -21
  15. package/asset/asset-link.js +107 -107
  16. package/asset/asset-list-hooks.js +59 -59
  17. package/asset/asset-meta-hooks.js +88 -88
  18. package/asset/asset-selector.js +72 -71
  19. package/claimable-balance/claimable-balance-claimants.js +23 -18
  20. package/contract/contract-api.js +15 -0
  21. package/contract/invocation-info-view.js +10 -2
  22. package/contract/sc-val.js +131 -107
  23. package/controls/button-group.js +25 -19
  24. package/controls/button.js +93 -78
  25. package/controls/code-block.js +42 -34
  26. package/controls/dropdown.js +318 -287
  27. package/controls/external-link.js +10 -4
  28. package/controls/info-tooltip.js +23 -16
  29. package/controls/slider.js +29 -19
  30. package/controls/tabs.js +94 -94
  31. package/controls/tooltip.js +244 -240
  32. package/controls/update-highlighter.js +32 -27
  33. package/date/date-selector.js +56 -54
  34. package/date/elapsed-time.js +28 -21
  35. package/dex/price-dynamic.js +53 -44
  36. package/directory/directory-hooks.js +109 -97
  37. package/effect/effect-description.js +346 -344
  38. package/errors/error-boundary.js +110 -97
  39. package/horizon/horizon-account-helpers.js +104 -104
  40. package/horizon/horizon-ledger-helpers.js +35 -35
  41. package/horizon/horizon-trades-helper.js +88 -88
  42. package/horizon/horizon-transaction-helpers.js +36 -36
  43. package/index.d.ts +1241 -0
  44. package/interaction/accordion.js +43 -35
  45. package/interaction/autofocus.js +13 -9
  46. package/interaction/block-select.js +64 -53
  47. package/interaction/copy-to-clipboard.js +25 -18
  48. package/interaction/inline-progress.js +20 -15
  49. package/interaction/qr-code.js +34 -34
  50. package/interaction/responsive.js +20 -20
  51. package/interaction/spoiler.js +52 -39
  52. package/interaction/theme-selector.js +13 -10
  53. package/ledger/ledger-entry-href-formatter.js +27 -26
  54. package/ledger/ledger-entry-link.js +93 -58
  55. package/ledger/ledger-info-parser.js +46 -18
  56. package/meta/page-meta-tags.js +243 -238
  57. package/module/dynamic-module.js +47 -47
  58. package/package.json +41 -40
  59. package/state/on-screen-hooks.js +22 -22
  60. package/state/page-visibility-helpers.js +29 -16
  61. package/state/page-visibility-hooks.js +13 -11
  62. package/state/screen-orientation-hooks.js +19 -15
  63. package/state/state-hooks.js +76 -76
  64. package/state/stellar-network-hooks.js +56 -44
  65. package/state/theme.js +29 -28
  66. package/stellar/key-type.js +92 -91
  67. package/stellar/ledger-generic-id.js +39 -39
  68. package/stellar/signature-hint-utils.js +65 -65
  69. package/toast/toast-notifications-block.js +59 -59
  70. package/tx/op-description-view.js +945 -942
  71. package/tx/op-icon.js +98 -98
  72. package/tx/parser/op-balance-changes.js +66 -66
  73. package/tx/parser/op-descriptor.js +51 -48
  74. package/tx/parser/tx-details-parser.js +81 -81
  75. package/tx/parser/tx-matcher.js +371 -371
  76. package/tx/parser/type-filter-matcher.js +126 -126
  77. package/tx/tx-list-hooks.js +32 -18
  78. package/tx/tx-operations-list.js +117 -116
package/CLAUDE.md ADDED
@@ -0,0 +1,35 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ `@stellar-expert/ui-framework` is a shared React UI component library for the StellarExpert Stellar blockchain explorer. It is consumed as an npm package by other StellarExpert applications — it is not a standalone app.
8
+
9
+ ## Development Setup
10
+
11
+ - **Package manager:** PNPM (configured via `.npmrc` with `auto-install-peers=true`)
12
+ - **Install dependencies:** `pnpm install`
13
+ - **No build step:** Components are raw ES modules consumed directly via imports. There is no bundler, transpiler, or build script in this repo.
14
+ - **No test suite:** No testing framework is configured.
15
+
16
+ ## Architecture
17
+
18
+ ### Module Organization
19
+
20
+ Each feature domain lives in its own top-level directory (e.g., `account/`, `asset/`, `contract/`, `controls/`). The main entry point `index.js` re-exports everything and also sets global defaults (`window.explorerFrontendOrigin`, `window.explorerApiOrigin`, `window.horizonOrigin`).
21
+
22
+ ### Key Patterns
23
+
24
+ - **Functional React components** with `React.memo` for optimization and `PropTypes` for runtime type checking (no TypeScript).
25
+ - **Custom state hooks** instead of Redux/MobX — see `state/state-hooks.js` for `useDependantState` (auto-reinits on deep-compared dependency changes), `useForceUpdate`, and `useDeepEffect`.
26
+ - **SCSS styling** with CSS custom properties for theming. Global styles imported via `index.scss`. Theme system supports `day`/`night` modes via `data-theme` attribute on `<html>`. SCSS files are marked as side effects in `package.json`.
27
+ - **API layer** in `api/` uses custom hooks (`useExplorerApi`) with built-in caching, auto-refresh on visibility, and Stellar network awareness via `useStellarNetwork`.
28
+ - **Peer dependencies** are critical — the consuming app must provide React, Stellar SDK, and the `@stellar-expert/*` utility packages listed in `package.json`.
29
+
30
+ ### Global Configuration
31
+
32
+ The library expects these globals (with defaults set in `index.js`):
33
+ - `window.explorerFrontendOrigin` — StellarExpert frontend URL
34
+ - `window.explorerApiOrigin` — StellarExpert API URL
35
+ - `window.horizonOrigin` — Stellar Horizon API URL