@celestia-island/hikari 0.55.493 → 0.55.495
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/dist/types/components/HkAuthCard.d.ts +4 -8
- package/dist/types/components/HkAuthChannelList.d.ts +5 -17
- package/dist/types/components/HkAuthSsoButton.d.ts +9 -11
- package/dist/types/components/HkCornerText.d.ts +121 -0
- package/dist/types/components/HkIconButtonGroup.d.ts +3 -4
- package/dist/types/components/HkLoginFlow.d.ts +9 -48
- package/dist/types/components/HkMfaVerifyCard.d.ts +6 -53
- package/dist/types/components/HkSignInCard.d.ts +1 -5
- package/dist/types/components/HkStatusBar.d.ts +4 -2
- package/dist/types/components/loginDiscovery.d.ts +12 -9
- package/dist/types/index.d.ts +2 -6
- package/package.json +1 -1
- package/src/components/HkAuthCard.test.tsx +25 -22
- package/src/components/HkAuthCard.tsx +4 -13
- package/src/components/HkAuthChannelList.scss +0 -16
- package/src/components/HkAuthChannelList.test.tsx +0 -5
- package/src/components/HkAuthChannelList.tsx +4 -11
- package/src/components/HkAuthSsoButton.tsx +8 -10
- package/src/components/HkCornerText.scss +57 -0
- package/src/components/HkCornerText.test.tsx +106 -0
- package/src/components/HkCornerText.tsx +123 -0
- package/src/components/HkIconButtonGroup.tsx +3 -4
- package/src/components/HkLoginFlow.test.tsx +27 -82
- package/src/components/HkLoginFlow.tsx +11 -44
- package/src/components/HkMfaVerifyCard.test.ts +11 -121
- package/src/components/HkMfaVerifyCard.tsx +6 -47
- package/src/components/HkSelectionControls.styles.test.ts +5 -2
- package/src/components/HkSignInCard.test.ts +20 -28
- package/src/components/HkSignInCard.tsx +10 -19
- package/src/components/HkSolarLocationEditor.tsx +30 -13
- package/src/components/HkSolarLocationSetting.scss +36 -0
- package/src/components/HkSolarLocationSetting.styles.test.ts +27 -0
- package/src/components/HkSolarLocationSetting.test.tsx +50 -0
- package/src/components/HkStatusBar.tsx +2 -1
- package/src/components/loginDiscovery.test.ts +29 -24
- package/src/components/loginDiscovery.ts +37 -40
- package/src/index.ts +2 -6
- package/src/styles/admin-tokens.scss +5 -31
- package/dist/types/components/HkAltSignIn.d.ts +0 -74
- package/dist/types/components/HkAuthMethodList.d.ts +0 -73
- package/dist/types/components/HkThirdPartySignInCard.d.ts +0 -130
- package/src/components/HkAltSignIn.scss +0 -61
- package/src/components/HkAltSignIn.test.tsx +0 -88
- package/src/components/HkAltSignIn.tsx +0 -96
- package/src/components/HkAuthMethodList.scss +0 -118
- package/src/components/HkAuthMethodList.test.tsx +0 -130
- package/src/components/HkAuthMethodList.tsx +0 -108
- package/src/components/HkThirdPartySignInCard.scss +0 -38
- package/src/components/HkThirdPartySignInCard.test.tsx +0 -178
- package/src/components/HkThirdPartySignInCard.tsx +0 -125
|
@@ -4,23 +4,19 @@
|
|
|
4
4
|
* form body.
|
|
5
5
|
*
|
|
6
6
|
* Slot layout contract:
|
|
7
|
-
* - `methods` renders into a full-width block between the form and the
|
|
8
|
-
* footer (typically `HkAuthMethodList`): alternative sign-in buttons
|
|
9
|
-
* that must line up with the form inputs. Keeping them OUT of the
|
|
10
|
-
* footer is what lets the footer's checkbox rows stay a centered,
|
|
11
|
-
* fit-content group instead of being dragged full width with the
|
|
12
|
-
* buttons.
|
|
13
7
|
* - `footer` renders into `.s-auth-footer`, a flex column sized to its
|
|
14
8
|
* widest row and centered in the card: every slot child is its own row
|
|
15
9
|
* (remember-me, protocol consent, a sign-in link…) and the rows share
|
|
16
10
|
* one left edge. Children must not assume a shared inline line or
|
|
17
11
|
* per-row centering; content that must sit on one row belongs inside
|
|
18
|
-
* one child element.
|
|
12
|
+
* one child element. The old `methods` block between the form and the
|
|
13
|
+
* footer is retired (2026-11-26: method choice lives in the flow's
|
|
14
|
+
* segment group, never under a form).
|
|
19
15
|
* - `logo` swaps the header's logo slot; `default` is the form body.
|
|
20
16
|
*
|
|
21
17
|
* Smooth height contract:
|
|
22
18
|
* The card's content is consumer-driven and changes at runtime — channel
|
|
23
|
-
* tabs swap the
|
|
19
|
+
* tabs swap the channel bodies, validation banners
|
|
24
20
|
* appear, locale switches reflow labels — and the card's height would
|
|
25
21
|
* otherwise snap between the two layouts. The root card is therefore
|
|
26
22
|
* wrapped in a `.s-auth-card-height` measuring wrapper that owns an
|
|
@@ -23,10 +23,10 @@ export interface HkAuthChannelListEntry {
|
|
|
23
23
|
* user direction): one FULL-WIDTH ROW per channel, the mark on the left
|
|
24
24
|
* and the channel's NAME in plain sight on the right.
|
|
25
25
|
*
|
|
26
|
-
* This
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* list row states it. The row is a plain bordered button (token-driven,
|
|
26
|
+
* This replaced the small square icon tiles as the form for login-flow
|
|
27
|
+
* destination buttons — on every Celestia auth surface (the tile
|
|
28
|
+
* component retired with the 2026-11-26 divider removal). A tile hides
|
|
29
|
+
* the channel's name behind a hover tooltip; a list row states it. The row is a plain bordered button (token-driven,
|
|
30
30
|
* dark-mode automatic) — no square framing, no hover reveal.
|
|
31
31
|
*
|
|
32
32
|
* Control contract: the list never talks to a backend; the host injects
|
|
@@ -41,11 +41,6 @@ export interface HkAuthChannelListEntry {
|
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
43
|
export declare const HkAuthChannelList: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
44
|
-
/** Optional divider text rendered above the list (consumer copy). */
|
|
45
|
-
divider: {
|
|
46
|
-
type: StringConstructor;
|
|
47
|
-
default: string;
|
|
48
|
-
};
|
|
49
44
|
/** Channel rows, in render order. */
|
|
50
45
|
methods: {
|
|
51
46
|
type: () => HkAuthChannelListEntry[];
|
|
@@ -55,11 +50,6 @@ export declare const HkAuthChannelList: import("vue").DefineComponent<import("vu
|
|
|
55
50
|
/** A channel row was activated. */
|
|
56
51
|
select: (_key: string) => true;
|
|
57
52
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
58
|
-
/** Optional divider text rendered above the list (consumer copy). */
|
|
59
|
-
divider: {
|
|
60
|
-
type: StringConstructor;
|
|
61
|
-
default: string;
|
|
62
|
-
};
|
|
63
53
|
/** Channel rows, in render order. */
|
|
64
54
|
methods: {
|
|
65
55
|
type: () => HkAuthChannelListEntry[];
|
|
@@ -67,7 +57,5 @@ export declare const HkAuthChannelList: import("vue").DefineComponent<import("vu
|
|
|
67
57
|
};
|
|
68
58
|
}>> & Readonly<{
|
|
69
59
|
onSelect?: ((_key: string) => any) | undefined;
|
|
70
|
-
}>, {
|
|
71
|
-
divider: string;
|
|
72
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
60
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
73
61
|
export default HkAuthChannelList;
|
|
@@ -4,15 +4,13 @@ import "./HkAuthSsoButton.scss";
|
|
|
4
4
|
* screens whose whole channel is one redirect ("Continue with Celestia",
|
|
5
5
|
* an org channel that only offers Feishu, …).
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
* is
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* square and the name stays readable at rest, matching the third-party
|
|
15
|
-
* card pattern users already know.
|
|
7
|
+
* A single-provider sign-in button for auth screens whose whole channel
|
|
8
|
+
* is one redirect: one large centered square tile with the provider's
|
|
9
|
+
* name in plain sight below it. The visual recipe (framed square,
|
|
10
|
+
* token-based border/surface, brand icon at native colors) descends from
|
|
11
|
+
* the retired auth method tile; the label lives OUTSIDE the button so
|
|
12
|
+
* the click target stays a clean square and the name stays readable at
|
|
13
|
+
* rest.
|
|
16
14
|
*
|
|
17
15
|
* Control contract (same split as every auth card): the button never
|
|
18
16
|
* talks to a backend or builds an OAuth URL — the consumer owns the
|
|
@@ -37,7 +35,7 @@ export declare const HkAuthSsoButton: import("vue").DefineComponent<import("vue"
|
|
|
37
35
|
};
|
|
38
36
|
/** Prebuilt icon vnode (brand SVG, <img>, …) rendered inside the
|
|
39
37
|
* framed square. A missing icon falls back to the label's initial,
|
|
40
|
-
* same as
|
|
38
|
+
* same as the retired auth method tile's contract. */
|
|
41
39
|
icon: {
|
|
42
40
|
type: null;
|
|
43
41
|
default: undefined;
|
|
@@ -65,7 +63,7 @@ export declare const HkAuthSsoButton: import("vue").DefineComponent<import("vue"
|
|
|
65
63
|
};
|
|
66
64
|
/** Prebuilt icon vnode (brand SVG, <img>, …) rendered inside the
|
|
67
65
|
* framed square. A missing icon falls back to the label's initial,
|
|
68
|
-
* same as
|
|
66
|
+
* same as the retired auth method tile's contract. */
|
|
69
67
|
icon: {
|
|
70
68
|
type: null;
|
|
71
69
|
default: undefined;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { type PropType } from "vue";
|
|
2
|
+
import "./HkCornerText.scss";
|
|
3
|
+
/** One entry of a corner text lane: plain text, or a link when `href`
|
|
4
|
+
* is set (registry links open in a new tab with `noopener`, the same
|
|
5
|
+
* contract as the beian filings). */
|
|
6
|
+
export interface HkCornerTextEntry {
|
|
7
|
+
/** Stable identity for the list renderer. */
|
|
8
|
+
key: string;
|
|
9
|
+
/** Display text (an ICP filing number, a system name, …). */
|
|
10
|
+
text: string;
|
|
11
|
+
/** Link target. Set = the entry renders as an `<a target="_blank">`;
|
|
12
|
+
* unset = a plain `<span>`. */
|
|
13
|
+
href?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* HkCornerText — chrome text for the six corners of a header/footer
|
|
17
|
+
* (2026-11-26 user direction: the band's text lanes had drifted into
|
|
18
|
+
* per-app flex wrappers that squeezed whole compliance lines onto one
|
|
19
|
+
* `nowrap` row or clipped a second row outside a fixed-height band).
|
|
20
|
+
*
|
|
21
|
+
* One instance is ONE text lane for one corner. The lane:
|
|
22
|
+
*
|
|
23
|
+
* - aligns itself to its corner — `align: "start" | "center" | "end"`
|
|
24
|
+
* covers all six slots (header/footer × left/center/right): the items
|
|
25
|
+
* justify to that edge and WRAPPED lines keep aligning to it, so a
|
|
26
|
+
* right-corner lane that wraps still hugs the right edge;
|
|
27
|
+
* - wraps BETWEEN entries, never inside one: each entry is a
|
|
28
|
+
* `white-space: nowrap` atom (a filing number must never break
|
|
29
|
+
* mid-sequence — the 2026-11-25 wrap bug), and the lane flows its
|
|
30
|
+
* atoms onto as many rows as the corner's width allows;
|
|
31
|
+
* - is chrome-quiet by default: `text-2xs`, muted ink (`muted: false`
|
|
32
|
+
* restores full ink for a corner that needs emphasis);
|
|
33
|
+
* - stacks: several instances in a column form the rows of one corner
|
|
34
|
+
* (identity line above the filings line), each keeping the corner's
|
|
35
|
+
* alignment — the fixed 3rem status band holds two such rows (the
|
|
36
|
+
* version pill's double-row grid proves the geometry).
|
|
37
|
+
*
|
|
38
|
+
* Content comes either as the structured `items` list (text/href
|
|
39
|
+
* entries — filings, links) or as the default slot (arbitrary inline
|
|
40
|
+
* children — a status chip riding the same lane). Both combine; `items`
|
|
41
|
+
* render before the slot children. `as: "nav"` + `ariaLabel` marks a
|
|
42
|
+
* lane that is a group of links (the compliance filings).
|
|
43
|
+
*
|
|
44
|
+
* ```tsx
|
|
45
|
+
* <HkCornerText align="center">…identity…</HkCornerText>
|
|
46
|
+
* <HkCornerText
|
|
47
|
+
* align="center"
|
|
48
|
+
* as="nav"
|
|
49
|
+
* ariaLabel="Beian"
|
|
50
|
+
* items={[{ key: "icp", text: "苏ICP备…", href: "https://beian.miit.gov.cn/" }]}
|
|
51
|
+
* />
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export declare const HkCornerText: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
55
|
+
/** Which corner this lane sits in: `start` = left corners,
|
|
56
|
+
* `center` = the middle lane, `end` = right corners. Drives both
|
|
57
|
+
* the flex justification and the text alignment of wrapped rows. */
|
|
58
|
+
align: {
|
|
59
|
+
type: PropType<"start" | "center" | "end">;
|
|
60
|
+
default: string;
|
|
61
|
+
};
|
|
62
|
+
/** Structured entries rendered before the slot children. */
|
|
63
|
+
items: {
|
|
64
|
+
type: PropType<HkCornerTextEntry[]>;
|
|
65
|
+
default: () => never[];
|
|
66
|
+
};
|
|
67
|
+
/** Root tag: `nav` marks a lane of links (compliance filings) for
|
|
68
|
+
* assistive tech; pair it with `ariaLabel`. */
|
|
69
|
+
as: {
|
|
70
|
+
type: PropType<"div" | "nav">;
|
|
71
|
+
default: string;
|
|
72
|
+
};
|
|
73
|
+
/** Accessible name for the `nav` landmark. */
|
|
74
|
+
ariaLabel: {
|
|
75
|
+
type: StringConstructor;
|
|
76
|
+
default: undefined;
|
|
77
|
+
};
|
|
78
|
+
/** Muted chrome ink (the default). Pass false for a corner whose
|
|
79
|
+
* text must carry full ink. */
|
|
80
|
+
muted: {
|
|
81
|
+
type: BooleanConstructor;
|
|
82
|
+
default: boolean;
|
|
83
|
+
};
|
|
84
|
+
}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
85
|
+
/** Which corner this lane sits in: `start` = left corners,
|
|
86
|
+
* `center` = the middle lane, `end` = right corners. Drives both
|
|
87
|
+
* the flex justification and the text alignment of wrapped rows. */
|
|
88
|
+
align: {
|
|
89
|
+
type: PropType<"start" | "center" | "end">;
|
|
90
|
+
default: string;
|
|
91
|
+
};
|
|
92
|
+
/** Structured entries rendered before the slot children. */
|
|
93
|
+
items: {
|
|
94
|
+
type: PropType<HkCornerTextEntry[]>;
|
|
95
|
+
default: () => never[];
|
|
96
|
+
};
|
|
97
|
+
/** Root tag: `nav` marks a lane of links (compliance filings) for
|
|
98
|
+
* assistive tech; pair it with `ariaLabel`. */
|
|
99
|
+
as: {
|
|
100
|
+
type: PropType<"div" | "nav">;
|
|
101
|
+
default: string;
|
|
102
|
+
};
|
|
103
|
+
/** Accessible name for the `nav` landmark. */
|
|
104
|
+
ariaLabel: {
|
|
105
|
+
type: StringConstructor;
|
|
106
|
+
default: undefined;
|
|
107
|
+
};
|
|
108
|
+
/** Muted chrome ink (the default). Pass false for a corner whose
|
|
109
|
+
* text must carry full ink. */
|
|
110
|
+
muted: {
|
|
111
|
+
type: BooleanConstructor;
|
|
112
|
+
default: boolean;
|
|
113
|
+
};
|
|
114
|
+
}>> & Readonly<{}>, {
|
|
115
|
+
muted: boolean;
|
|
116
|
+
ariaLabel: string;
|
|
117
|
+
align: "center" | "end" | "start";
|
|
118
|
+
as: "div" | "nav";
|
|
119
|
+
items: HkCornerTextEntry[];
|
|
120
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
121
|
+
export default HkCornerText;
|
|
@@ -10,7 +10,7 @@ export interface HkIconButtonGroupOption {
|
|
|
10
10
|
label: string;
|
|
11
11
|
/** Icon-only content: a prebuilt vnode (brand SVG, lucide component,
|
|
12
12
|
* <img>) or anything renderable. Typed loose on purpose (same as
|
|
13
|
-
*
|
|
13
|
+
* the auth kit's channel-row entries): hosts materialize hikari against their
|
|
14
14
|
* own vue minor, and a hard VNode type breaks typecheck whenever the
|
|
15
15
|
* host's vue differs. Missing icons fall back to the label's initial. */
|
|
16
16
|
icon?: unknown;
|
|
@@ -39,9 +39,8 @@ export interface HkIconButtonGroupOption {
|
|
|
39
39
|
* toolbar grammar
|
|
40
40
|
*
|
|
41
41
|
* Anything else is NOT a group: independent actions that merely live on
|
|
42
|
-
* the same row
|
|
43
|
-
*
|
|
44
|
-
* HkAuthMethodList for the reference pattern.
|
|
42
|
+
* the same row render as separate framed buttons with comfortable
|
|
43
|
+
* spacing — the auth kit's channel rows are the reference pattern.
|
|
45
44
|
*
|
|
46
45
|
* Every item is icon-only and rides one size taller than a standard
|
|
47
46
|
* icon button (md = 44px vs the 32px icon button / 40px text button) —
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type PropType } from "vue";
|
|
2
|
-
import { type HkAuthChannelListEntry } from "./HkAuthChannelList";
|
|
3
2
|
import { type HkMfaFactor } from "./HkMfaVerifyCard";
|
|
4
3
|
import "./HkLoginFlow.scss";
|
|
5
4
|
/** A channel whose sign-in is a credentials handshake the host drives:
|
|
@@ -41,12 +40,6 @@ export interface HkLoginCredentialsChannel {
|
|
|
41
40
|
* only guard. Per channel on purpose: one body may be gated while
|
|
42
41
|
* the other is always submittable. */
|
|
43
42
|
disabled?: boolean;
|
|
44
|
-
/** Alternative sign-in rows under the form (rendered only when
|
|
45
|
-
* non-empty; an empty list omits the whole methods block instead of
|
|
46
|
-
* padding a dead strip). */
|
|
47
|
-
methods?: HkAuthChannelListEntry[];
|
|
48
|
-
/** Divider text above the rows; consumer-localized on purpose. */
|
|
49
|
-
methodsDivider?: string;
|
|
50
43
|
}
|
|
51
44
|
/** A channel whose whole sign-in is one redirect (a.celestia.world's
|
|
52
45
|
* "Celestia" row jumping to the central login, an org channel that
|
|
@@ -99,13 +92,9 @@ export type HkLoginChannel = HkLoginCredentialsChannel | HkLoginSsoChannel;
|
|
|
99
92
|
* fail-safe).
|
|
100
93
|
* - `account-submit(channel, username, password)` — credentials
|
|
101
94
|
* channel submitted (password is empty while `passwordField` is off).
|
|
102
|
-
* - `method-select(channel, key)` — an alternative method row was picked.
|
|
103
95
|
* - `sso-click(channel)` — the primary sso row was picked.
|
|
104
96
|
* - `verify(kind, proof)` / `verify-resend` / `verify-back` — the MFA
|
|
105
97
|
* body's events, re-emitted one level up.
|
|
106
|
-
* - `verifyMethods` — alternative sign-in rows on the verify step (the
|
|
107
|
-
* third-party providers the account can still sign in through);
|
|
108
|
-
* `verify-method-select(key)` re-emits a picked row.
|
|
109
98
|
*
|
|
110
99
|
* Card grammar (2026-11-24 user direction, the reason this file looks
|
|
111
100
|
* the way it does): *"where the content can change inside the card, do
|
|
@@ -147,9 +136,15 @@ export type HkLoginChannel = HkLoginCredentialsChannel | HkLoginSsoChannel;
|
|
|
147
136
|
* verbatim here): segment labels are ALWAYS the panel's own locale keys,
|
|
148
137
|
* never a server-provided provider name (a provider label leaked into
|
|
149
138
|
* the channel tabs once and read as "log in to ERP" instead of "log in
|
|
150
|
-
* with your organization"); the group renders only for 2+ channels
|
|
151
|
-
*
|
|
152
|
-
*
|
|
139
|
+
* with your organization"); the group renders only for 2+ channels.
|
|
140
|
+
*
|
|
141
|
+
* The 2026-11-26 user direction locked the method-selection grammar:
|
|
142
|
+
* a card NEVER stacks alternative sign-in rows (the old divider +
|
|
143
|
+
* rows-under-the-form facility is gone from the panel, the verify
|
|
144
|
+
* step and the auth kit). Every non-primary entrance — an OAuth
|
|
145
|
+
* provider, a passkey — is its own CHANNEL, and the segment group at
|
|
146
|
+
* the top is the only switcher (`federated + password` discovery now
|
|
147
|
+
* maps providers to channels for exactly this reason).
|
|
153
148
|
*
|
|
154
149
|
* `initialUsername` rides the account→verify→back round-trip (the
|
|
155
150
|
* credentials body remounts when the user navigates back, so the typed
|
|
@@ -268,30 +263,13 @@ export declare const HkLoginFlow: import("vue").DefineComponent<import("vue").Ex
|
|
|
268
263
|
type: BooleanConstructor;
|
|
269
264
|
default: boolean;
|
|
270
265
|
};
|
|
271
|
-
/** Alternative sign-in rows on the verify step: the third-party
|
|
272
|
-
* providers the account can still sign in through (a linked OAuth
|
|
273
|
-
* identity). A row is not a factor — see HkMfaVerifyCard.methods.
|
|
274
|
-
* Rendered only when non-empty. */
|
|
275
|
-
verifyMethods: {
|
|
276
|
-
type: PropType<readonly HkAuthChannelListEntry[]>;
|
|
277
|
-
default: () => never[];
|
|
278
|
-
};
|
|
279
|
-
/** Divider text above the verify step's rows; consumer-localized. */
|
|
280
|
-
verifyMethodsDivider: {
|
|
281
|
-
type: StringConstructor;
|
|
282
|
-
default: undefined;
|
|
283
|
-
};
|
|
284
266
|
}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
285
267
|
"update:modelValue": (_key: string) => true;
|
|
286
268
|
"account-submit": (_channel: string, _username: string, _password: string) => true;
|
|
287
|
-
"method-select": (_channel: string, _key: string) => true;
|
|
288
269
|
"sso-click": (_channel: string) => true;
|
|
289
270
|
verify: (_kind: HkMfaFactor, _proof: string) => true;
|
|
290
271
|
"verify-resend": () => true;
|
|
291
272
|
"verify-back": () => true;
|
|
292
|
-
/** A third-party sign-in row was picked on the verify step — the
|
|
293
|
-
* provider's key, as `method-select` carries on the account step. */
|
|
294
|
-
"verify-method-select": (_key: string) => true;
|
|
295
273
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
296
274
|
/** The deployment's sign-in channels. One entry renders a plain
|
|
297
275
|
* card (no segment group); two entries render the pill group. */
|
|
@@ -393,28 +371,13 @@ export declare const HkLoginFlow: import("vue").DefineComponent<import("vue").Ex
|
|
|
393
371
|
type: BooleanConstructor;
|
|
394
372
|
default: boolean;
|
|
395
373
|
};
|
|
396
|
-
/** Alternative sign-in rows on the verify step: the third-party
|
|
397
|
-
* providers the account can still sign in through (a linked OAuth
|
|
398
|
-
* identity). A row is not a factor — see HkMfaVerifyCard.methods.
|
|
399
|
-
* Rendered only when non-empty. */
|
|
400
|
-
verifyMethods: {
|
|
401
|
-
type: PropType<readonly HkAuthChannelListEntry[]>;
|
|
402
|
-
default: () => never[];
|
|
403
|
-
};
|
|
404
|
-
/** Divider text above the verify step's rows; consumer-localized. */
|
|
405
|
-
verifyMethodsDivider: {
|
|
406
|
-
type: StringConstructor;
|
|
407
|
-
default: undefined;
|
|
408
|
-
};
|
|
409
374
|
}>> & Readonly<{
|
|
410
375
|
"onUpdate:modelValue"?: ((_key: string) => any) | undefined;
|
|
411
376
|
onVerify?: ((_kind: "password" | "passkey" | "totp" | "sms", _proof: string) => any) | undefined;
|
|
412
|
-
"onMethod-select"?: ((_channel: string, _key: string) => any) | undefined;
|
|
413
377
|
"onAccount-submit"?: ((_channel: string, _username: string, _password: string) => any) | undefined;
|
|
414
378
|
"onSso-click"?: ((_channel: string) => any) | undefined;
|
|
415
379
|
"onVerify-resend"?: (() => any) | undefined;
|
|
416
380
|
"onVerify-back"?: (() => any) | undefined;
|
|
417
|
-
"onVerify-method-select"?: ((_key: string) => any) | undefined;
|
|
418
381
|
}>, {
|
|
419
382
|
step: "verify" | "account";
|
|
420
383
|
title: string;
|
|
@@ -431,7 +394,5 @@ export declare const HkLoginFlow: import("vue").DefineComponent<import("vue").Ex
|
|
|
431
394
|
verifyLoading: boolean;
|
|
432
395
|
verifyResending: boolean;
|
|
433
396
|
verifyShowFactorPicker: boolean;
|
|
434
|
-
verifyMethods: readonly HkAuthChannelListEntry[];
|
|
435
|
-
verifyMethodsDivider: string;
|
|
436
397
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
437
398
|
export default HkLoginFlow;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type PropType } from "vue";
|
|
2
|
-
import { type HkAuthChannelListEntry } from "./HkAuthChannelList";
|
|
3
2
|
import "./HkMfaVerifyCard.scss";
|
|
4
3
|
/** Every second-factor kind this card can drive. The first three are the
|
|
5
4
|
* classic second factors a backend announces after the primary login;
|
|
@@ -69,13 +68,12 @@ export declare function hkMfaVerifySubtitle(t: HkMfaTranslate, options?: {
|
|
|
69
68
|
* "one more verification" wording. The card re-selects and clears its
|
|
70
69
|
* fields whenever the announced set or the proven factor changes.
|
|
71
70
|
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
* provider
|
|
77
|
-
*
|
|
78
|
-
* list, so a provider reads the same on both steps.
|
|
71
|
+
* The old alternative sign-in lane (`methods` + divider under the proof
|
|
72
|
+
* field) is GONE (2026-11-26 user direction: method choice belongs to
|
|
73
|
+
* the segment group at the top of the flow, never to rows stacked under
|
|
74
|
+
* a form) — a visitor who would rather continue through a linked
|
|
75
|
+
* provider goes BACK to the first step and picks the provider's channel
|
|
76
|
+
* there.
|
|
79
77
|
*
|
|
80
78
|
* i18n: every visible string defaults to the `hikari::mfaVerify.*` locales
|
|
81
79
|
* (11 languages ship with the card); `title` / `subtitle` overrides win
|
|
@@ -151,26 +149,6 @@ export declare const HkMfaVerifyCard: import("vue").DefineComponent<import("vue"
|
|
|
151
149
|
type: StringConstructor;
|
|
152
150
|
default: undefined;
|
|
153
151
|
};
|
|
154
|
-
/** Alternative sign-in rows UNDER the factor's proof field: the
|
|
155
|
-
* third-party providers this account can still sign in through (a
|
|
156
|
-
* linked OAuth identity — the erp "bind an existing account" ladder
|
|
157
|
-
* offers them beside password / totp). A row is NOT a factor: it
|
|
158
|
-
* never enters the picker and never emits `verify`; picking one
|
|
159
|
-
* hands the whole sign-in to the host (`method-select`), which
|
|
160
|
-
* usually leaves the page for the provider's authorization round
|
|
161
|
-
* trip. Rendered only when non-empty — the credentials card's
|
|
162
|
-
* `methods` rule: an empty list must not pad a dead strip under
|
|
163
|
-
* the submit. */
|
|
164
|
-
methods: {
|
|
165
|
-
type: PropType<readonly HkAuthChannelListEntry[]>;
|
|
166
|
-
default: () => never[];
|
|
167
|
-
};
|
|
168
|
-
/** Divider text above the rows; consumer-localized on purpose (the
|
|
169
|
-
* credentials channel's `methodsDivider` is the same contract). */
|
|
170
|
-
methodsDivider: {
|
|
171
|
-
type: StringConstructor;
|
|
172
|
-
default: undefined;
|
|
173
|
-
};
|
|
174
152
|
/** Focus the factor ON STAGE when the card mounts (the verify step
|
|
175
153
|
* just opened) and whenever the selected factor changes: the proof
|
|
176
154
|
* field for `totp` / `sms` (HkOtpInput owns that one) / `password`,
|
|
@@ -217,8 +195,6 @@ export declare const HkMfaVerifyCard: import("vue").DefineComponent<import("vue"
|
|
|
217
195
|
resend: () => true;
|
|
218
196
|
/** Abandon the step-up (back to the credentials card). */
|
|
219
197
|
back: () => true;
|
|
220
|
-
/** An alternative sign-in row was picked — the provider's key. */
|
|
221
|
-
"method-select": (_key: string) => true;
|
|
222
198
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
223
199
|
/** The factor kinds this account announced, server order. Raw
|
|
224
200
|
* strings are welcome — unknown kinds are filtered, and an emptied
|
|
@@ -276,26 +252,6 @@ export declare const HkMfaVerifyCard: import("vue").DefineComponent<import("vue"
|
|
|
276
252
|
type: StringConstructor;
|
|
277
253
|
default: undefined;
|
|
278
254
|
};
|
|
279
|
-
/** Alternative sign-in rows UNDER the factor's proof field: the
|
|
280
|
-
* third-party providers this account can still sign in through (a
|
|
281
|
-
* linked OAuth identity — the erp "bind an existing account" ladder
|
|
282
|
-
* offers them beside password / totp). A row is NOT a factor: it
|
|
283
|
-
* never enters the picker and never emits `verify`; picking one
|
|
284
|
-
* hands the whole sign-in to the host (`method-select`), which
|
|
285
|
-
* usually leaves the page for the provider's authorization round
|
|
286
|
-
* trip. Rendered only when non-empty — the credentials card's
|
|
287
|
-
* `methods` rule: an empty list must not pad a dead strip under
|
|
288
|
-
* the submit. */
|
|
289
|
-
methods: {
|
|
290
|
-
type: PropType<readonly HkAuthChannelListEntry[]>;
|
|
291
|
-
default: () => never[];
|
|
292
|
-
};
|
|
293
|
-
/** Divider text above the rows; consumer-localized on purpose (the
|
|
294
|
-
* credentials channel's `methodsDivider` is the same contract). */
|
|
295
|
-
methodsDivider: {
|
|
296
|
-
type: StringConstructor;
|
|
297
|
-
default: undefined;
|
|
298
|
-
};
|
|
299
255
|
/** Focus the factor ON STAGE when the card mounts (the verify step
|
|
300
256
|
* just opened) and whenever the selected factor changes: the proof
|
|
301
257
|
* field for `totp` / `sms` (HkOtpInput owns that one) / `password`,
|
|
@@ -338,11 +294,9 @@ export declare const HkMfaVerifyCard: import("vue").DefineComponent<import("vue"
|
|
|
338
294
|
onBack?: (() => any) | undefined;
|
|
339
295
|
onVerify?: ((_kind: "password" | "passkey" | "totp" | "sms", _proof: string) => any) | undefined;
|
|
340
296
|
onResend?: (() => any) | undefined;
|
|
341
|
-
"onMethod-select"?: ((_key: string) => any) | undefined;
|
|
342
297
|
}>, {
|
|
343
298
|
title: string;
|
|
344
299
|
loading: boolean;
|
|
345
|
-
methods: readonly HkAuthChannelListEntry[];
|
|
346
300
|
disabled: boolean;
|
|
347
301
|
subtitle: string;
|
|
348
302
|
autofocus: boolean;
|
|
@@ -353,7 +307,6 @@ export declare const HkMfaVerifyCard: import("vue").DefineComponent<import("vue"
|
|
|
353
307
|
accountName: string;
|
|
354
308
|
resending: boolean;
|
|
355
309
|
passkeyRetryHint: string;
|
|
356
|
-
methodsDivider: string;
|
|
357
310
|
showFactorPicker: boolean;
|
|
358
311
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
359
312
|
export default HkMfaVerifyCard;
|
|
@@ -28,12 +28,8 @@
|
|
|
28
28
|
* round-trip (the card remounts when the user navigates back).
|
|
29
29
|
* - `footer` slot — content below the submit button (remember-me,
|
|
30
30
|
* protocol links, …).
|
|
31
|
-
* - `methods` slot — forwarded to HkAuthCard's full-width methods block
|
|
32
|
-
* between the form and the footer (typically `HkAuthMethodList`), so
|
|
33
|
-
* alternative sign-in buttons line up with the inputs while the footer
|
|
34
|
-
* rows keep their centered-group layout.
|
|
35
31
|
* - `bare: true` — render ONLY the credential fragment (the `<form>` plus
|
|
36
|
-
* the
|
|
32
|
+
* the footer block, same wrapper classes) with NO HkAuthCard
|
|
37
33
|
* shell: for hosts that own a stable card shell and swap this body
|
|
38
34
|
* inside it (HkLoginFlow's channel switch — 2026-11-24 user direction:
|
|
39
35
|
* the shell, its header and the channel tabs must NOT dissolve when
|
|
@@ -91,7 +91,8 @@ export declare const HkStatusBar: import("vue").DefineComponent<import("vue").Ex
|
|
|
91
91
|
/**
|
|
92
92
|
* Optional extra rows appended to the connection-info popover (after
|
|
93
93
|
* the network row): host-supplied label/value pairs with a prebuilt
|
|
94
|
-
* icon vnode each — the same loose-icon contract as
|
|
94
|
+
* icon vnode each — the same loose-icon contract as the auth kit's
|
|
95
|
+
* channel rows.
|
|
95
96
|
* Rows grow with their content but cap at 400px; values past the cap
|
|
96
97
|
* ellipsize (full text rides the native title). Lets a host surface
|
|
97
98
|
* stage endpoints (gateway, registry…) inside the popover without
|
|
@@ -167,7 +168,8 @@ export declare const HkStatusBar: import("vue").DefineComponent<import("vue").Ex
|
|
|
167
168
|
/**
|
|
168
169
|
* Optional extra rows appended to the connection-info popover (after
|
|
169
170
|
* the network row): host-supplied label/value pairs with a prebuilt
|
|
170
|
-
* icon vnode each — the same loose-icon contract as
|
|
171
|
+
* icon vnode each — the same loose-icon contract as the auth kit's
|
|
172
|
+
* channel rows.
|
|
171
173
|
* Rows grow with their content but cap at 400px; values past the cap
|
|
172
174
|
* ellipsize (full text rides the native title). Lets a host surface
|
|
173
175
|
* stage endpoints (gateway, registry…) inside the popover without
|
|
@@ -61,20 +61,23 @@ export interface HkLoginPlanCopy {
|
|
|
61
61
|
credentialsKey?: string;
|
|
62
62
|
/** Optional segment label for the credentials channel. */
|
|
63
63
|
credentialsLabel?: string;
|
|
64
|
-
/** Divider text above the provider rows. Omitted when not given (the
|
|
65
|
-
* list renders no divider) — the consumer-localised rule is kept. */
|
|
66
|
-
divider?: string;
|
|
67
64
|
}
|
|
68
65
|
/**
|
|
69
66
|
* Map a discovery document to a `HkLoginPlan`.
|
|
70
67
|
*
|
|
68
|
+
* The 2026-11-26 method-selection grammar: every non-password entrance is
|
|
69
|
+
* its OWN `sso` channel — the segment group at the top of the flow is the
|
|
70
|
+
* only switcher, and no card ever stacks alternative rows under a form
|
|
71
|
+
* (the divider facility is gone).
|
|
72
|
+
*
|
|
71
73
|
* - `relay` → `channels: []`, `defaultChannel: null` (hand-off screen).
|
|
72
|
-
* - `
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
74
|
+
* - `password: true` → the credentials channel FIRST (the landing tab),
|
|
75
|
+
* then every announced entrance as its own `sso` channel. `local` mode
|
|
76
|
+
* keeps its old filter: an oauth method in a local document is not an
|
|
77
|
+
* entrance (contradictory document; the server is the authority), so
|
|
78
|
+
* only `passkey` / `custom` kinds become channels there.
|
|
79
|
+
* - `password: false` → no credentials channel; every method becomes its
|
|
80
|
+
* own `sso` channel. `defaultChannel` = the first one's key.
|
|
78
81
|
*/
|
|
79
82
|
export declare function hkLoginPlanFromDiscovery(d: HkLoginDiscovery, copy?: HkLoginPlanCopy): HkLoginPlan;
|
|
80
83
|
/** True for a path hikari may forward as a return address: absolute,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ export { default as HActionBar } from "./components/HkActionBar";
|
|
|
2
2
|
export { default as HAdaptiveDialog } from "./components/HkAdaptiveDialog";
|
|
3
3
|
export { default as HAdaptiveTabs } from "./components/HkAdaptiveTabs";
|
|
4
4
|
export { default as HAlert } from "./components/HkAlert";
|
|
5
|
-
export { default as HAltSignIn } from "./components/HkAltSignIn";
|
|
6
5
|
export { default as HAmbientLayer } from "./components/HkAmbientLayer";
|
|
7
6
|
export { default as HAvatar } from "./components/HkAvatar";
|
|
8
7
|
export { default as HBadge } from "./components/HkBadge";
|
|
@@ -238,9 +237,7 @@ export { HkSolarLocationSetting as HSolarLocationSetting } from "./components/Hk
|
|
|
238
237
|
export { HkSolarLocationEditor as HSolarLocationEditor } from "./components/HkSolarLocationEditor";
|
|
239
238
|
export { HkDateTag as HDateTag } from "./components/HkDateTag";
|
|
240
239
|
export { HkAuthCard as HAuthCard } from "./components/HkAuthCard";
|
|
241
|
-
export { default as HAuthMethodList } from "./components/HkAuthMethodList";
|
|
242
240
|
export { HkSignInCard as HSignInCard } from "./components/HkSignInCard";
|
|
243
|
-
export { HkThirdPartySignInCard as HThirdPartySignInCard } from "./components/HkThirdPartySignInCard";
|
|
244
241
|
export { default as HAuthSubmitButton } from "./components/HkAuthSubmitButton";
|
|
245
242
|
export { HkAuthHandoff as HAuthHandoff } from "./components/HkAuthHandoff";
|
|
246
243
|
export { HkMfaVerifyCard as HMfaVerifyCard, hkIsMfaFactor as isMfaFactor, hkPreferredMfaFactor as preferredMfaFactor, hkMfaVerifyTitle as mfaVerifyTitle, hkMfaVerifySubtitle as mfaVerifySubtitle, type HkMfaFactor as MfaFactor, } from "./components/HkMfaVerifyCard";
|
|
@@ -285,7 +282,6 @@ export { default as HkActionBar } from "./components/HkActionBar";
|
|
|
285
282
|
export { default as HkAdaptiveDialog } from "./components/HkAdaptiveDialog";
|
|
286
283
|
export { default as HkAdaptiveTabs } from "./components/HkAdaptiveTabs";
|
|
287
284
|
export { default as HkAlert } from "./components/HkAlert";
|
|
288
|
-
export { default as HkAltSignIn, type HkAltSignInEntry } from "./components/HkAltSignIn";
|
|
289
285
|
export { default as HkAmbientLayer } from "./components/HkAmbientLayer";
|
|
290
286
|
export { default as HkAvatar } from "./components/HkAvatar";
|
|
291
287
|
export { default as HkBadge } from "./components/HkBadge";
|
|
@@ -461,7 +457,6 @@ export { default as HkSelectionGrid } from "./components/HkSelectionGrid";
|
|
|
461
457
|
export { default as HkSelectionWaterfall } from "./components/HkSelectionWaterfall";
|
|
462
458
|
export { default as HkMasonry } from "./components/HkMasonry";
|
|
463
459
|
export { default as HkLogo } from "./components/HkLogo";
|
|
464
|
-
export { default as HkAuthMethodList, type HkAuthMethodListEntry } from "./components/HkAuthMethodList";
|
|
465
460
|
export { default as HkAuthSubmitButton } from "./components/HkAuthSubmitButton";
|
|
466
461
|
export { type HkDockBarAnchor as HkDockBarAnchor } from "./components/HkDockBar";
|
|
467
462
|
export { type HkDockBarSurface as HkDockBarSurface } from "./components/HkDockBar";
|
|
@@ -488,12 +483,13 @@ export { HkSolarLocationEditor as HkSolarLocationEditor } from "./components/HkS
|
|
|
488
483
|
export { HkDateTag as HkDateTag } from "./components/HkDateTag";
|
|
489
484
|
export { HkAuthCard as HkAuthCard } from "./components/HkAuthCard";
|
|
490
485
|
export { HkSignInCard as HkSignInCard } from "./components/HkSignInCard";
|
|
491
|
-
export { HkThirdPartySignInCard as HkThirdPartySignInCard } from "./components/HkThirdPartySignInCard";
|
|
492
486
|
export { HkMfaVerifyCard as HkMfaVerifyCard } from "./components/HkMfaVerifyCard";
|
|
493
487
|
export { type HkMfaFactor as HkMfaFactor } from "./components/HkMfaVerifyCard";
|
|
494
488
|
export { hkMfaVerifyTitle as hkMfaVerifyTitle, hkMfaVerifySubtitle as hkMfaVerifySubtitle, hkMfaFactorLabel as hkMfaFactorLabel, type HkMfaTranslate as HkMfaTranslate, } from "./components/HkMfaVerifyCard";
|
|
495
489
|
export { HkAuthScreen as HkAuthScreen } from "./components/HkAuthScreen";
|
|
496
490
|
export { type HkAuthScreenBeianEntry as HkAuthScreenBeianEntry } from "./components/HkAuthScreen";
|
|
491
|
+
export { HkCornerText as HkCornerText } from "./components/HkCornerText";
|
|
492
|
+
export { type HkCornerTextEntry as HkCornerTextEntry } from "./components/HkCornerText";
|
|
497
493
|
export { HkLoginFlow as HkLoginFlow } from "./components/HkLoginFlow";
|
|
498
494
|
export { type HkLoginChannel as HkLoginChannel } from "./components/HkLoginFlow";
|
|
499
495
|
export { type HkLoginCredentialsChannel as HkLoginCredentialsChannel } from "./components/HkLoginFlow";
|