@bythium/unisson-identity 0.0.0-stage → 0.1.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.
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ // Generated from the contracts of the available tags of the pack. Do not edit.
3
+ import { createElement } from 'react';
4
+ import { elementAttributes } from './attributes.js';
5
+
6
+ /** A function component that renders the spec's tag with its props as attributes and its listeners as events. */
7
+ export function wrapper(name, spec) {
8
+ const Wrapper = (props) => createElement(spec.tag, elementAttributes(spec, props));
9
+ Wrapper.displayName = name;
10
+ return Wrapper;
11
+ }
@@ -0,0 +1,14 @@
1
+ <!-- Generated from the contract of bythium-identity-org-members. Do not edit. -->
2
+ <script module>
3
+ if (typeof customElements !== 'undefined') import('../identity-org-members.js');
4
+ </script>
5
+
6
+ <script>
7
+ import { elementAttributes } from './attributes.js';
8
+
9
+ const spec = {"tag":"bythium-identity-org-members","attributes":{"organizationId":["organization-id","string"],"organizationName":["organization-name","string"],"members":["members","string"],"roles":["roles","string"],"assignableRoles":["assignable-roles","string"],"protectedRoles":["protected-roles","string"],"page":["page","number"],"perPage":["per-page","number"],"total":["total","number"],"pending":["pending","string"],"state":["state","string"],"retryAfter":["retry-after","number"],"errors":["errors","string"],"heading":["heading","string"],"headingLevel":["heading-level","number"],"locale":["locale","string"]},"events":{}};
10
+ // Every prop the parent passes, without Svelte's own keys ($$slots, $$scope, children).
11
+ $: attributes = elementAttributes(spec, Object.fromEntries(Object.entries($$props).filter(([key]) => !key.startsWith('$$') && key !== 'children')));
12
+ </script>
13
+
14
+ <bythium-identity-org-members {...attributes}><slot /></bythium-identity-org-members>
@@ -0,0 +1,60 @@
1
+ // Generated from the contracts of the available tags of the pack. Do not edit.
2
+ import type { Component, Snippet } from 'svelte';
3
+ import type { HTMLAttributes } from 'svelte/elements';
4
+ import type { BythiumIdentityOrgMembers, BythiumIdentityOrgMembersEventMap } from '../identity-org-members.js';
5
+
6
+ export interface OIdentityOrgMembersOwnProps {
7
+ /** Identifiant de l’organisation (paramètre de chemin de chaque appel). Il part dans le champ `id` des événements. Attribute `organization-id`. */
8
+ organizationId?: string;
9
+ /** Nom affiché de l’organisation, cité dans la note de portée : les rôles sont ceux de l’organisation, pas les rôles globaux. Attribute `organization-name`. */
10
+ organizationName?: string;
11
+ /** Membres de la page courante, tableau JSON { user_id (requis), name, email, roles : [{ id, name }] }. Seuls ces champs sont lus : une adresse d’image, un jeton ou une métadonnée présents dans les données ne sont jamais affichés. Attribute `members`. */
12
+ members?: string;
13
+ /** Rôles que l’organisation peut attribuer, tableau JSON { id, name }. Vide : les boutons de rôles sont bloqués. Attribute `roles`. */
14
+ roles?: string;
15
+ /** Périmètre de délégation : tableau JSON d’identifiants de rôles que la personne peut attribuer ou retirer. Un rôle hors périmètre est grisé et n’est jamais envoyé. Vide : tous les rôles de `roles`. Attribute `assignable-roles`. */
16
+ assignableRoles?: string;
17
+ /** Identifiants JSON des rôles d’administration de l’organisation. Retirer le dernier membre qui en détient un demande une confirmation explicite. Attribute `protected-roles`. */
18
+ protectedRoles?: string;
19
+ /** Page courante, à partir de 0. Attribute `page`. */
20
+ page?: number;
21
+ /** Taille de page demandée à l’API. Attribute `per-page`. */
22
+ perPage?: number;
23
+ /** Nombre total de membres (include_totals). Au-delà de la page, la pagination s’affiche et la liste est tenue pour partielle. Attribute `total`. */
24
+ total?: number;
25
+ /** Identifiant du membre dont un changement est en cours dans la page, ou « add » pour un ajout : les boutons sont bloqués et l’attente annoncée. Vide : rien en cours. Attribute `pending`. */
26
+ pending?: string;
27
+ /** État des données : ready (affiché), loading (chargement), error (erreur de lecture, avec Réessayer), forbidden (403, droit manquant), throttled (429, trop de requêtes, avec Réessayer à la demande de la personne : rien n’est renvoyé seul). Attribute `state`. */
28
+ state?: 'ready' | 'loading' | 'error' | 'forbidden' | 'throttled';
29
+ /** Secondes à attendre indiquées par la réponse 429 (en-tête Retry-After) ; 0 : inconnu. Affiché seulement dans l’état throttled. Attribute `retry-after`. */
30
+ retryAfter?: number;
31
+ /** Erreurs par champ de la page, objet JSON { champ : message }. Le champ « form » porte l’erreur du formulaire entier. Vide ou JSON invalide : aucune. Attribute `errors`. */
32
+ errors?: string;
33
+ /** Titre. Vide : « Membres de l’organisation » (ou « Organization members » selon locale). Attribute `heading`. */
34
+ heading?: string;
35
+ /** Niveau du titre dans le plan de la page (WC-N03). Attribute `heading-level`. */
36
+ headingLevel?: number;
37
+ /** Langue des textes intégrés (BCP 47) : toute balise en vaut en, le reste vaut fr. Attribute `locale`. */
38
+ locale?: string;
39
+ /** Émis à la confirmation de l’ajout d’identités existantes (A021, POST /organizations/{id}/members). Les identités deviennent membres sans rôle. Event `bythium-identity-org-members-add`. */
40
+ 'onbythium-identity-org-members-add'?: (event: BythiumIdentityOrgMembersEventMap['bythium-identity-org-members-add']) => void;
41
+ /** Émis à la confirmation du retrait d’une adhésion (A022, DELETE /organizations/{id}/members). Le compte n’est ni bloqué ni supprimé. Event `bythium-identity-org-members-remove`. */
42
+ 'onbythium-identity-org-members-remove'?: (event: BythiumIdentityOrgMembersEventMap['bythium-identity-org-members-remove']) => void;
43
+ /** Émis en premier à l’application des rôles (A023, POST /organizations/{id}/members/{user_id}/roles) : seulement les rôles ajoutés, jamais un rôle hors du périmètre de délégation. Event `bythium-identity-org-members-roles-assign`. */
44
+ 'onbythium-identity-org-members-roles-assign'?: (event: BythiumIdentityOrgMembersEventMap['bythium-identity-org-members-roles-assign']) => void;
45
+ /** Émis ensuite, si des rôles sont retirés (A024, DELETE /organizations/{id}/members/{user_id}/roles). Les deux appels ne sont pas atomiques : la page journalise chaque étape et peut reprendre. Event `bythium-identity-org-members-roles-remove`. */
46
+ 'onbythium-identity-org-members-roles-remove'?: (event: BythiumIdentityOrgMembersEventMap['bythium-identity-org-members-roles-remove']) => void;
47
+ /** Émis au clic sur Page précédente ou Page suivante : la page relit les membres avec ces paramètres de requête. Event `bythium-identity-org-members-page`. */
48
+ 'onbythium-identity-org-members-page'?: (event: BythiumIdentityOrgMembersEventMap['bythium-identity-org-members-page']) => void;
49
+ /** Émis au clic sur Réessayer (états error et throttled) : la page relit, jamais la balise. Event `bythium-identity-org-members-retry`. */
50
+ 'onbythium-identity-org-members-retry'?: (event: BythiumIdentityOrgMembersEventMap['bythium-identity-org-members-retry']) => void;
51
+ }
52
+
53
+ export interface OIdentityOrgMembersProps extends OIdentityOrgMembersOwnProps, Omit<HTMLAttributes<BythiumIdentityOrgMembers>, keyof OIdentityOrgMembersOwnProps | 'children'> {
54
+ /** Default slot; an element with `slot="<name>"` fills a named slot. */
55
+ children?: Snippet;
56
+ }
57
+
58
+ /** Membres d’une organisation : rôles de l’organisation, retrait de l’adhésion, ajout d’identités existantes, garde du dernier administrateur. Renders `<bythium-identity-org-members>`. */
59
+ declare const OIdentityOrgMembers: Component<OIdentityOrgMembersProps>;
60
+ export default OIdentityOrgMembers;
@@ -0,0 +1,10 @@
1
+ // Generated from the contracts of the available tags of the pack. Do not edit.
2
+ export interface WrapperSpec {
3
+ readonly tag: string;
4
+ /** Prop name to [attribute name, attribute type]. */
5
+ readonly attributes: Readonly<Record<string, readonly [string, 'string' | 'boolean' | 'number']>>;
6
+ /** Listener prop to DOM event name. */
7
+ readonly events: Readonly<Record<string, string>>;
8
+ }
9
+ export declare function attributeValue(type: 'string' | 'boolean' | 'number', value: unknown): string | number | true | null | undefined;
10
+ export declare function elementAttributes(spec: WrapperSpec, props: Readonly<Record<string, unknown>>): Record<string, unknown>;
@@ -0,0 +1,25 @@
1
+ // Generated from the contracts of the available tags of the pack. Do not edit.
2
+ /** One prop value as its attribute value: undefined leaves the attribute out. */
3
+ export function attributeValue(type, value) {
4
+ if (value === undefined || value === null) return undefined;
5
+ if (type === 'boolean') return value === false ? null : true;
6
+ if (type === 'number') return Number(value);
7
+ return String(value);
8
+ }
9
+
10
+ /** The props of a wrapper as the attributes and listeners of its tag. */
11
+ export function elementAttributes(spec, props) {
12
+ const out = {};
13
+ for (const key of Object.keys(props)) {
14
+ const value = props[key];
15
+ const attribute = Object.hasOwn(spec.attributes, key) ? spec.attributes[key] : undefined;
16
+ const event = Object.hasOwn(spec.events, key) ? spec.events[key] : undefined;
17
+ if (attribute) {
18
+ const written = attributeValue(attribute[1], value);
19
+ if (written !== undefined) out[attribute[0]] = written;
20
+ } else if (event) {
21
+ if (typeof value === 'function') out[`on${event}`] = value;
22
+ } else out[key] = value;
23
+ }
24
+ return out;
25
+ }
@@ -0,0 +1,2 @@
1
+ // Generated from the contracts of the available tags of the pack. Do not edit.
2
+ export { default as OIdentityOrgMembers, type OIdentityOrgMembersProps, type OIdentityOrgMembersOwnProps } from './OIdentityOrgMembers.svelte';
@@ -0,0 +1,2 @@
1
+ // Generated from the contracts of the available tags of the pack. Do not edit.
2
+ export { default as OIdentityOrgMembers } from './OIdentityOrgMembers.svelte';
@@ -0,0 +1,200 @@
1
+ /* GÉNÉRÉ par tools/tokens.ts depuis tools/tokens/palette.json. Ne pas modifier à la main.
2
+ Valeurs : palette Orchestre du 10 novembre 2026 (contraste fort), thèmes clair et sombre par light-dark().
3
+ Le thème suit le système ; data-theme="light" ou "dark" le force sur la racine ou sur un sous-arbre. */
4
+ :root {
5
+ color-scheme: light dark;
6
+ /* Couleurs à thème : light-dark(clair, sombre). */
7
+ --bythium-surface-page: light-dark(oklch(0.9819 0.0029 264.54), oklch(0.1723 0.0026 247.98));
8
+ --bythium-surface-base: light-dark(oklch(1 0 0), oklch(0.2048 0.0061 271.11));
9
+ --bythium-surface-card: light-dark(oklch(1 0 0), oklch(0.2271 0.0079 274.58));
10
+ --bythium-surface-raised: light-dark(oklch(0.9582 0.0041 271.37), oklch(0.253 0.0095 276.71));
11
+ --bythium-surface-overlay: light-dark(oklch(1 0 0), oklch(0.253 0.0095 276.71));
12
+ --bythium-surface-sidebar: light-dark(oklch(0.964 0.0029 264.54), oklch(0.1536 0.0027 248));
13
+ --bythium-surface-elevated: light-dark(oklch(1 0 0), oklch(0.253 0.0095 276.71));
14
+ --bythium-state-hover: light-dark(oklch(0 0 0 / 0.039), oklch(1 0 0 / 0.039));
15
+ --bythium-state-selected: light-dark(oklch(0 0 0 / 0.071), oklch(1 0 0 / 0.078));
16
+ --bythium-track: light-dark(oklch(0 0 0 / 0.11), oklch(1 0 0 / 0.09));
17
+ --bythium-text-primary: light-dark(oklch(0.2686 0.0097 268.31), oklch(0.947 0.004 286.32));
18
+ --bythium-text-secondary: light-dark(oklch(0.4559 0.0175 264.39), oklch(0.7789 0.0091 264.51));
19
+ --bythium-text-muted: light-dark(oklch(0.519 0.0208 261.3), oklch(0.6488 0.0146 262.36));
20
+ --bythium-border-subtle: light-dark(oklch(0.9157 0.0071 268.54), oklch(0.2733 0.0075 274.68));
21
+ --bythium-border-strong: light-dark(oklch(0.6354 0.0179 262.72), oklch(0.5103 0.0165 268.35));
22
+ --bythium-border-focus: light-dark(oklch(0.4884 0.0892 220.43), oklch(0.8216 0.1277 212.37));
23
+ --bythium-accent: light-dark(oklch(0.4884 0.0892 220.43), oklch(0.8216 0.1277 212.37));
24
+ --bythium-accent-secondary: light-dark(oklch(0.4884 0.0892 220.43), oklch(0.8216 0.1277 212.37));
25
+ --bythium-accent-brand: light-dark(oklch(0.8216 0.1277 212.37), oklch(0.8216 0.1277 212.37));
26
+ --bythium-on-accent: light-dark(oklch(1 0 0), oklch(0.1845 0.0101 285.36));
27
+ --bythium-link: light-dark(oklch(0.4818 0.1887 300.03), oklch(0.6929 0.2018 306.83));
28
+ --bythium-brand-primary: light-dark(oklch(0.4944 0.1932 299.27), oklch(0.4944 0.1932 299.27));
29
+ --bythium-brand-primary-hover: light-dark(oklch(0.428 0.1781 301.81), oklch(0.428 0.1781 301.81));
30
+ --bythium-on-brand-primary: light-dark(oklch(1 0 0), oklch(1 0 0));
31
+ --bythium-brand-vivid: light-dark(oklch(0.6929 0.2018 306.83), oklch(0.6929 0.2018 306.83));
32
+ --bythium-brand-primary-text: light-dark(oklch(0.4818 0.1887 300.03), oklch(0.6929 0.2018 306.83));
33
+ --bythium-status-success: light-dark(oklch(0.5036 0.0991 157.99), oklch(0.7527 0.0743 162.61));
34
+ --bythium-status-warning: light-dark(oklch(0.4989 0.093 82.27), oklch(0.8068 0.0946 86.15));
35
+ --bythium-status-danger: light-dark(oklch(0.5044 0.1499 18.44), oklch(0.7399 0.0911 14.28));
36
+ --bythium-status-info: light-dark(oklch(0.4762 0.089 251.61), oklch(0.7607 0.0638 250.13));
37
+ --bythium-chart-1: light-dark(oklch(0.6289 0.1421 304.99), oklch(0.6712 0.1396 306.02));
38
+ --bythium-chart-2: light-dark(oklch(0.6195 0.0839 214.21), oklch(0.7556 0.0971 212.58));
39
+ --bythium-chart-3: light-dark(oklch(0.6284 0.0799 84.86), oklch(0.7846 0.0971 84.35));
40
+ --bythium-chart-4: light-dark(oklch(0.6154 0.1019 164.68), oklch(0.7372 0.1163 164.58));
41
+ --bythium-chart-5: light-dark(oklch(0.6337 0.1193 17.7), oklch(0.6773 0.1174 18.63));
42
+ --bythium-chart-6: light-dark(oklch(0.5807 0.1342 260.06), oklch(0.6249 0.1295 259.68));
43
+ --pack-bg: light-dark(oklch(0.971 0.0108 297.63), oklch(0.1305 0.0143 275.32));
44
+ --pack-ink: light-dark(oklch(0.2132 0.0468 279.84), oklch(0.958 0.0202 279.94));
45
+ --pack-mut: light-dark(oklch(0.4291 0.0465 279.5), oklch(0.7557 0.039 277.13));
46
+ --pack-line: light-dark(oklch(0.332 0.1164 284.62 / 0.141), oklch(1 0 0 / 0.11));
47
+ --pack-line2: light-dark(oklch(0.332 0.1164 284.62 / 0.259), oklch(1 0 0 / 0.2));
48
+ --pack-panel: light-dark(oklch(1 0 0 / 0.78), oklch(0.1846 0.0328 277.25 / 0.78));
49
+ --pack-panel2: light-dark(oklch(1 0 0 / 0.6), oklch(1 0 0 / 0.043));
50
+ --pack-code: light-dark(oklch(0.9873 0.0067 295.45), oklch(0.159 0.0257 275.87));
51
+ --pack-codeink: light-dark(oklch(0.2979 0.0581 276.86), oklch(0.9018 0.033 278.19));
52
+ --pack-c1: light-dark(oklch(0.5288 0.0923 216.92), oklch(0.7971 0.1339 211.53));
53
+ --pack-c2: light-dark(oklch(0.5489 0.2341 285.4), oklch(0.709 0.1592 293.54));
54
+ --pack-c3: light-dark(oklch(0.5188 0.1146 159.19), oklch(0.7729 0.1535 163.22));
55
+ --pack-c4: light-dark(oklch(0.5561 0.2005 353.63), oklch(0.7253 0.1752 349.76));
56
+ --pack-focus: light-dark(oklch(0.5225 0.2549 280.33), oklch(0.8651 0.1153 207.08));
57
+ --pack-link: light-dark(oklch(0.4754 0.2328 281.48), oklch(0.8764 0.1019 209.64));
58
+ --pack-btn1: light-dark(oklch(0.5225 0.2549 280.33), oklch(0.7971 0.1339 211.53));
59
+ --pack-btn2: light-dark(oklch(0.5106 0.2301 276.97), oklch(0.709 0.1592 293.54));
60
+ --pack-btn3: light-dark(oklch(0.5198 0.0936 223.13), oklch(0.7729 0.1535 163.22));
61
+ --pack-btnink: light-dark(oklch(1 0 0), oklch(0.1334 0.0183 283.64));
62
+ --pack-a1: light-dark(oklch(0.8276 0.1013 230.32 / 0.549), oklch(0.7971 0.1339 211.53 / 0.298));
63
+ --pack-a2: light-dark(oklch(0.8112 0.1013 293.57 / 0.6), oklch(0.6056 0.2189 292.72 / 0.341));
64
+ --pack-a3: light-dark(oklch(0.9049 0.0895 164.15 / 0.502), oklch(0.7729 0.1535 163.22 / 0.22));
65
+ --pack-tok-t: light-dark(oklch(0.4882 0.0851 218.24), oklch(0.8764 0.1019 209.64));
66
+ --pack-tok-s: light-dark(oklch(0.5125 0.1148 158.3), oklch(0.8712 0.1363 154.45));
67
+ --pack-tok-c: light-dark(oklch(0.5362 0.052 277.79), oklch(0.6696 0.0478 276.7));
68
+ --pack-tok-k: light-dark(oklch(0.5225 0.2549 280.33), oklch(0.8112 0.1013 293.57));
69
+ --pack-wm1: light-dark(oklch(0.5516 0.0972 218.48), oklch(0.8651 0.1153 207.08));
70
+ --pack-wm2: light-dark(oklch(0.5225 0.2549 280.33), oklch(0.8112 0.1013 293.57));
71
+ --pack-wm3: light-dark(oklch(0.559 0.1284 157.89), oklch(0.8452 0.1299 164.98));
72
+ /* Ombres : la couleur de chaque couche suit le thème. */
73
+ --shadow-sm: 0px 1px 2px 0px light-dark(oklch(0 0 0 / 0.059), oklch(0 0 0 / 0.22));
74
+ --shadow-overlay: 0px 0px 0px 1px light-dark(oklch(0 0 0 / 0.039), oklch(0 0 0 / 0.4)), 0px 8px 28px 0px light-dark(oklch(0 0 0 / 0.122), oklch(0 0 0 / 0.451)), 0px 2px 6px 0px light-dark(oklch(0 0 0 / 0.059), oklch(0 0 0 / 0.251));
75
+ --shadow-window: 0px 30px 70px -40px light-dark(oklch(0 0 0 / 0.6), oklch(0 0 0 / 0.6));
76
+ --shadow-glow: 0px 30px 80px -40px light-dark(oklch(0.6929 0.2018 306.83), oklch(0.6929 0.2018 306.83));
77
+ --pack-shadow: 0px 24px 60px -24px light-dark(oklch(0.436 0.1547 287.36 / 0.349), oklch(0 0 0 / 0.8));
78
+ /* Couleurs de marque, identiques dans les deux thèmes (logo, dégradé). */
79
+ --bythium-brand-cyan: oklch(0.8216 0.1277 212.37);
80
+ --bythium-brand-violet: oklch(0.6929 0.2018 306.83);
81
+ --bythium-brand-milieu: oklch(0.7104 0.1558 288.52);
82
+ --bythium-brand-sphere: oklch(0.7413 0.1239 259.16);
83
+ --bythium-brand-blanc-casse: oklch(0.9604 0.0107 286.2);
84
+ --bythium-brand-marine: oklch(0.2253 0.05 262.93);
85
+ --bythium-brand-blanc: oklch(1 0 0);
86
+ --bythium-brand-noir: oklch(0 0 0);
87
+ --bythium-brand-gradient: linear-gradient(135deg in oklch, oklch(0.8216 0.1277 212.37) 0%, oklch(0.7104 0.1558 288.52) 50%, oklch(0.6929 0.2018 306.83) 100%);
88
+ /* Typographie (base Orchestre : 13 px, légende 12 px, titre 22 px ; en rem pour le zoom du texte, WC-R08). */
89
+ --font-sans: Inter, ui-sans-serif, system-ui, sans-serif;
90
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
91
+ --font-features: "cv01", "ss03";
92
+ --font-size-base: 0.8125rem;
93
+ --font-size-caption: 0.75rem;
94
+ --font-size-title: 1.375rem;
95
+ --font-weight-medium: 500;
96
+ --font-weight-semibold: 600;
97
+ --line-height-base: 1.4;
98
+ /* Espacement : échelle de 4 px (--space-2 = 8 px). */
99
+ --space-0: 0;
100
+ --space-0-5: 0.125rem;
101
+ --space-1: 0.25rem;
102
+ --space-1-5: 0.375rem;
103
+ --space-2: 0.5rem;
104
+ --space-2-5: 0.625rem;
105
+ --space-3: 0.75rem;
106
+ --space-4: 1rem;
107
+ --space-5: 1.25rem;
108
+ --space-6: 1.5rem;
109
+ --space-8: 2rem;
110
+ --space-10: 2.5rem;
111
+ --space-12: 3rem;
112
+ /* Site du pack : un seul conteneur pour toutes les pages, largeur maximale et gouttière (min(--pack-max, 100 % - 2 gouttières)), et la mesure des paragraphes d’introduction (56ch, environ 70 caractères par ligne en Inter). */
113
+ --pack-max: 1200px;
114
+ --pack-gutter: 16px;
115
+ --pack-measure: 56ch;
116
+ /* Rayons. */
117
+ --radius-sm: 4px;
118
+ --radius-control: 6px;
119
+ --radius-card: 8px;
120
+ --radius-lg: 12px;
121
+ --radius-full: 999px;
122
+ /* Contrôles : hauteur visuelle Orchestre 30 px ; la cible tactile reste 44 px (WC-D03). */
123
+ --control-height: 30px;
124
+ --target-touch-min: 44px;
125
+ --target-min: 24px;
126
+ --focus-ring-width: 2px;
127
+ --focus-ring-offset: 2px;
128
+ /* Mouvement (WC-N11 : 300 ms au plus). */
129
+ --duration-fast: 120ms;
130
+ --duration-base: 200ms;
131
+ --duration-slow: 300ms;
132
+ --ease-standard: cubic-bezier(0.25, 0.46, 0.45, 0.94);
133
+ --ease-kinetic: cubic-bezier(0.2, 0, 0, 1);
134
+ /* Deceleration: a fast start that settles (the glide of the pack hero cards, a progress bar, a screen that settles in). */
135
+ --ease-decelerate: cubic-bezier(0.22, 1, 0.36, 1);
136
+ /* Empilement (WC-N05 : échelle de 1 à 50). */
137
+ --z-base: 1;
138
+ --z-raised: 10;
139
+ --z-sticky: 20;
140
+ --z-dropdown: 30;
141
+ --z-overlay: 40;
142
+ --z-toast: 45;
143
+ --z-skip: 50;
144
+ /* Thème résolu, en mot, pour une requête de style : @container style(--bythium-scheme: light). */
145
+ --bythium-scheme: light;
146
+ }
147
+ @media (prefers-color-scheme: dark) {
148
+ :root {
149
+ --bythium-scheme: dark;
150
+ }
151
+ }
152
+ :root[data-theme="dark"],
153
+ [data-theme="dark"] {
154
+ color-scheme: dark;
155
+ --bythium-scheme: dark;
156
+ }
157
+ :root[data-theme="light"],
158
+ [data-theme="light"] {
159
+ color-scheme: light;
160
+ --bythium-scheme: light;
161
+ }
162
+ /* La seule règle universelle du paquet (section 5.4). */
163
+ *,
164
+ *::before,
165
+ *::after {
166
+ box-sizing: border-box;
167
+ }
168
+ body {
169
+ margin: 0;
170
+ padding: var(--space-4);
171
+ background: var(--bythium-surface-page);
172
+ color: var(--bythium-text-primary);
173
+ font-family: var(--font-sans);
174
+ font-size: var(--font-size-base);
175
+ line-height: var(--line-height-base);
176
+ }
177
+ bythium-surface {
178
+ display: block;
179
+ min-inline-size: 0;
180
+ }
181
+ /* Page transitions (cross-document View Transitions), on screen and only when the reader accepts motion. The
182
+ names are set from the document: a name set inside a shadow root does not take part. The pack header and the
183
+ page title keep their place from one page to the next; a name is unique in a page. */
184
+ @media screen and (prefers-reduced-motion: no-preference) {
185
+ @view-transition {
186
+ navigation: auto;
187
+ }
188
+ bythium-pack-header::part(root) {
189
+ view-transition-name: site-header;
190
+ }
191
+ bythium-pack-hero::part(title),
192
+ bythium-pack-doc-head::part(heading),
193
+ bythium-pack-intro::part(heading) {
194
+ view-transition-name: page-title;
195
+ }
196
+ ::view-transition-group(*) {
197
+ animation-duration: var(--duration-slow);
198
+ animation-timing-function: var(--ease-standard);
199
+ }
200
+ }
@@ -0,0 +1,10 @@
1
+ // Generated from the contracts of the available tags of the pack. Do not edit.
2
+ export interface WrapperSpec {
3
+ readonly tag: string;
4
+ /** Prop name to [attribute name, attribute type]. */
5
+ readonly attributes: Readonly<Record<string, readonly [string, 'string' | 'boolean' | 'number']>>;
6
+ /** Listener prop to DOM event name. */
7
+ readonly events: Readonly<Record<string, string>>;
8
+ }
9
+ export declare function attributeValue(type: 'string' | 'boolean' | 'number', value: unknown): string | number | true | null | undefined;
10
+ export declare function elementAttributes(spec: WrapperSpec, props: Readonly<Record<string, unknown>>): Record<string, unknown>;
@@ -0,0 +1,25 @@
1
+ // Generated from the contracts of the available tags of the pack. Do not edit.
2
+ /** One prop value as its attribute value: undefined leaves the attribute out. */
3
+ export function attributeValue(type, value) {
4
+ if (value === undefined || value === null) return undefined;
5
+ if (type === 'boolean') return value === false ? null : true;
6
+ if (type === 'number') return Number(value);
7
+ return String(value);
8
+ }
9
+
10
+ /** The props of a wrapper as the attributes and listeners of its tag. */
11
+ export function elementAttributes(spec, props) {
12
+ const out = {};
13
+ for (const key of Object.keys(props)) {
14
+ const value = props[key];
15
+ const attribute = Object.hasOwn(spec.attributes, key) ? spec.attributes[key] : undefined;
16
+ const event = Object.hasOwn(spec.events, key) ? spec.events[key] : undefined;
17
+ if (attribute) {
18
+ const written = attributeValue(attribute[1], value);
19
+ if (written !== undefined) out[attribute[0]] = written;
20
+ } else if (event) {
21
+ if (typeof value === 'function') out[`on${event}`] = value;
22
+ } else out[key] = value;
23
+ }
24
+ return out;
25
+ }
@@ -0,0 +1,59 @@
1
+ // Generated from the contracts of the available tags of the pack. Do not edit.
2
+ import type { DefineSetupFnComponent, SlotsType, VNode } from 'vue';
3
+ import type { BythiumIdentityOrgMembers, BythiumIdentityOrgMembersEventMap } from '../identity-org-members.js';
4
+
5
+ export interface OIdentityOrgMembersProps {
6
+ /** Identifiant de l’organisation (paramètre de chemin de chaque appel). Il part dans le champ `id` des événements. Attribute `organization-id`. */
7
+ organizationId?: string;
8
+ /** Nom affiché de l’organisation, cité dans la note de portée : les rôles sont ceux de l’organisation, pas les rôles globaux. Attribute `organization-name`. */
9
+ organizationName?: string;
10
+ /** Membres de la page courante, tableau JSON { user_id (requis), name, email, roles : [{ id, name }] }. Seuls ces champs sont lus : une adresse d’image, un jeton ou une métadonnée présents dans les données ne sont jamais affichés. Attribute `members`. */
11
+ members?: string;
12
+ /** Rôles que l’organisation peut attribuer, tableau JSON { id, name }. Vide : les boutons de rôles sont bloqués. Attribute `roles`. */
13
+ roles?: string;
14
+ /** Périmètre de délégation : tableau JSON d’identifiants de rôles que la personne peut attribuer ou retirer. Un rôle hors périmètre est grisé et n’est jamais envoyé. Vide : tous les rôles de `roles`. Attribute `assignable-roles`. */
15
+ assignableRoles?: string;
16
+ /** Identifiants JSON des rôles d’administration de l’organisation. Retirer le dernier membre qui en détient un demande une confirmation explicite. Attribute `protected-roles`. */
17
+ protectedRoles?: string;
18
+ /** Page courante, à partir de 0. Attribute `page`. */
19
+ page?: number;
20
+ /** Taille de page demandée à l’API. Attribute `per-page`. */
21
+ perPage?: number;
22
+ /** Nombre total de membres (include_totals). Au-delà de la page, la pagination s’affiche et la liste est tenue pour partielle. Attribute `total`. */
23
+ total?: number;
24
+ /** Identifiant du membre dont un changement est en cours dans la page, ou « add » pour un ajout : les boutons sont bloqués et l’attente annoncée. Vide : rien en cours. Attribute `pending`. */
25
+ pending?: string;
26
+ /** État des données : ready (affiché), loading (chargement), error (erreur de lecture, avec Réessayer), forbidden (403, droit manquant), throttled (429, trop de requêtes, avec Réessayer à la demande de la personne : rien n’est renvoyé seul). Attribute `state`. */
27
+ state?: 'ready' | 'loading' | 'error' | 'forbidden' | 'throttled';
28
+ /** Secondes à attendre indiquées par la réponse 429 (en-tête Retry-After) ; 0 : inconnu. Affiché seulement dans l’état throttled. Attribute `retry-after`. */
29
+ retryAfter?: number;
30
+ /** Erreurs par champ de la page, objet JSON { champ : message }. Le champ « form » porte l’erreur du formulaire entier. Vide ou JSON invalide : aucune. Attribute `errors`. */
31
+ errors?: string;
32
+ /** Titre. Vide : « Membres de l’organisation » (ou « Organization members » selon locale). Attribute `heading`. */
33
+ heading?: string;
34
+ /** Niveau du titre dans le plan de la page (WC-N03). Attribute `heading-level`. */
35
+ headingLevel?: number;
36
+ /** Langue des textes intégrés (BCP 47) : toute balise en vaut en, le reste vaut fr. Attribute `locale`. */
37
+ locale?: string;
38
+ }
39
+
40
+ export type OIdentityOrgMembersEmits = {
41
+ /** Émis à la confirmation de l’ajout d’identités existantes (A021, POST /organizations/{id}/members). Les identités deviennent membres sans rôle. */
42
+ 'bythium-identity-org-members-add': (event: BythiumIdentityOrgMembersEventMap['bythium-identity-org-members-add']) => void;
43
+ /** Émis à la confirmation du retrait d’une adhésion (A022, DELETE /organizations/{id}/members). Le compte n’est ni bloqué ni supprimé. */
44
+ 'bythium-identity-org-members-remove': (event: BythiumIdentityOrgMembersEventMap['bythium-identity-org-members-remove']) => void;
45
+ /** Émis en premier à l’application des rôles (A023, POST /organizations/{id}/members/{user_id}/roles) : seulement les rôles ajoutés, jamais un rôle hors du périmètre de délégation. */
46
+ 'bythium-identity-org-members-roles-assign': (event: BythiumIdentityOrgMembersEventMap['bythium-identity-org-members-roles-assign']) => void;
47
+ /** Émis ensuite, si des rôles sont retirés (A024, DELETE /organizations/{id}/members/{user_id}/roles). Les deux appels ne sont pas atomiques : la page journalise chaque étape et peut reprendre. */
48
+ 'bythium-identity-org-members-roles-remove': (event: BythiumIdentityOrgMembersEventMap['bythium-identity-org-members-roles-remove']) => void;
49
+ /** Émis au clic sur Page précédente ou Page suivante : la page relit les membres avec ces paramètres de requête. */
50
+ 'bythium-identity-org-members-page': (event: BythiumIdentityOrgMembersEventMap['bythium-identity-org-members-page']) => void;
51
+ /** Émis au clic sur Réessayer (états error et throttled) : la page relit, jamais la balise. */
52
+ 'bythium-identity-org-members-retry': (event: BythiumIdentityOrgMembersEventMap['bythium-identity-org-members-retry']) => void;
53
+ };
54
+
55
+ /** Membres d’une organisation : rôles de l’organisation, retrait de l’adhésion, ajout d’identités existantes, garde du dernier administrateur. Renders `<bythium-identity-org-members>`. */
56
+ export declare const OIdentityOrgMembers: DefineSetupFnComponent<OIdentityOrgMembersProps, OIdentityOrgMembersEmits, SlotsType<{ "default"?: () => VNode[] }>>;
57
+
58
+ /** The element the wrapper renders. */
59
+ export type OIdentityOrgMembersElement = BythiumIdentityOrgMembers;
@@ -0,0 +1,6 @@
1
+ // Generated from the contracts of the available tags of the pack. Do not edit.
2
+ import { wrapper } from './runtime.js';
3
+
4
+ if (typeof customElements !== 'undefined') import('../identity-org-members.js');
5
+
6
+ export const OIdentityOrgMembers = wrapper('OIdentityOrgMembers', {"tag":"bythium-identity-org-members","attributes":{"organizationId":["organization-id","string"],"organizationName":["organization-name","string"],"members":["members","string"],"roles":["roles","string"],"assignableRoles":["assignable-roles","string"],"protectedRoles":["protected-roles","string"],"page":["page","number"],"perPage":["per-page","number"],"total":["total","number"],"pending":["pending","string"],"state":["state","string"],"retryAfter":["retry-after","number"],"errors":["errors","string"],"heading":["heading","string"],"headingLevel":["heading-level","number"],"locale":["locale","string"]},"events":{}}, ["bythium-identity-org-members-add","bythium-identity-org-members-remove","bythium-identity-org-members-roles-assign","bythium-identity-org-members-roles-remove","bythium-identity-org-members-page","bythium-identity-org-members-retry"], []);
@@ -0,0 +1,2 @@
1
+ // Generated from the contracts of the available tags of the pack. Do not edit.
2
+ export { OIdentityOrgMembers, type OIdentityOrgMembersProps, type OIdentityOrgMembersEmits, type OIdentityOrgMembersElement } from './identity-org-members.js';
@@ -0,0 +1,2 @@
1
+ // Generated from the contracts of the available tags of the pack. Do not edit.
2
+ export { OIdentityOrgMembers } from './identity-org-members.js';
@@ -0,0 +1,31 @@
1
+ // Generated from the contracts of the available tags of the pack. Do not edit.
2
+ import { Comment, Fragment, Text, cloneVNode, defineComponent, h } from 'vue';
3
+ import { elementAttributes } from './attributes.js';
4
+
5
+ const TYPES = { string: String, boolean: Boolean, number: Number };
6
+
7
+ /** The vnodes of a named slot, each carrying the slot name: text becomes a span, fragments are opened. */
8
+ function named(nodes, slot) {
9
+ return nodes.flatMap((node) => {
10
+ if (node.type === Comment) return [];
11
+ if (node.type === Fragment) return named(Array.isArray(node.children) ? node.children : [], slot);
12
+ if (node.type === Text) return [h('span', { slot }, node.children)];
13
+ return [cloneVNode(node, { slot })];
14
+ });
15
+ }
16
+
17
+ /** A component that renders the spec's tag, re-emits its `emits` DOM events; `slots` lists the named slots. */
18
+ export function wrapper(name, spec, emits, slots) {
19
+ return defineComponent({
20
+ name,
21
+ props: Object.fromEntries(Object.entries(spec.attributes).map(([prop, [, type]]) => [prop, { type: TYPES[type], default: undefined }])),
22
+ emits,
23
+ setup(props, { emit, slots: given }) {
24
+ return () => {
25
+ const listeners = Object.fromEntries(emits.map((event) => [`on${event[0].toUpperCase()}${event.slice(1)}`, (domEvent) => emit(event, domEvent)]));
26
+ const children = [...(given.default?.() ?? []), ...slots.flatMap((slot) => named(given[slot]?.() ?? [], slot))];
27
+ return h(spec.tag, { ...elementAttributes(spec, props), ...listeners }, children);
28
+ };
29
+ },
30
+ });
31
+ }
package/package.json CHANGED
@@ -1,6 +1,104 @@
1
1
  {
2
2
  "name": "@bythium/unisson-identity",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Unisson Identity: the components of a B2B identity console, organizations, members, roles and single sign-on, as native custom elements with typed Vue 3, React 19 and Svelte 5 wrappers.",
5
+ "keywords": [
6
+ "web-components",
7
+ "custom-elements",
8
+ "design-system",
9
+ "identity",
10
+ "b2b",
11
+ "organization",
12
+ "roles",
13
+ "sso",
14
+ "vue",
15
+ "react",
16
+ "svelte",
17
+ "unisson"
18
+ ],
19
+ "homepage": "https://unisson.bythium.ai/packs/",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/somepeople/bythium-ui-studio.git"
23
+ },
24
+ "license": "Apache-2.0",
25
+ "type": "module",
26
+ "main": "./dist/index.js",
27
+ "module": "./dist/index.js",
28
+ "types": "./dist/index.d.ts",
29
+ "customElements": "./dist/custom-elements.json",
30
+ "sideEffects": [
31
+ "./dist/*.js",
32
+ "./dist/chunks/*.js",
33
+ "*.css"
34
+ ],
35
+ "files": [
36
+ "dist",
37
+ "README.md",
38
+ "LICENSE",
39
+ "NOTICE"
40
+ ],
41
+ "peerDependencies": {
42
+ "@bythium/unisson": ">=0.4.0 <1.0.0",
43
+ "react": "^19.0.0",
44
+ "svelte": "^5.0.0",
45
+ "vue": "^3.4.0"
46
+ },
47
+ "peerDependenciesMeta": {
48
+ "react": {
49
+ "optional": true
50
+ },
51
+ "svelte": {
52
+ "optional": true
53
+ },
54
+ "vue": {
55
+ "optional": true
56
+ }
57
+ },
58
+ "publishConfig": {
59
+ "access": "public"
60
+ },
61
+ "exports": {
62
+ ".": {
63
+ "types": "./dist/index.d.ts",
64
+ "default": "./dist/index.js"
65
+ },
66
+ "./define": {
67
+ "types": "./dist/define.d.ts",
68
+ "default": "./dist/define.js"
69
+ },
70
+ "./identity-org-members": {
71
+ "types": "./dist/identity-org-members.d.ts",
72
+ "default": "./dist/identity-org-members.js"
73
+ },
74
+ "./vue/identity-org-members": {
75
+ "types": "./dist/vue/identity-org-members.d.ts",
76
+ "default": "./dist/vue/identity-org-members.js"
77
+ },
78
+ "./react/identity-org-members": {
79
+ "types": "./dist/react/identity-org-members.d.ts",
80
+ "default": "./dist/react/identity-org-members.js"
81
+ },
82
+ "./svelte/identity-org-members": {
83
+ "types": "./dist/svelte/OIdentityOrgMembers.svelte.d.ts",
84
+ "svelte": "./dist/svelte/OIdentityOrgMembers.svelte",
85
+ "default": "./dist/svelte/OIdentityOrgMembers.svelte"
86
+ },
87
+ "./tokens.css": "./dist/tokens.css",
88
+ "./custom-elements.json": "./dist/custom-elements.json",
89
+ "./vue": {
90
+ "types": "./dist/vue/index.d.ts",
91
+ "default": "./dist/vue/index.js"
92
+ },
93
+ "./react": {
94
+ "types": "./dist/react/index.d.ts",
95
+ "default": "./dist/react/index.js"
96
+ },
97
+ "./svelte": {
98
+ "types": "./dist/svelte/index.d.ts",
99
+ "svelte": "./dist/svelte/index.js",
100
+ "default": "./dist/svelte/index.js"
101
+ },
102
+ "./package.json": "./package.json"
103
+ }
104
+ }