@kernhq/module-billing 0.5.4 → 0.5.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kernhq/module-billing",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
4
4
  "description": "Kern billing module: plans, entitlements, subscriptions and Stripe — the mechanism that lets any Kern instance sell seats on itself",
5
5
  "homepage": "https://github.com/KernAIO/module-billing#readme",
6
6
  "license": "AGPL-3.0-only",
@@ -110,6 +110,8 @@ export const en: Record<string, Message> = {
110
110
  'billing.checkout_changed': 'Plan changed',
111
111
  'billing.checkout_done': 'Payment received',
112
112
  'billing.checkout_done_hint': 'The new plan is active.',
113
+ 'billing.checkout_trial': 'Card saved',
114
+ 'billing.checkout_trial_hint': 'Your trial has started. Nothing is charged until it ends.',
113
115
  'billing.checkout_pending': 'Payment received',
114
116
  'billing.checkout_pending_hint':
115
117
  'Stripe has taken the payment and we are waiting for it to confirm. This page updates itself.',
@@ -268,6 +270,8 @@ const ar: Record<string, Message> = {
268
270
  'billing.checkout_changed': 'تغيّرت الخطة',
269
271
  'billing.checkout_done': 'وصلت الدفعة',
270
272
  'billing.checkout_done_hint': 'الخطة الجديدة سارية الآن.',
273
+ 'billing.checkout_trial': 'تم حفظ البطاقة',
274
+ 'billing.checkout_trial_hint': 'بدأت فترتك التجريبية. لن يُخصم شيء حتى تنتهي.',
271
275
  'billing.checkout_pending': 'وصلت الدفعة',
272
276
  'billing.checkout_pending_hint': 'استلم Stripe الدفعة وننتظر تأكيدها. تُحدِّث هذه الصفحة نفسها بنفسها.',
273
277
  'billing.checkout_slow': 'التأكيد يستغرق وقتًا أطول من المعتاد',
@@ -431,6 +435,8 @@ const de: Record<string, Message> = {
431
435
  'billing.checkout_changed': 'Tarif gewechselt',
432
436
  'billing.checkout_done': 'Zahlung eingegangen',
433
437
  'billing.checkout_done_hint': 'Der neue Tarif ist aktiv.',
438
+ 'billing.checkout_trial': 'Karte gespeichert',
439
+ 'billing.checkout_trial_hint': 'Ihre Testphase hat begonnen. Bis sie endet, wird nichts berechnet.',
434
440
  'billing.checkout_pending': 'Zahlung eingegangen',
435
441
  'billing.checkout_pending_hint':
436
442
  'Stripe hat die Zahlung angenommen, wir warten auf die Bestätigung. Diese Seite aktualisiert sich von selbst.',
@@ -589,6 +595,8 @@ const fa: Record<string, Message> = {
589
595
  'billing.checkout_changed': 'طرح تغییر کرد',
590
596
  'billing.checkout_done': 'پرداخت رسید',
591
597
  'billing.checkout_done_hint': 'طرح تازه فعال است.',
598
+ 'billing.checkout_trial': 'کارت ذخیره شد',
599
+ 'billing.checkout_trial_hint': 'دورهٔ آزمایشی شما شروع شد. تا پایان آن چیزی برداشت نمی‌شود.',
592
600
  'billing.checkout_pending': 'پرداخت رسید',
593
601
  'billing.checkout_pending_hint': 'Stripe پرداخت را گرفته و منتظر تأیید آن هستیم. این صفحه خودش تازه می‌شود.',
594
602
  'billing.checkout_slow': 'تأیید بیش از حد معمول طول کشیده است',
@@ -745,6 +753,8 @@ const tr: Record<string, Message> = {
745
753
  'billing.checkout_changed': 'Tarife değişti',
746
754
  'billing.checkout_done': 'Ödeme alındı',
747
755
  'billing.checkout_done_hint': 'Yeni tarife etkin.',
756
+ 'billing.checkout_trial': 'Kart kaydedildi',
757
+ 'billing.checkout_trial_hint': 'Deneme süreniz başladı. Bitene kadar ücret alınmaz.',
748
758
  'billing.checkout_pending': 'Ödeme alındı',
749
759
  'billing.checkout_pending_hint': 'Stripe ödemeyi aldı, onayını bekliyoruz. Bu sayfa kendini günceller.',
750
760
  'billing.checkout_slow': 'Onay her zamankinden uzun sürüyor',
@@ -290,7 +290,9 @@ function once(run: () => void) {
290
290
  ? t('checkout_slow')
291
291
  : pending
292
292
  ? t('checkout_pending')
293
- : t('checkout_done')}
293
+ : sub?.status === 'trialing'
294
+ ? t('checkout_trial')
295
+ : t('checkout_done')}
294
296
  </span>
295
297
  <span class="text-[13px] text-[var(--kern-ink-700)]">
296
298
  {outcome === 'cancelled'
@@ -301,7 +303,9 @@ function once(run: () => void) {
301
303
  ? t('checkout_slow_hint')
302
304
  : pending
303
305
  ? t('checkout_pending_hint')
304
- : t('checkout_done_hint')}
306
+ : sub?.status === 'trialing'
307
+ ? t('checkout_trial_hint')
308
+ : t('checkout_done_hint')}
305
309
  </span>
306
310
  </div>
307
311
  <Button variant="ghost" size="sm" onclick={() => (outcome = null)}>{t('dismiss')}</Button>
@@ -409,7 +413,14 @@ function once(run: () => void) {
409
413
  {@const isCurrent = sub?.planId === plan.id}
410
414
  {@const blocked = planBlockedReason(plan, { seats: usage.seats })}
411
415
  <li class="grid">
412
- <Card class="grid content-between gap-4 p-4">
416
+ <!--
417
+ `Card` is a block: a `grid` class on it does not reach its content, so the gap
418
+ between the highlights and the button was lost and the button sat flush against the
419
+ last line with the card's padding pooled underneath. The layout lives on an element
420
+ of our own inside the card.
421
+ -->
422
+ <Card class="p-4">
423
+ <div class="grid h-full content-between gap-5">
413
424
  <div class="grid gap-2">
414
425
  <div class="flex items-center justify-between gap-2">
415
426
  <span class="text-[15px] font-medium text-[var(--kern-ink-900)]">{plan.name}</span>
@@ -464,6 +475,7 @@ function once(run: () => void) {
464
475
  </span>
465
476
  {/snippet}
466
477
  </Tooltip>
478
+ </div>
467
479
  </Card>
468
480
  </li>
469
481
  {/each}