@owlmeans/web-payment 0.1.18-rc.31 → 0.1.18-rc.32

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 (133) hide show
  1. package/README.md +4 -3
  2. package/agent-meta/manifest.json +2 -2
  3. package/agent-meta/skills/web-payment/SKILL.md +27 -27
  4. package/build/amount/types.d.ts +10 -0
  5. package/build/amount/types.d.ts.map +1 -0
  6. package/build/amount/types.js +2 -0
  7. package/build/amount/types.js.map +1 -0
  8. package/build/amount.d.ts +3 -4
  9. package/build/amount.d.ts.map +1 -1
  10. package/build/amount.js +24 -21
  11. package/build/amount.js.map +1 -1
  12. package/build/consumer/cancellation.js +1 -1
  13. package/build/consumer/cancellation.js.map +1 -1
  14. package/build/consumer/copy/types.d.ts +20 -0
  15. package/build/consumer/copy/types.d.ts.map +1 -0
  16. package/build/consumer/copy/types.js +2 -0
  17. package/build/consumer/copy/types.js.map +1 -0
  18. package/build/consumer/copy.d.ts +5 -17
  19. package/build/consumer/copy.d.ts.map +1 -1
  20. package/build/consumer/copy.js +54 -63
  21. package/build/consumer/copy.js.map +1 -1
  22. package/build/consumer/ensure.d.ts.map +1 -1
  23. package/build/consumer/ensure.js +3 -2
  24. package/build/consumer/ensure.js.map +1 -1
  25. package/build/consumer/errors.d.ts +13 -0
  26. package/build/consumer/errors.d.ts.map +1 -0
  27. package/build/consumer/errors.js +26 -0
  28. package/build/consumer/errors.js.map +1 -0
  29. package/build/consumer/hooks.d.ts +5 -1
  30. package/build/consumer/hooks.d.ts.map +1 -1
  31. package/build/consumer/hooks.js +13 -8
  32. package/build/consumer/hooks.js.map +1 -1
  33. package/build/consumer/index.d.ts +3 -0
  34. package/build/consumer/index.d.ts.map +1 -1
  35. package/build/consumer/index.js +1 -0
  36. package/build/consumer/index.js.map +1 -1
  37. package/build/consumer/legal.d.ts.map +1 -1
  38. package/build/consumer/legal.js +7 -6
  39. package/build/consumer/legal.js.map +1 -1
  40. package/build/consumer/performance-consent-dialog.js +1 -1
  41. package/build/consumer/performance-consent-dialog.js.map +1 -1
  42. package/build/consumer/refusal/types.d.ts +29 -0
  43. package/build/consumer/refusal/types.d.ts.map +1 -0
  44. package/build/consumer/refusal/types.js +2 -0
  45. package/build/consumer/refusal/types.js.map +1 -0
  46. package/build/consumer/refusal.d.ts +6 -32
  47. package/build/consumer/refusal.d.ts.map +1 -1
  48. package/build/consumer/refusal.js +53 -85
  49. package/build/consumer/refusal.js.map +1 -1
  50. package/build/consumer/subscription-start-dialog.js +1 -1
  51. package/build/consumer/subscription-start-dialog.js.map +1 -1
  52. package/build/consumer/types.d.ts +9 -3
  53. package/build/consumer/types.d.ts.map +1 -1
  54. package/build/consumer/types.local.d.ts.map +1 -1
  55. package/build/consumer/withdrawal.d.ts.map +1 -1
  56. package/build/consumer/withdrawal.js +7 -6
  57. package/build/consumer/withdrawal.js.map +1 -1
  58. package/build/copy.js +2 -2
  59. package/build/copy.js.map +1 -1
  60. package/build/dialog.js +9 -9
  61. package/build/dialog.js.map +1 -1
  62. package/build/entitlement.d.ts.map +1 -1
  63. package/build/entitlement.js +5 -5
  64. package/build/entitlement.js.map +1 -1
  65. package/build/estimate-summary.js +2 -2
  66. package/build/estimate-summary.js.map +1 -1
  67. package/build/format/types.d.ts +18 -0
  68. package/build/format/types.d.ts.map +1 -0
  69. package/build/format/types.js +2 -0
  70. package/build/format/types.js.map +1 -0
  71. package/build/format.d.ts +3 -29
  72. package/build/format.d.ts.map +1 -1
  73. package/build/format.js +60 -67
  74. package/build/format.js.map +1 -1
  75. package/build/i18n.js +9 -9
  76. package/build/i18n.js.map +1 -1
  77. package/build/index.d.ts +3 -0
  78. package/build/index.d.ts.map +1 -1
  79. package/build/index.js.map +1 -1
  80. package/build/limit-meter.js +2 -2
  81. package/build/limit-meter.js.map +1 -1
  82. package/build/plan-card.js +2 -2
  83. package/build/plan-card.js.map +1 -1
  84. package/build/selectors/types.d.ts +21 -0
  85. package/build/selectors/types.d.ts.map +1 -0
  86. package/build/selectors/types.js +2 -0
  87. package/build/selectors/types.js.map +1 -0
  88. package/build/selectors.d.ts +7 -11
  89. package/build/selectors.d.ts.map +1 -1
  90. package/build/selectors.js +71 -70
  91. package/build/selectors.js.map +1 -1
  92. package/build/types.d.ts +2 -4
  93. package/build/types.d.ts.map +1 -1
  94. package/package.json +9 -9
  95. package/src/amount/types.ts +9 -0
  96. package/src/amount.ts +25 -18
  97. package/src/consumer/cancellation.tsx +1 -1
  98. package/src/consumer/copy/types.ts +20 -0
  99. package/src/consumer/copy.ts +53 -59
  100. package/src/consumer/ensure.ts +3 -2
  101. package/src/consumer/errors.ts +30 -0
  102. package/src/consumer/hooks.ts +16 -9
  103. package/src/consumer/index.ts +3 -0
  104. package/src/consumer/legal.tsx +7 -6
  105. package/src/consumer/performance-consent-dialog.tsx +1 -1
  106. package/src/consumer/refusal/types.ts +29 -0
  107. package/src/consumer/refusal.ts +55 -85
  108. package/src/consumer/subscription-start-dialog.tsx +1 -1
  109. package/src/consumer/types.local.ts +1 -0
  110. package/src/consumer/types.ts +3 -3
  111. package/src/consumer/withdrawal.tsx +7 -6
  112. package/src/copy.tsx +2 -2
  113. package/src/dialog.tsx +9 -9
  114. package/src/entitlement.ts +5 -5
  115. package/src/estimate-summary.tsx +2 -2
  116. package/src/format/types.ts +17 -0
  117. package/src/format.ts +54 -60
  118. package/src/i18n.ts +10 -9
  119. package/src/index.ts +3 -0
  120. package/src/limit-meter.tsx +2 -2
  121. package/src/plan-card.tsx +2 -2
  122. package/src/selectors/types.ts +21 -0
  123. package/src/selectors.ts +82 -71
  124. package/src/types.ts +4 -4
  125. package/tests/amount.spec.ts +6 -6
  126. package/tests/consent-refusal.spec.ts +31 -32
  127. package/tests/consumer-hooks.spec.ts +1 -1
  128. package/tests/consumer.spec.ts +10 -10
  129. package/tests/dialog.spec.ts +2 -2
  130. package/tests/entitlement.spec.ts +19 -19
  131. package/tests/harness/consumer.tsx +4 -3
  132. package/tests/harness/entitlement.tsx +4 -5
  133. package/tests/pieces.spec.ts +2 -2
