@srimandir/make-your-own-ritual 0.30.6 → 0.30.7

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.
@@ -1,4 +1,5 @@
1
1
  import { PickedDate } from '../../../../pitru-paksh-common/dist/pitru-paksh-common.js';
2
+ import { MyorDismissType } from '../../dismissType';
2
3
  import { MakeYourOwnRitualDataState, RitualDataAction, TithiPreview, TithiValidity } from '../../types';
3
4
  /**
4
5
  * Interaction points this screen doesn't otherwise expose a callback for —
@@ -29,6 +30,7 @@ export type DeathTithiInteractionEvent = {
29
30
  type: "tithi_picker_dismiss";
30
31
  ancestorKey: string;
31
32
  ancestorPosition: number;
33
+ dismissType: MyorDismissType;
32
34
  } | {
33
35
  type: "date_picker_shown";
34
36
  ancestorKey: string;
@@ -42,6 +44,7 @@ export type DeathTithiInteractionEvent = {
42
44
  type: "date_picker_dismiss";
43
45
  ancestorKey: string;
44
46
  ancestorPosition: number;
47
+ dismissType: MyorDismissType;
45
48
  } | {
46
49
  type: "date_passed_popup_shown";
47
50
  ancestorKey: string;
@@ -50,6 +53,11 @@ export type DeathTithiInteractionEvent = {
50
53
  type: "date_passed_popup_dismiss";
51
54
  ancestorKey: string;
52
55
  ancestorPosition: number;
56
+ dismissType: MyorDismissType;
57
+ } | {
58
+ type: "date_passed_popup_proceed";
59
+ ancestorKey: string;
60
+ ancestorPosition: number;
53
61
  } | {
54
62
  type: "proceed_click";
55
63
  ancestorKey: string;
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { PujaId, MakeYourOwnRitualDataState, RitualDataAction } from '../../types';
3
3
  import { RitualDayOption } from '../SelectRitualDaySheet';
4
+ import { MyorDismissType } from '../../dismissType';
4
5
  /**
5
6
  * Interaction points this screen doesn't otherwise expose a callback for —
6
7
  * added for analytics, kept as one prop rather than one per interaction so
@@ -24,6 +25,7 @@ export type SelectAncestorsInteractionEvent = {
24
25
  names: string[];
25
26
  } | {
26
27
  type: "add_ancestor_dismiss";
28
+ dismissType: MyorDismissType;
27
29
  } | {
28
30
  type: "proceed_click";
29
31
  isLastRitual: boolean;
@@ -31,6 +33,7 @@ export type SelectAncestorsInteractionEvent = {
31
33
  type: "ritual_day_prompt_shown";
32
34
  } | {
33
35
  type: "ritual_day_prompt_dismissed";
36
+ dismissType: MyorDismissType;
34
37
  };
35
38
  export interface SelectAncestorsProps {
36
39
  store: MakeYourOwnRitualDataState;
@@ -1,8 +1,9 @@
1
1
  import { default as React } from 'react';
2
+ import { BottomSheetCloseReason } from '../../../../common/dist/common.js';
2
3
  export type RitualDayOption = 'amavasya' | 'death-anniversary';
3
4
  export interface SelectRitualDaySheetProps {
4
5
  isOpen: boolean;
5
- onClose: () => void;
6
+ onClose: (reason?: BottomSheetCloseReason) => void;
6
7
  /** Fires with the option active when the CTA is pressed — 'amavasya' needs no death-tithi step; only 'death-anniversary' does. */
7
8
  onCtaClick: (option: RitualDayOption) => void;
8
9
  /** True when every ancestor's tithi is unknown (all pujas selected "All Ancestors") — Amavasya is then the only sensible day, so skip the choice. Otherwise both options are offered. */
@@ -0,0 +1,10 @@
1
+ import { BottomSheetCloseReason } from '../../common/dist/common.js';
2
+ /**
3
+ * The MYOR instrumentation sheet's `dismiss_type` vocabulary. `'app_exit'`
4
+ * isn't reachable from a `BottomSheet` close (backdrop tap / Escape / close
5
+ * button) — it needs an app-lifecycle signal (visibility/unload) no sheet
6
+ * component here has, so `dismissTypeFor` below never produces it.
7
+ */
8
+ export type MyorDismissType = "back" | "app_exit" | "dismiss_icon";
9
+ /** Maps a `BottomSheet`'s close reason onto the sheet's `dismiss_type` vocabulary. */
10
+ export declare const dismissTypeFor: (reason?: BottomSheetCloseReason) => MyorDismissType;