@declarion/react 0.39.0 → 0.40.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.
@@ -64,6 +64,33 @@ export declare function filterUnavailableMutationActions(actions: Array<{
64
64
  * Checks if an action has parameters that need user input.
65
65
  */
66
66
  export declare function actionHasParams(action: Action): boolean;
67
+ /**
68
+ * Default confirmation copy for a destructive action that declares none. A
69
+ * LocalizedString like every user-facing string in the platform, resolved
70
+ * against the caller's locale by `actionConfirmMessage`. A consumer's own
71
+ * `confirmation` (also localized) overrides it.
72
+ */
73
+ export declare const DEFAULT_DESTRUCTIVE_CONFIRM: LocalizedString;
74
+ /**
75
+ * The confirmation message to show before running an action, or null when no
76
+ * confirm step is needed. This is the SINGLE source of confirm semantics, read
77
+ * by every dispatch surface (the ActionRunner and ActionButton) so they cannot
78
+ * drift (see docs/ui-internals.md "Action dialogs and dispatch"):
79
+ * - a declared `confirmation` wins (works on any action, destructive or not);
80
+ * - else a `destructive` action gets the default danger warning;
81
+ * - else null (no confirm).
82
+ * Both the declared text and the default are localized and resolved against
83
+ * `locale`. `destructive` is a semantic class (danger colour + trailing
84
+ * placement + the server impersonation gate + agent HITL); the confirm is one
85
+ * of its effects, and `confirmation` only tunes the TEXT - not a second gate.
86
+ */
87
+ export declare function actionConfirmMessage(action: Action | undefined, locale: string): string | null;
88
+ /**
89
+ * True when the action must show a confirm step (destructive OR a declared
90
+ * confirmation). Locale-independent - it is a presence check, so the runner can
91
+ * decide whether to open the dialog without resolving the text.
92
+ */
93
+ export declare function actionNeedsConfirm(action: Action | undefined): boolean;
67
94
  /**
68
95
  * Tooltip text for an action control (plan 2026-07-02-action-display-description).
69
96
  * Precedence: disabled-reason > description > name.