@pontive/pontkit-core 1.22.0 → 1.23.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.
@@ -16,6 +16,10 @@ export declare class PontRecoveryCodes extends BaseElement implements RecoveryCo
16
16
  title: string;
17
17
  subtitle: string;
18
18
  codes: string[];
19
+ emptyText: string;
20
+ copyLabel: string;
21
+ downloadLabel: string;
22
+ copiedText: string;
19
23
  disabled: boolean;
20
24
  private _copied;
21
25
  private _copyTimeout;
@@ -2,6 +2,10 @@ export type RecoveryCodesProps = {
2
2
  title: string;
3
3
  subtitle: string;
4
4
  codes: string[];
5
+ emptyText: string;
6
+ copyLabel: string;
7
+ downloadLabel: string;
8
+ copiedText: string;
5
9
  disabled: boolean;
6
10
  };
7
11
  export type RecoveryCodesParts = "root" | "card" | "title" | "subtitle" | "codesList" | "codeItem" | "buttons" | "copyButton" | "downloadButton" | "tooltip";
@@ -17,6 +17,9 @@ export declare class PontSecret extends BaseElement implements SecretProps {
17
17
  issuer: string;
18
18
  account: string;
19
19
  secretLabel: string;
20
+ issuerLabel: string;
21
+ accountLabel: string;
22
+ copiedText: string;
20
23
  disabled: boolean;
21
24
  private _copied;
22
25
  private _copyTimeout;
@@ -4,6 +4,9 @@ export type SecretProps = {
4
4
  issuer: string;
5
5
  account: string;
6
6
  secretLabel: string;
7
+ issuerLabel: string;
8
+ accountLabel: string;
9
+ copiedText: string;
7
10
  disabled: boolean;
8
11
  };
9
12
  export type SecretParts = "root" | "card" | "title" | "inputGroup" | "copyButton" | "metadata" | "issuer" | "account" | "tooltip";
@@ -0,0 +1,29 @@
1
+ /**
2
+ * What the widget says in its own words — text no widget's markup carries, so
3
+ * no copy overlay can reach it: a connection error, "Start again", an aria
4
+ * label.
5
+ *
6
+ * The sign-in runtime sends this text with every view, already in the view's
7
+ * language and the instance's wording (branding-svc pkg/message, the codes it
8
+ * marks Client; identity-svc puts them in each flow response's data.messages).
9
+ * The provider hands each set it receives to `setMessages`, and every place
10
+ * that used to write English reads `msg(code)` instead.
11
+ *
12
+ * ENGLISH is the fallback, and it is only ever needed for a page that has not
13
+ * heard from the server yet — a flow that fails to start because the network is
14
+ * down. Once a set has arrived it is kept, so a later failure that never reaches
15
+ * the server is still said in the language the page was already in. It mirrors
16
+ * the catalog's English; the catalog wins wherever they differ, since that is
17
+ * what arrives.
18
+ */
19
+ export type MessageCode = "connection_failed" | "too_many_attempts" | "server_error" | "generic_error" | "flow_ended" | "passkey_cancelled" | "start_again" | "continued_elsewhere_title" | "continued_elsewhere_subtitle" | "continue_here" | "show_password" | "hide_password" | "loading";
20
+ /**
21
+ * Record the set a flow response carried. An empty or missing set keeps the
22
+ * last one: a response that carries none (an error, a poll) says nothing about
23
+ * the language having changed.
24
+ */
25
+ export declare function setMessages(messages?: Record<string, string>): void;
26
+ /** The text for a code, in the language the page was last served in. */
27
+ export declare function msg(code: MessageCode): string;
28
+ /** Forget what the server sent. For tests. */
29
+ export declare function resetMessages(): void;