@hgdc/auth 0.13.0 → 0.14.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.
- package/README.md +1 -1
- package/dist/react.d.ts +8 -4
- package/dist/react.js +11 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -109,7 +109,7 @@ export const Route = createFileRoute("/auth/hgdc")({
|
|
|
109
109
|
|
|
110
110
|
Le claim `organizations` n'est lu qu'à la création d'une session (étape 1 ci-dessous). Une organisation rejointe dans Account reste donc invisible dans un produit dont la session est ouverte, jusqu'à 7 jours. `refresh=1` repasse par Account même avec une session ouverte : la nouvelle session relit le claim, sans formulaire quand la session d'Account existe.
|
|
111
111
|
|
|
112
|
-
- Barre et menu des produits (`@hgdc/ui/products`) : `https://<mot>.hgdc.ch/auth/hgdc?refresh=background&next=/` (ADR 0016). Session du produit ouverte : redirection immédiate vers `next` et cookie `HGDC_ORG_SYNC_COOKIE` ; la
|
|
112
|
+
- Barre et menu des produits (`@hgdc/ui/products`) : `https://<mot>.hgdc.ch/auth/hgdc?refresh=background&next=/` (ADR 0016). Session du produit ouverte : redirection immédiate vers `next` et cookie `HGDC_ORG_SYNC_COOKIE` ; la racine du document (`FamilyLoaderRoot`) le consomme et relit les organisations dans un cadre caché sans script (`HGDC_BACKGROUND_REFRESH_PATH`, `frame=1`), qui revient sur une réponse vide (`HGDC_FRAME_DONE_PATH`). La nouvelle session recopie les organisations, les requêtes abonnées se mettent à jour. Sans session : connexion habituelle.
|
|
113
113
|
- Préchargement au survol (Speculation Rules, `prefetch` seulement) : l'entrée ne rend que la redirection d'une session ouverte ; tout ce qui démarrerait une connexion (`refresh=1`, `frame=1`, pas de session) répond 503 à une requête `Sec-Purpose: prefetch`.
|
|
114
114
|
- Page d'une organisation inconnue du produit (ou dont la personne n'est pas membre localement) : une seule redirection vers `hgdcRefreshPath("/o/acme")` avant d'afficher « introuvable ». Au retour, `next` porte `?synced=1` : `hasSyncedMarker(location.search)` vrai, la page affiche « introuvable » au lieu de relancer. L'entrée elle-même ne relance jamais un `next` déjà marqué : pas de boucle.
|
|
115
115
|
|
package/dist/react.d.ts
CHANGED
|
@@ -36,13 +36,17 @@ export declare function startHgdcSignIn(authClient: HgdcAuthClient, { callbackUR
|
|
|
36
36
|
error: unknown;
|
|
37
37
|
}>;
|
|
38
38
|
/**
|
|
39
|
-
* Le H
|
|
40
|
-
*
|
|
39
|
+
* Le H « Double » de la H Collection, copies exactes de `@hgdc/ui/family/hcollection-icon.svg` (fond
|
|
40
|
+
* clair) et `hcollection-icon-dark.svg` (fond sombre) ; un test le vérifie : `@hgdc/auth` ne dépend
|
|
41
|
+
* pas de `@hgdc/ui`.
|
|
41
42
|
*/
|
|
42
43
|
export declare const HGDC_MARK_SVG: string;
|
|
44
|
+
/** Le même H, pour un fond sombre. */
|
|
45
|
+
export declare const HGDC_MARK_DARK_SVG: string;
|
|
43
46
|
/**
|
|
44
|
-
* Le H
|
|
45
|
-
*
|
|
47
|
+
* Le H de la H Collection, en image : ses dégradés gardent leurs identifiants pour eux, deux marques
|
|
48
|
+
* dans une page ne se marchent pas dessus. Les deux variantes sont rendues ; les styles de
|
|
49
|
+
* `@hgdc/ui` (`data-mark-theme`) montrent celle du thème. Couleurs pleines, jamais recolorées.
|
|
46
50
|
*/
|
|
47
51
|
export declare function HgdcMark({ className }: {
|
|
48
52
|
className?: string;
|
package/dist/react.js
CHANGED
|
@@ -19,16 +19,21 @@ export async function startHgdcSignIn(authClient, { callbackURL = "/", errorCall
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* Le H
|
|
23
|
-
*
|
|
22
|
+
* Le H « Double » de la H Collection, copies exactes de `@hgdc/ui/family/hcollection-icon.svg` (fond
|
|
23
|
+
* clair) et `hcollection-icon-dark.svg` (fond sombre) ; un test le vérifie : `@hgdc/auth` ne dépend
|
|
24
|
+
* pas de `@hgdc/ui`.
|
|
24
25
|
*/
|
|
25
|
-
export const HGDC_MARK_SVG = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="
|
|
26
|
+
export const HGDC_MARK_SVG = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="9 9 46 46"><defs><linearGradient id="hl" x1="0" y1="11.5" x2="0" y2="47.5" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#2c78fd"/><stop offset="1" stop-color="#7343fe"/></linearGradient><linearGradient id="hr" x1="0" y1="11.5" x2="0" y2="47.5" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fe5292"/><stop offset="1" stop-color="#ff9a46"/></linearGradient><linearGradient id="hf" x1="24.5" y1="0" x2="34.5" y2="0" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#000"/></linearGradient><mask id="hm" maskUnits="userSpaceOnUse" x="0" y="0" width="64" height="64"><rect x="24" y="24" width="11" height="11" fill="url(#hf)"/></mask><g id="h"><path d="M24 25H35V34H24Z" fill="url(#hr)"/><path d="M24 25H35V34H24Z" fill="url(#hl)" mask="url(#hm)"/><path d="M17.5 11.5H21.5A3 3 0 0 1 24.5 14.5V44.5A3 3 0 0 1 21.5 47.5H17.5A3 3 0 0 1 14.5 44.5V14.5A3 3 0 0 1 17.5 11.5Z" fill="url(#hl)"/><path d="M37.5 11.5H41.5A3 3 0 0 1 44.5 14.5V44.5A3 3 0 0 1 41.5 47.5H37.5A3 3 0 0 1 34.5 44.5V14.5A3 3 0 0 1 37.5 11.5Z" fill="url(#hr)"/></g></defs><use href="#h" transform="translate(6 6)" opacity="0.35"/><use href="#h"/></svg>';
|
|
27
|
+
/** Le même H, pour un fond sombre. */
|
|
28
|
+
export const HGDC_MARK_DARK_SVG = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="9 9 46 46"><defs><linearGradient id="hl" x1="0" y1="11.5" x2="0" y2="47.5" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#6aa0ff"/><stop offset="1" stop-color="#9a7bff"/></linearGradient><linearGradient id="hr" x1="0" y1="11.5" x2="0" y2="47.5" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ff7aa8"/><stop offset="1" stop-color="#ffb070"/></linearGradient><linearGradient id="hf" x1="24.5" y1="0" x2="34.5" y2="0" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#000"/></linearGradient><mask id="hm" maskUnits="userSpaceOnUse" x="0" y="0" width="64" height="64"><rect x="24" y="24" width="11" height="11" fill="url(#hf)"/></mask><g id="h"><path d="M24 25H35V34H24Z" fill="url(#hr)"/><path d="M24 25H35V34H24Z" fill="url(#hl)" mask="url(#hm)"/><path d="M17.5 11.5H21.5A3 3 0 0 1 24.5 14.5V44.5A3 3 0 0 1 21.5 47.5H17.5A3 3 0 0 1 14.5 44.5V14.5A3 3 0 0 1 17.5 11.5Z" fill="url(#hl)"/><path d="M37.5 11.5H41.5A3 3 0 0 1 44.5 14.5V44.5A3 3 0 0 1 41.5 47.5H37.5A3 3 0 0 1 34.5 44.5V14.5A3 3 0 0 1 37.5 11.5Z" fill="url(#hr)"/></g></defs><use href="#h" transform="translate(6 6)" opacity="0.5"/><use href="#h"/></svg>';
|
|
29
|
+
const markSrc = (svg) => `data:image/svg+xml,${encodeURIComponent(svg)}`;
|
|
26
30
|
/**
|
|
27
|
-
* Le H
|
|
28
|
-
*
|
|
31
|
+
* Le H de la H Collection, en image : ses dégradés gardent leurs identifiants pour eux, deux marques
|
|
32
|
+
* dans une page ne se marchent pas dessus. Les deux variantes sont rendues ; les styles de
|
|
33
|
+
* `@hgdc/ui` (`data-mark-theme`) montrent celle du thème. Couleurs pleines, jamais recolorées.
|
|
29
34
|
*/
|
|
30
35
|
export function HgdcMark({ className }) {
|
|
31
|
-
return (_jsx("
|
|
36
|
+
return (_jsx("span", { "data-slot": "hgdc-mark", "aria-hidden": "true", className: className, style: { display: "inline-block", flexShrink: 0 }, children: ["light", "dark"].map((theme) => (_jsx("img", { src: markSrc(theme === "light" ? HGDC_MARK_SVG : HGDC_MARK_DARK_SVG), alt: "", width: 16, height: 16, draggable: false, "data-mark-theme": theme, style: { width: "100%", height: "100%" } }, theme))) }));
|
|
32
37
|
}
|
|
33
38
|
/**
|
|
34
39
|
* Bouton « Se connecter avec HGDC ». Sans style propre : le produit le met en forme par
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hgdc/auth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Connexion HGDC : bouton « Se connecter avec HGDC », config better-auth et gardes Convex.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://github.com/hugogebel-boop/hgdc-kit/tree/main/packages/auth#readme",
|