package/README.md CHANGED
@@ -34,8 +34,9 @@ tokens, integer minor units, and the packaged seven-language `web-payment` resou
34
34
  revives its ISO dates; `null` means "not known yet", so render paid controls disabled until it
35
35
  answers. Read it with `useCapability(view, param)` (`boolean | null`) and `useLimit(view, key)`
36
36
  (the limit row plus `exhausted` and a `ratio` clamped to `[0, 1]`). An application that keeps the
37
- view in its own store uses the pure selectors instead — `capabilityStateOf`, `limitStatusOf`,
38
- `planStatusLineOf`, `promoInscriptionOf` — and never polls a second time.
37
+ view in its own store uses the pure selectors instead — `entitlementSelectorHelper`'s
38
+ `capabilityStateOf`, `limitStatusOf`, `planStatusLineOf`, `promoInscriptionOf` — and never polls a
39
+ second time.
39
40
 
40
41
  ```tsx
41
42
  const view = useEntitlementView(ctx.entrypoint(account.entitlements))
@@ -65,7 +66,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
65
66
  your project's skill store (`.agents/skills/`):
66
67
 
67
68
  ```sh
68
- npx @owlmeans/agent-skills@^0.1.18-rc.48
69
+ npx @owlmeans/agent-skills@^0.1.18-rc.49
69
70
  ```
70
71
 
71
72
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/web-payment",
4
- "version": "0.1.18-rc.31",
5
- "generatedAt": "2026-10-05T08:32:19.126Z",
4
+ "version": "0.1.18-rc.32",
5
+ "generatedAt": "2026-10-05T21:03:06.404Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -7,7 +7,7 @@ user-invocable: false
7
7
 
8
8
  # @owlmeans/web-payment
9
9
 
10
- **Install:** `bun add @owlmeans/web-payment@^0.1.18-rc.31`
10
+ **Install:** `bun add @owlmeans/web-payment@^0.1.18-rc.32`
11
11
 
12
12
  Public MIT web package paired with `@owlmeans/server-payment`. It incorporates checkout, balance,
13
13
  entitlement and shallow-auth helpers over the underlying `@owlmeans/client-payment` service, plus
@@ -35,7 +35,7 @@ await checkout(ctx.entrypoint(account.topUp), { body: { amountMinor } })
35
35
 
36
36
  | Hook | Answers |
37
37
  |---|---|
38
- | `useEntitlementView(entry, intervalMs = 60_000, deps = [], ...request)` | The polled `EntitlementView`, revived (`reviveEntitlementView`) so every date is a `Date`; `null` until the first answer. Trailing `request` arguments are the protocol's `CallArguments`. |
38
+ | `useEntitlementView(entry, intervalMs = 60_000, deps = [], ...request)` | The polled `EntitlementView`, revived (`entitlementViewHelper.reviveEntitlementView`) so every date is a `Date`; `null` until the first answer. Trailing `request` arguments are the protocol's `CallArguments`. |
39
39
  | `useCapability(view, param)` | `boolean \| null` — the capability predicate over granted rows; `null` for a null view. |
40
40
  | `useLimit(view, key)` | `LimitStatus \| null` — the `LimitView` plus `exhausted` and `ratio`; `null` for a null view or an undeclared key. |
41
41
  | `usePortal(flow, target = '_self')` | `{ portal(entry, request?), pending }` — calls a protocol whose body is a `PortalLinkBody` with `body.flow = flow`, then `openCheckout(url, target)`. The caller's arguments omit `flow` (a compile error otherwise); navigation is inert without a DOM. |
@@ -51,12 +51,12 @@ await checkout(ctx.entrypoint(account.topUp), { body: { amountMinor } })
51
51
 
52
52
  | Selector | Returns |
53
53
  |---|---|
54
- | `capabilityStateOf(view, param)` | `boolean \| null` — what `useCapability` memoizes |
55
- | `limitStatusOf(limitView)` | `LimitStatus \| null` — `exhausted = remaining < 1` (a `limit: 0` row is exhausted); `ratio = used / limit` clamped to `[0, 1]`, and for a `0` ceiling `1` once anything is used, else `0` |
56
- | `planStatusLineOf(planView)` | `{ kind, tone, date? }` — first match: `created`/`canceled`/`expired`/`ended` (inactive), `blocked` (critical), `paused` (a `pausedAt`, warning), `suspended` (critical), `trial` (`trialEnd`), `past-due` (warning), `cancel-scheduled` (`periodEnd`, warning), `free`, `renews` (`periodEnd`), `active` |
57
- | `promoInscriptionOf(promoView)` | `'free-until'` (active, not grandfathered) · `'grandfathered'` (active, grandfathered) · `'ended'` (inactive) · `null` |
54
+ | `entitlementSelectorHelper.capabilityStateOf(view, param)` | `boolean \| null` — what `useCapability` memoizes |
55
+ | `entitlementSelectorHelper.limitStatusOf(limitView)` | `LimitStatus \| null` — `exhausted = remaining < 1` (a `limit: 0` row is exhausted); `ratio = used / limit` clamped to `[0, 1]`, and for a `0` ceiling `1` once anything is used, else `0` |
56
+ | `entitlementSelectorHelper.planStatusLineOf(planView)` | `{ kind, tone, date? }` — first match: `created`/`canceled`/`expired`/`ended` (inactive), `blocked` (critical), `paused` (a `pausedAt`, warning), `suspended` (critical), `trial` (`trialEnd`), `past-due` (warning), `cancel-scheduled` (`periodEnd`, warning), `free`, `renews` (`periodEnd`), `active` |
57
+ | `entitlementSelectorHelper.promoInscriptionOf(promoView)` | `'free-until'` (active, not grandfathered) · `'grandfathered'` (active, grandfathered) · `'ended'` (inactive) · `null` |
58
58
 
59
- Use these, plus `capabilityOf` / `limitOf` / `hasLimitRoom` from `@owlmeans/payment`, wherever the
59
+ Use these, plus `planLimitHelper.capabilityOf` / `.limitOf` / `.hasLimitRoom` from `@owlmeans/payment`, wherever the
60
60
  browser decides something; the server gate uses the same predicates, so a disabled button and a
61
61
  403 cannot disagree.
62
62
 
@@ -92,20 +92,20 @@ Confirmation is disabled when invalid or pending. The dialog body scrolls (`max-
92
92
  overflow-y-auto`, like the consent dialogs): the tier `details`, the estimate and the legal note can
93
93
  outgrow a short screen, and the confirm button must stay reachable — never render it outside.
94
94
 
95
- It shows net credit value, processing adjustment and pre-tax subtotal from `chargeAmountMinor`.
95
+ It shows net credit value, processing adjustment and pre-tax subtotal from `checkoutPricingHelper.chargeAmountMinor`.
96
96
  With no `estimate`, the plain note that Stripe calculates applicable tax; with one, `PriceEstimateSummary`
97
97
  renders instead (see below) against the SAME `chargeMinor`, so the country picker and its numbers
98
98
  track whatever the buyer has typed. The policy maximum bounds net credit, not the adjusted or
99
99
  tax-inclusive debit.
100
100
 
101
101
  - **`limit`** (`AmountPolicyView.limit`, what the entity may buy NOW) narrows `policy` through
102
- `@owlmeans/payment`'s `narrowAmountPolicy` — the same computation the server refuses with
102
+ `@owlmeans/payment`'s `amountNarrowingHelper.narrowAmountPolicy` — the same computation the server refuses with
103
103
  (`CheckoutLimitExceeded`), so the control and a refusal cannot disagree. Presets above the
104
104
  maximum disappear, the default is clamped, the above-bound error names the narrowed maximum
105
105
  ("The most you can add right now is …"), and a `CheckoutLimitNote` shows above the presets.
106
106
  `policy` may be the plan's or one already narrowed (`AmountPolicyView.policy`) — narrowing is
107
107
  idempotent. **`blocked`** disables the presets, the input and the confirm button; the pinned
108
- policy `narrowAmountPolicy` returns for a block is never an offer of the minimum.
108
+ policy `.narrowAmountPolicy` returns for a block is never an offer of the minimum.
109
109
  - **`details`** is a reusable application-owned React slot (`[data-amount-details]`), the dialog's
110
110
  SIDE column, holding the `CheckoutLimitNote` ("You can add up to …") above the details. With it the
111
111
  dialog is sized by the window — `w-[90vw]`, `lg:w-[50vw]` from a landscape tablet up — and every
@@ -163,7 +163,7 @@ const team = usePriceEstimate(entry, { enabled, country, onCountryChange: setCou
163
163
  shares it. `disabled` (a locked country) disables it; `note` is a line under it. Selectors
164
164
  `[data-country-select]` with `data-locked` and `data-country`, `[data-country-note]`.
165
165
  - **`PriceEstimateAmount({ control, subtotalMinor, currency, suffix?, className? })`** is the
166
- numbers alone, no picker: via `estimateOf` re-derived against `subtotalMinor`, a rate row for a
166
+ numbers alone, no picker: via `priceEstimateHelper.estimateOf` re-derived against `subtotalMinor`, a rate row for a
167
167
  `taxed` status, an estimated total, and one sentence for every status that leaves no number to
168
168
  trust (reverse charge, no tax, "at checkout", "choose a country"). `data-price-estimate` /
169
169
  `data-status` are stable test hooks.
@@ -181,27 +181,27 @@ const team = usePriceEstimate(entry, { enabled, country, onCountryChange: setCou
181
181
 
182
182
  `import { … } from '@owlmeans/web-payment/consumer'` — a separate subpath, so an application that
183
183
  never renders them needs neither their checkbox primitive nor its peer. Legal text comes from
184
- `@owlmeans/payment`'s `payment-consumer-rights` copy (`consumerText`, `legalLabelsOf`,
185
- `consentStatementOf` render the same strings the server records and mails); the interface text
184
+ `@owlmeans/payment`'s `payment-consumer-rights` copy (`consumerCopyHelper.consumerText`, `.legalLabelsOf`,
185
+ `.consentStatementOf` render the same strings the server records and mails); the interface text
186
186
  comes from this package's `web-payment` resource. Neither carries product copy: the trader, the
187
187
  plan title and the price line are the view's or the application's.
188
188
 
189
189
  **The language rule.** A consent or statutory function is shown in the CONTRACT language — the
190
190
  billing country's (`view.language`, `list.language`, the `language` prop) — with a toggle to the
191
191
  interface language and back (`useShownLanguage`, `LanguageToggle`). The whole piece switches: the
192
- legal copy through `legalTextOf(lng)` (a `LegalText`: `(path, values?, context?)`, the context
193
- reading the `<path>_<context>` variant first), the interface strings through `paymentTextOf(lng)` (both
194
- read any language without i18next and without draining a bundle — `resolveI18nResource`), dates
192
+ legal copy through `fixedTextHelper.legalTextOf(lng)` (a `LegalText`: `(path, values?, context?)`, the context
193
+ reading the `<path>_<context>` variant first), the interface strings through `.paymentTextOf(lng)` (both
194
+ read any language without i18next and without draining a bundle — `i18nHelper.resolveI18nResource`), dates
195
195
  and amounts through `Intl` in that language. The toggle alone is phrased in the INTERFACE language
196
196
  ("Show in German") — the reader who needs it reads that one. The links follow the shown language
197
- (`links` prop: a record by language or a function such as `lng => linksOf(policy, lng)`; absent,
197
+ (`links` prop: a record by language or a function such as `lng => consumerRightsPolicyHelper.linksOf(policy, lng)`; absent,
198
198
  the view's own). What a person agrees to is what was on screen: toggling un-ticks the checkbox, and
199
199
  the recorded body names the language shown.
200
200
 
201
201
  | Piece | Props | Behaviour |
202
202
  |---|---|---|
203
- | `PerformanceConsentDialog` | `open, onOpenChange, view: PerformanceConsentView \| null, onConfirm(body: PerformanceConsentBody), onDecline?, uiLanguage?, pending?, error?, links?, onWithdraw?, formatAmount?` | Title and intro (count, last deadline), the purchases with date, amount and last withdrawal day (`performance-consent.purchase`), ONE checkbox carrying the whole statement (`performance-consent.checkbox` with `view.trader`), **unchecked by default**; a `view.context` shows the `_<context>` variants of the title, the intro and the checkbox — exactly the statement `consentStatementOf(lng, Performance, { trader, context })` records — and marks the dialog `data-consent-context`; confirm ("Start now" / "Jetzt beginnen" …) disabled until it is ticked; decline ("Not now"); links Billing Terms · Withdrawal information · the withdrawal function (a button when `onWithdraw`, else the links' `withdrawalFunction` page). `onConfirm` gets `{ purchaseIds, textVersion, language: <shown>, acknowledged: true, uiLanguage }`. |
204
- | `SubscriptionStartDialog` | `open, onOpenChange, view: SubscriptionStartView \| null, planTitle, price?: ReactNode, onConfirm(body: SubscriptionStartBody), onDecline?, uiLanguage?, pending?, error?, links?, onWithdraw?` | The same shape before a subscription checkout; confirm is "Continue to payment" — the step before the paygate's own order button. The statement follows the plan's withdrawal arithmetic: a `view.context` (`startContextOf(plan)` on the server, `'units'`) shows the `_<context>` texts — exactly the statement `consentStatementOf(lng, SubscriptionStart, { trader, plan, context })` records — and marks the dialog `data-start-context`; without one the base (time-only) statement. |
203
+ | `PerformanceConsentDialog` | `open, onOpenChange, view: PerformanceConsentView \| null, onConfirm(body: PerformanceConsentBody), onDecline?, uiLanguage?, pending?, error?, links?, onWithdraw?, formatAmount?` | Title and intro (count, last deadline), the purchases with date, amount and last withdrawal day (`performance-consent.purchase`), ONE checkbox carrying the whole statement (`performance-consent.checkbox` with `view.trader`), **unchecked by default**; a `view.context` shows the `_<context>` variants of the title, the intro and the checkbox — exactly the statement `consumerCopyHelper.consentStatementOf(lng, Performance, { trader, context })` records — and marks the dialog `data-consent-context`; confirm ("Start now" / "Jetzt beginnen" …) disabled until it is ticked; decline ("Not now"); links Billing Terms · Withdrawal information · the withdrawal function (a button when `onWithdraw`, else the links' `withdrawalFunction` page). `onConfirm` gets `{ purchaseIds, textVersion, language: <shown>, acknowledged: true, uiLanguage }`. |
204
+ | `SubscriptionStartDialog` | `open, onOpenChange, view: SubscriptionStartView \| null, planTitle, price?: ReactNode, onConfirm(body: SubscriptionStartBody), onDecline?, uiLanguage?, pending?, error?, links?, onWithdraw?` | The same shape before a subscription checkout; confirm is "Continue to payment" — the step before the paygate's own order button. The statement follows the plan's withdrawal arithmetic: a `view.context` (`consumerCopyHelper.startContextOf(plan)` on the server, `'units'`) shows the `_<context>` texts — exactly the statement `consumerCopyHelper.consentStatementOf(lng, SubscriptionStart, { trader, plan, context })` records — and marks the dialog `data-start-context`; without one the base (time-only) statement. |
205
205
  | `WithdrawalFunctionButton` | `language, onClick, uiLanguage?, disabled?, variant? = 'outline'` | The statutory entry ("Withdraw from contract here", "Vertrag widerrufen", "Renoncer au contrat ici", "Odstąp od umowy tutaj") in the contract language; the interface language's label as `title` when they differ. |
206
206
  | `WithdrawalForm` / `WithdrawalDialog` | `mode: 'in-app' \| 'public', language, onSubmit(body: WithdrawalBody), list?, defaults?, uiLanguage?, pending?, error?, receipt?, formatAmount?` (+ `open, onOpenChange` for the dialog; `onClose` for the form) | Three steps. **Form**: in-app a contract picker over `list.candidates` (bought, paid, last day, estimated refund), publicly a contract-reference field — plus name and e-mail, NOTHING else is asked (a public form also carries the honeypot). **Review**: the summary and the statutory confirm ("Confirm withdrawal", "Widerruf bestätigen", "Confirmer la rétractation", "Potwierdź odstąpienie od umowy"). **Receipt** (whenever `receipt` is set): the received sentence with date AND time in UTC, reference, status, refund. The dialog does not clear the receipt the application holds — reset it on close. |
207
207
  | `CancellationForm` | `mode, language, onSubmit(body: CancellationBody), defaults?, uiLanguage?, pending?, error?, receipt?, onPrint?, onClose?` | **Form**: kind (ordinary / extraordinary — the reason becomes required), name, contract or customer reference, effective (earliest / a date from today), e-mail, and a honeypot. **Summary** with the statutory confirm ("Cancel now", "Jetzt kündigen", "Notification de la résiliation", "Wypowiedz teraz"). **Receipt**: received date and time in UTC, the effective date when known, status, a print button (`onPrint`, default `window.print()`). |
@@ -240,7 +240,7 @@ useCancellation(cancel) → { submit, receipt, pending, error, reset, form }
240
240
  checkout's own refusal then decides), `null` on a decline.
241
241
  - **`withConsent(action)`** runs the action; on a SPEND-consent refusal it asks with
242
242
  `ensure({ force: true })` and retries exactly ONCE. A decline throws `ConsentDeclined`
243
- (`isConsentDeclined`); a second refusal and every other failure propagate unchanged. Outside a
243
+ (`consentRefusalHelper.isConsentDeclined`); a second refusal and every other failure propagate unchanged. Outside a
244
244
  provider the gate passes through (`ensure` → `true`, refusals propagate).
245
245
  - The asking state machine is `makeAsker` and the gate `makeConsentGate` (pure, React-free).
246
246
  - `dialog` / `form` objects are spread into ONE piece each; `form.error` is a boolean, the raw
@@ -248,14 +248,14 @@ useCancellation(cancel) → { submit, receipt, pending, error, reset, form }
248
248
 
249
249
  ### Recognising a consent refusal
250
250
 
251
- `isConsentRefusal(e)` — `consentRefusalOf(e) != null` (the class after the registry, or its marker
252
- in `message`/`type`) OR `httpStatusOf(e) === 428` (`@owlmeans/api/status`: a production body is only
251
+ `consentRefusalHelper.isConsentRefusal(e)` — `consentRefusalOf(e) != null` (the class after the registry, or its marker
252
+ in `message`/`type`) OR `apiStatusHelper.httpStatusOf(e) === 428` (`@owlmeans/api/status`: a production body is only
253
253
  an incident id, so the status is all that is left). Read on the error AND on what it wraps —
254
254
  `cause`, `error`, `original`, `originalError`, `inner`, `reason`, an aggregate's `errors`, and
255
255
  strings — five levels deep with a cycle guard, so a planning `CommitFailed`
256
256
  (`planning:commit-failed:<transition>:<the refusal's text>`) is recognised without depending on
257
- planning. `consentRefusalKindOf(e)` → `'performance' | 'subscription-start' | 'unknown'` (a bare
258
- 428) `| null`; `isPerformanceConsentRefusal(e)` is what the gate retries on (performance or
257
+ planning. `consentRefusalHelper.consentRefusalKindOf(e)` → `'performance' | 'subscription-start' | 'unknown'` (a bare
258
+ 428) `| null`; `.isPerformanceConsentRefusal(e)` is what the gate retries on (performance or
259
259
  unknown — never a subscription start).
260
260
 
261
261
  ### Selectors
@@ -306,13 +306,13 @@ receipt labels, validation), `withdrawal` (candidate lines, estimate, kinds, `st
306
306
  unused credits ARE reimbursed). Every `WithdrawalStatus`, `CancellationStatus` (incl. `review` —
307
307
  extraordinary and unmatched public cancellations) and `PurchaseKind` value has its string; the
308
308
  spec iterates the enums, so a new status fails it until all eight languages phrase it.
309
- - The last withdrawal day shown anywhere is `@owlmeans/payment`'s `lastWithdrawalDayOf(deadline)`
309
+ - The last withdrawal day shown anywhere is `@owlmeans/payment`'s `withdrawalDeadlineHelper.lastWithdrawalDayOf(deadline)`
310
310
  (the deadline is exclusive), formatted as a UTC date — the rule the server's e-mails use.
311
311
  - The `consumer`/`withdrawal`/`cancellation` branches take the register of the legal copy they sit
312
312
  beside (de and es formal, like `payment-consumer-rights`), while `amount-checkout` and
313
313
  `checkout-limit` keep the dialog's.
314
- - An application overrides a string with `addI18nApp(lng, 'web-payment', data, { ns: LIB_NAMESPACE })`
315
- — `paymentTextOf` reads that override too.
314
+ - An application overrides a string with `i18nHelper.addI18nApp(lng, 'web-payment', data, { ns: LIB_NAMESPACE })`
315
+ — `fixedTextHelper.paymentTextOf` reads that override too.
316
316
 
317
317
  ## Tests
318
318
 
@@ -0,0 +1,10 @@
1
+ /** A money input in a locale: its decimal separator, and cents read from / written to its text. */
2
+ export interface AmountInputHelper {
3
+ /** The locale's decimal separator; `.` when the locale names none. */
4
+ decimalSeparator: (locale: string) => string;
5
+ /** Parse a locale decimal directly to cents; floating-point rounding never enters the path. */
6
+ parseAmountMinor: (input: string, locale: string) => number | null;
7
+ /** Cents as the text of a money input in the locale (`12,50`). */
8
+ inputAmount: (amountMinor: number, locale: string) => string;
9
+ }
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/amount/types.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,MAAM,WAAW,iBAAiB;IAChC,sEAAsE;IACtE,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;IAC5C,+FAA+F;IAC/F,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IAClE,kEAAkE;IAClE,WAAW,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;CAC7D"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/amount/types.ts"],"names":[],"mappings":""}
package/build/amount.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- export declare const decimalSeparator: (locale: string) => string;
2
- /** Parse a locale decimal directly to cents; floating-point rounding never enters the path. */
3
- export declare const parseAmountMinor: (input: string, locale: string) => number | null;
4
- export declare const inputAmount: (amountMinor: number, locale: string) => string;
1
+ import type { AmountInputHelper } from './amount/types.js';
2
+ export declare const createAmountInputHelper: () => AmountInputHelper;
3
+ export declare const amountInputHelper: AmountInputHelper;
5
4
  //# sourceMappingURL=amount.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"amount.d.ts","sourceRoot":"","sources":["../src/amount.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,WAAY,MAAM,KAAG,MACuB,CAAA;AAEzE,+FAA+F;AAC/F,eAAO,MAAM,gBAAgB,UAAW,MAAM,UAAU,MAAM,KAAG,MAAM,GAAG,IASzE,CAAA;AAED,eAAO,MAAM,WAAW,gBAAiB,MAAM,UAAU,MAAM,KAAG,MAKjE,CAAA"}
1
+ {"version":3,"file":"amount.d.ts","sourceRoot":"","sources":["../src/amount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE1D,eAAO,MAAM,uBAAuB,QAAO,iBAuB1C,CAAA;AAED,eAAO,MAAM,iBAAiB,mBAA4B,CAAA"}
package/build/amount.js CHANGED
@@ -1,23 +1,26 @@
1
- export const decimalSeparator = (locale) => new Intl.NumberFormat(locale)
2
- .formatToParts(1.1).find(part => part.type === 'decimal')?.value ?? '.';
3
- /** Parse a locale decimal directly to cents; floating-point rounding never enters the path. */
4
- export const parseAmountMinor = (input, locale) => {
5
- const separator = decimalSeparator(locale);
6
- let normalized = input.trim().replace(/[\s\u00a0]/g, '');
7
- if (separator === ',')
8
- normalized = normalized.replace(',', '.');
9
- else if (!normalized.includes('.') && normalized.includes(','))
10
- normalized = normalized.replace(',', '.');
11
- if (!/^\d+(?:\.\d{0,2})?$/.test(normalized))
12
- return null;
13
- const [whole, decimal = ''] = normalized.split('.');
14
- const value = Number(whole) * 100 + Number(decimal.padEnd(2, '0'));
15
- return Number.isSafeInteger(value) ? value : null;
16
- };
17
- export const inputAmount = (amountMinor, locale) => {
18
- const separator = decimalSeparator(locale);
19
- const whole = Math.floor(amountMinor / 100);
20
- const cents = String(amountMinor % 100).padStart(2, '0');
21
- return `${whole}${separator}${cents}`;
1
+ export const createAmountInputHelper = () => {
2
+ const decimalSeparator = (locale) => new Intl.NumberFormat(locale)
3
+ .formatToParts(1.1).find(part => part.type === 'decimal')?.value ?? '.';
4
+ const parseAmountMinor = (input, locale) => {
5
+ const separator = decimalSeparator(locale);
6
+ let normalized = input.trim().replace(/[\s ]/g, '');
7
+ if (separator === ',')
8
+ normalized = normalized.replace(',', '.');
9
+ else if (!normalized.includes('.') && normalized.includes(','))
10
+ normalized = normalized.replace(',', '.');
11
+ if (!/^\d+(?:\.\d{0,2})?$/.test(normalized))
12
+ return null;
13
+ const [whole, decimal = ''] = normalized.split('.');
14
+ const value = Number(whole) * 100 + Number(decimal.padEnd(2, '0'));
15
+ return Number.isSafeInteger(value) ? value : null;
16
+ };
17
+ const inputAmount = (amountMinor, locale) => {
18
+ const separator = decimalSeparator(locale);
19
+ const whole = Math.floor(amountMinor / 100);
20
+ const cents = String(amountMinor % 100).padStart(2, '0');
21
+ return `${whole}${separator}${cents}`;
22
+ };
23
+ return { decimalSeparator, parseAmountMinor, inputAmount };
22
24
  };
25
+ export const amountInputHelper = createAmountInputHelper();
23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AC,QAAQ,CAAC,GAAG,CAAC;YAAE,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;QACzG,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC;YAAE,OAAO,IAAI,CAAA;QACxD,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACnD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA;QAClE,OAAO,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA;IACnD,CAAC,CAAA;IAED,MAAM,WAAW,GAAG,CAAC,WAAmB,EAAE,MAAc,EAAU,EAAE;QAClE,MAAM,SAAS,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAA;QAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,GAAG,CAAC,CAAA;QAC3C,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;QACxD,OAAO,GAAG,KAAK,GAAG,SAAS,GAAG,KAAK,EAAE,CAAA;IACvC,CAAC,CAAA;IAED,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAA;AAC5D,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,uBAAuB,EAAE,CAAA"}
@@ -3,7 +3,7 @@ import { useEffect, useState } from 'react';
3
3
  import { CancellationKind } from '@owlmeans/payment';
4
4
  import { cn } from '@/lib/utils';
5
5
  import { Button } from '@/components/ui/button';
6
- import { useLegalText, usePaymentText } from './copy.js';
6
+ import { useLegalText, usePaymentText } from './hooks.js';
7
7
  import { Choice, Field, Honeypot, isEmail } from './fields.js';
8
8
  import { ErrorLine, LanguageToggle, useShownLanguage } from './legal.js';
9
9
  import { formatHelper } from '../format.js';
@@ -1 +1 @@
1
- {"version":3,"file":"cancellation.js","sourceRoot":"","sources":["../../src/consumer/cancellation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAmD,MAAM,mBAAmB,CAAA;AACrG,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AACxD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAExE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE3C,MAAM,qBAAqB,GAAG,CAAC,OAAe,EAAkC,EAAE,CAAC,QAAQ,IAAI,OAAO,CAAA;AAEtG,4FAA4F;AAC5F,MAAM,QAAQ,GAAG,GAAW,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AAEpE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,GAAG,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EACnH,SAAS,GACa,EAAE,EAAE;IAC1B,MAAM,QAAQ,GAAG,gBAAgB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AE,OAAO,gCAA6B,EAAE,YAAE,IAAI,CAAC,mBAAmB,CAAC,GAAU,GACvG,IACD,CAAA;IACT,CAAC;IAED,OAAO,mBAAS,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,+BAA4B,EAAE,mBAAgB,QAAQ,CAAC,KAAK,aAChH,kBAAQ,SAAS,EAAC,cAAc,EAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,aACnD,aAAI,SAAS,EAAC,oCAAoC,YAAE,KAAK,CAAC,oBAAoB,CAAC,GAAM,EACpF,OAAO,KAAK,MAAM,IAAI,YAAG,SAAS,EAAC,+BAA+B,YAAE,KAAK,CAAC,oBAAoB,CAAC,GAAK,IAC9F,EACT,KAAC,cAAc,IAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAC,mCAAmC,GAAG,EAC/E,wCAA4B,EAAE,4BAAyB,OAAO,eAAa,OAAO,eAAa,IAAI,mBAClF,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAC,YAAY,YAC1E,OAAO,GACJ,IACE,CAAA;AACZ,CAAC,CAAA"}
@@ -0,0 +1,20 @@
1
+ import type { FixedText, LegalText } from '../types.js';
2
+ /** Interface strings and legal copy in a FIXED language, independent of the active i18next one. */
3
+ export interface FixedTextHelper {
4
+ /**
5
+ * The package's own interface strings (`web-payment`, library tier, any application override
6
+ * included) in a FIXED language, merged key by key over English — no i18next instance and no
7
+ * draining (`resolveI18nResource`). What lets a consumer-rights dialog render wholly in the
8
+ * contract language while the rest of the page stays in the interface language.
9
+ */
10
+ paymentTextOf: (lng: string) => FixedText;
11
+ /**
12
+ * The legal copy of `@owlmeans/payment` (`payment-consumer-rights`) in a fixed language. A text
13
+ * that cannot be rendered in the language (a broken application override) falls back to English
14
+ * rather than blanking the page; one that cannot be rendered at all is `''`.
15
+ */
16
+ legalTextOf: (lng: string) => LegalText;
17
+ /** A language's own name in another language (`de` in `en` → "German"); the code when unknown. */
18
+ languageNameOf: (lng: string, inLanguage: string) => string;
19
+ }
20
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/consumer/copy/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvD,mGAAmG;AACnG,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,SAAS,CAAA;IACzC;;;;OAIG;IACH,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,SAAS,CAAA;IACvC,kGAAkG;IAClG,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,MAAM,CAAA;CAC5D"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/consumer/copy/types.ts"],"names":[],"mappings":""}
@@ -1,21 +1,9 @@
1
1
  import type { FixedText, LegalText } from './types.js';
2
- /**
3
- * The package's own interface strings (`web-payment`, library tier, any application override
4
- * included) in a FIXED language, merged key by key over English — no i18next instance and no
5
- * draining (`resolveI18nResource`). What lets a consumer-rights dialog render wholly in the
6
- * contract language while the rest of the page stays in the interface language.
7
- */
2
+ import type { FixedTextHelper } from './copy/types.js';
3
+ export declare const createFixedTextHelper: () => FixedTextHelper;
4
+ export declare const fixedTextHelper: FixedTextHelper;
5
+ /** @deprecated compat:factory-refactor — use `fixedTextHelper.paymentTextOf(…)` */
8
6
  export declare const paymentTextOf: (lng: string) => FixedText;
9
- /**
10
- * The legal copy of `@owlmeans/payment` (`payment-consumer-rights`) in a fixed language. A text
11
- * that cannot be rendered in the language (a broken application override) falls back to English
12
- * rather than blanking the page; one that cannot be rendered at all is `''`.
13
- */
7
+ /** @deprecated compat:factory-refactor — use `fixedTextHelper.legalTextOf(…)` */
14
8
  export declare const legalTextOf: (lng: string) => LegalText;
15
- /** `paymentTextOf(lng)`, memoised for the language. */
16
- export declare const usePaymentText: (lng: string) => FixedText;
17
- /** `legalTextOf(lng)`, memoised for the language. */
18
- export declare const useLegalText: (lng: string) => LegalText;
19
- /** A language's own name in another language (`de` in `en` → "German"); the code when unknown. */
20
- export declare const languageNameOf: (lng: string, inLanguage: string) => string;
21
9
  //# sourceMappingURL=copy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../../src/consumer/copy.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAmCtD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,QAAS,MAAM,KAAG,SAQ3C,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,QAAS,MAAM,KAAG,SAUzC,CAAA;AAED,uDAAuD;AACvD,eAAO,MAAM,cAAc,QAAS,MAAM,KAAG,SAAqD,CAAA;AAElG,qDAAqD;AACrD,eAAO,MAAM,YAAY,QAAS,MAAM,KAAG,SAAmD,CAAA;AAE9F,kGAAkG;AAClG,eAAO,MAAM,cAAc,QAAS,MAAM,cAAc,MAAM,KAAG,MAMhE,CAAA"}
1
+ {"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../../src/consumer/copy.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAKtD,eAAO,MAAM,qBAAqB,QAAO,eA8DxC,CAAA;AAED,eAAO,MAAM,eAAe,iBAA0B,CAAA;AAEtD,mFAAmF;AACnF,eAAO,MAAM,aAAa,QAAS,MAAM,KAAG,SAA+C,CAAA;AAE3F,iFAAiF;AACjF,eAAO,MAAM,WAAW,QAAS,MAAM,KAAG,SAA6C,CAAA"}
@@ -1,75 +1,66 @@
1
- import { useMemo } from 'react';
2
1
  import { LIB_NAMESPACE, resolveI18nResource } from '@owlmeans/i18n';
3
- import { baseLanguageOf, consumerText } from '@owlmeans/payment';
2
+ import { consumerCopyHelper, consumerRightsPolicyHelper } from '@owlmeans/payment';
4
3
  import { WEB_PAYMENT_RESOURCE } from '../consts.js';
5
4
  const isTree = (value) => value != null && typeof value === 'object' && !Array.isArray(value);
6
- const merge = (base, over) => {
7
- const result = { ...base };
8
- for (const [key, value] of Object.entries(over ?? {})) {
9
- if (isTree(value)) {
10
- const current = result[key];
11
- result[key] = merge(isTree(current) ? current : {}, value);
5
+ export const createFixedTextHelper = () => {
6
+ const merge = (base, over) => {
7
+ const result = { ...base };
8
+ for (const [key, value] of Object.entries(over ?? {})) {
9
+ if (isTree(value)) {
10
+ const current = result[key];
11
+ result[key] = merge(isTree(current) ? current : {}, value);
12
+ }
13
+ else if (typeof value === 'string') {
14
+ result[key] = value;
15
+ }
12
16
  }
13
- else if (typeof value === 'string') {
14
- result[key] = value;
17
+ return result;
18
+ };
19
+ const bundleOf = (lng) => {
20
+ const base = consumerRightsPolicyHelper.baseLanguageOf(lng);
21
+ let tree = merge({}, resolveI18nResource('en', WEB_PAYMENT_RESOURCE, LIB_NAMESPACE));
22
+ if (base !== '' && base !== 'en') {
23
+ tree = merge(tree, resolveI18nResource(base, WEB_PAYMENT_RESOURCE, LIB_NAMESPACE));
15
24
  }
16
- }
17
- return result;
18
- };
19
- const bundleOf = (lng) => {
20
- const base = baseLanguageOf(lng);
21
- let tree = merge({}, resolveI18nResource('en', WEB_PAYMENT_RESOURCE, LIB_NAMESPACE));
22
- if (base !== '' && base !== 'en') {
23
- tree = merge(tree, resolveI18nResource(base, WEB_PAYMENT_RESOURCE, LIB_NAMESPACE));
24
- }
25
- if (lng !== base && lng.trim() !== '') {
26
- tree = merge(tree, resolveI18nResource(lng, WEB_PAYMENT_RESOURCE, LIB_NAMESPACE));
27
- }
28
- return tree;
29
- };
30
- const fill = (text, values = {}) => text.replace(/\{\{\s*([\w-]+)\s*\}\}/g, (_, name) => values[name] != null ? String(values[name]) : '');
31
- /**
32
- * The package's own interface strings (`web-payment`, library tier, any application override
33
- * included) in a FIXED language, merged key by key over English — no i18next instance and no
34
- * draining (`resolveI18nResource`). What lets a consumer-rights dialog render wholly in the
35
- * contract language while the rest of the page stays in the interface language.
36
- */
37
- export const paymentTextOf = (lng) => {
38
- const tree = bundleOf(lng);
39
- return (key, values) => {
40
- const value = key.split('.').reduce((node, part) => isTree(node) ? node[part] : undefined, tree);
41
- return typeof value === 'string' ? fill(value, values) : key;
25
+ if (lng !== base && lng.trim() !== '') {
26
+ tree = merge(tree, resolveI18nResource(lng, WEB_PAYMENT_RESOURCE, LIB_NAMESPACE));
27
+ }
28
+ return tree;
42
29
  };
43
- };
44
- /**
45
- * The legal copy of `@owlmeans/payment` (`payment-consumer-rights`) in a fixed language. A text
46
- * that cannot be rendered in the language (a broken application override) falls back to English
47
- * rather than blanking the page; one that cannot be rendered at all is `''`.
48
- */
49
- export const legalTextOf = (lng) => (path, values, context) => {
50
- try {
51
- return consumerText(lng, path, values, context);
52
- }
53
- catch {
30
+ const fill = (text, values = {}) => text.replace(/\{\{\s*([\w-]+)\s*\}\}/g, (_, name) => values[name] != null ? String(values[name]) : '');
31
+ const paymentTextOf = (lng) => {
32
+ const tree = bundleOf(lng);
33
+ return (key, values) => {
34
+ const value = key.split('.').reduce((node, part) => isTree(node) ? node[part] : undefined, tree);
35
+ return typeof value === 'string' ? fill(value, values) : key;
36
+ };
37
+ };
38
+ const legalTextOf = (lng) => (path, values, context) => {
54
39
  try {
55
- return consumerText('en', path, values, context);
40
+ return consumerCopyHelper.consumerText(lng, path, values, context);
56
41
  }
57
42
  catch {
58
- return '';
43
+ try {
44
+ return consumerCopyHelper.consumerText('en', path, values, context);
45
+ }
46
+ catch {
47
+ return '';
48
+ }
59
49
  }
60
- }
61
- };
62
- /** `paymentTextOf(lng)`, memoised for the language. */
63
- export const usePaymentText = (lng) => useMemo(() => paymentTextOf(lng), [lng]);
64
- /** `legalTextOf(lng)`, memoised for the language. */
65
- export const useLegalText = (lng) => useMemo(() => legalTextOf(lng), [lng]);
66
- /** A language's own name in another language (`de` in `en` → "German"); the code when unknown. */
67
- export const languageNameOf = (lng, inLanguage) => {
68
- try {
69
- return new Intl.DisplayNames([inLanguage], { type: 'language' }).of(lng) ?? lng;
70
- }
71
- catch {
72
- return lng;
73
- }
50
+ };
51
+ const languageNameOf = (lng, inLanguage) => {
52
+ try {
53
+ return new Intl.DisplayNames([inLanguage], { type: 'language' }).of(lng) ?? lng;
54
+ }
55
+ catch {
56
+ return lng;
57
+ }
58
+ };
59
+ return { paymentTextOf, legalTextOf, languageNameOf };
74
60
  };
61
+ export const fixedTextHelper = createFixedTextHelper();
62
+ /** @deprecated compat:factory-refactor — use `fixedTextHelper.paymentTextOf(…)` */
63
+ export const paymentTextOf = (lng) => fixedTextHelper.paymentTextOf(lng);
64
+ /** @deprecated compat:factory-refactor — use `fixedTextHelper.legalTextOf(…)` */
65
+ export const legalTextOf = (lng) => fixedTextHelper.legalTextOf(lng);
75
66
  //# sourceMappingURL=copy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"copy.js","sourceRoot":"","sources":["../../src/consumer/copy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAmB,MAAM,mBAAmB,CAAA;AACjF,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAInD,MAAM,MAAM,GAAG,CAAC,KAAc,EAAiB,EAAE,CAC/C,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAEr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B,CAAA;AAED,qGAAqG;AACrG,eAAO,MAAM,eAAe,WAAY,WAAW,CAAC,QAAQ,CAAC,KAAG,WAgB9D,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,WAG7B,CAAA"}
1
+ {"version":3,"file":"ensure.d.ts","sourceRoot":"","sources":["../../src/consumer/ensure.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAElE;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,IAAI,SAAS,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,QACtD,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,KACrC,KAAK,CAAC,IAAI,EAAE,MAAM,CAuCpB,CAAA;AAED,qGAAqG;AACrG,eAAO,MAAM,eAAe,WAAY,WAAW,CAAC,QAAQ,CAAC,KAAG,WAgB9D,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,WAG7B,CAAA"}