@egen-civitas/esm-styleguide 1.3.0 → 1.4.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/CHANGELOG.md +6 -0
- package/dist/assistant/assistant-modes.d.ts +29 -0
- package/dist/assistant/assistant-modes.d.ts.map +1 -0
- package/dist/assistant/assistant-modes.js +143 -0
- package/dist/assistant/index.d.ts +9 -0
- package/dist/assistant/index.d.ts.map +1 -0
- package/dist/assistant/index.js +7 -0
- package/dist/assistant/live-orb.component.d.ts +63 -0
- package/dist/assistant/live-orb.component.d.ts.map +1 -0
- package/dist/assistant/live-orb.component.js +485 -0
- package/dist/assistant/prompt-input.component.d.ts +19 -0
- package/dist/assistant/prompt-input.component.d.ts.map +1 -0
- package/dist/assistant/prompt-input.component.js +1021 -0
- package/dist/assistant/recursive-erosion/recursive-erosion-background.component.d.ts +19 -0
- package/dist/assistant/recursive-erosion/recursive-erosion-background.component.d.ts.map +1 -0
- package/dist/assistant/recursive-erosion/recursive-erosion-background.component.js +127 -0
- package/dist/assistant/recursive-erosion/recursive-erosion-source.d.ts +2 -0
- package/dist/assistant/recursive-erosion/recursive-erosion-source.d.ts.map +1 -0
- package/dist/assistant/recursive-erosion/recursive-erosion-source.js +340 -0
- package/dist/assistant/spline-scene.component.d.ts +9 -0
- package/dist/assistant/spline-scene.component.d.ts.map +1 -0
- package/dist/assistant/spline-scene.component.js +51 -0
- package/dist/assistant/water-glass-modal.component.d.ts +26 -0
- package/dist/assistant/water-glass-modal.component.d.ts.map +1 -0
- package/dist/assistant/water-glass-modal.component.js +46 -0
- package/dist/assistant/xbox-audio.d.ts +88 -0
- package/dist/assistant/xbox-audio.d.ts.map +1 -0
- package/dist/assistant/xbox-audio.js +756 -0
- package/dist/internal.d.ts +1 -0
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +1 -0
- package/dist/public.d.ts +1 -0
- package/dist/public.d.ts.map +1 -1
- package/dist/public.js +1 -0
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @egen-civitas/esm-styleguide
|
|
2
2
|
|
|
3
|
+
## 1.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8c4b678: Ajoute le module `assistant/` (Tailwind) migré à l'identique de Civitas---GED : `LiveOrb` (avatar WebGL), `SplineScene`, `PromptInput` multimodal, `RecursiveErosionBackground` (sphère de particules + shaders), `WaterGlassModal`, moteur sonore `xbox-audio` et la configuration des 4 modes IA (`ASSISTANT_MODES`).
|
|
8
|
+
|
|
3
9
|
## 1.3.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type AssistantMode = 'conversation' | 'recherche' | 'action' | 'autonome';
|
|
2
|
+
export interface AssistantModeConfig {
|
|
3
|
+
id: AssistantMode;
|
|
4
|
+
number: string;
|
|
5
|
+
name: string;
|
|
6
|
+
shortName: string;
|
|
7
|
+
tagline: string;
|
|
8
|
+
badgeLabel: string;
|
|
9
|
+
emoji: string;
|
|
10
|
+
iconName: 'MessageSquare' | 'Search' | 'Zap' | 'Cpu';
|
|
11
|
+
color: {
|
|
12
|
+
text: string;
|
|
13
|
+
bg: string;
|
|
14
|
+
border: string;
|
|
15
|
+
ring: string;
|
|
16
|
+
badgeBg: string;
|
|
17
|
+
badgeText: string;
|
|
18
|
+
glow: string;
|
|
19
|
+
accent: string;
|
|
20
|
+
};
|
|
21
|
+
principle: string;
|
|
22
|
+
bullets: string[];
|
|
23
|
+
example: string;
|
|
24
|
+
schema?: string[];
|
|
25
|
+
}
|
|
26
|
+
export declare const ASSISTANT_MODES: Record<AssistantMode, AssistantModeConfig>;
|
|
27
|
+
export declare function getSavedAssistantMode(): AssistantMode;
|
|
28
|
+
export declare function saveAssistantMode(mode: AssistantMode): void;
|
|
29
|
+
//# sourceMappingURL=assistant-modes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant-modes.d.ts","sourceRoot":"","sources":["../../src/assistant/assistant-modes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEjF,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,aAAa,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,eAAe,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,CAAC;IACrD,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;QACX,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,aAAa,EAAE,mBAAmB,CA2HtE,CAAC;AAIF,wBAAgB,qBAAqB,IAAI,aAAa,CASrD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,CAO3D"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
export const ASSISTANT_MODES = {
|
|
2
|
+
conversation: {
|
|
3
|
+
id: 'conversation',
|
|
4
|
+
number: '1',
|
|
5
|
+
name: 'Mode Conversation',
|
|
6
|
+
shortName: 'Conversation',
|
|
7
|
+
tagline: 'Comprendre & Répondre',
|
|
8
|
+
badgeLabel: 'Conv',
|
|
9
|
+
emoji: '💬',
|
|
10
|
+
iconName: 'MessageSquare',
|
|
11
|
+
color: {
|
|
12
|
+
text: 'text-sky-400',
|
|
13
|
+
bg: 'bg-sky-500/10',
|
|
14
|
+
border: 'border-sky-500/30',
|
|
15
|
+
ring: 'ring-sky-500/40',
|
|
16
|
+
badgeBg: 'bg-sky-500',
|
|
17
|
+
badgeText: 'text-slate-950',
|
|
18
|
+
glow: 'shadow-sky-500/25',
|
|
19
|
+
accent: '#38bdf8'
|
|
20
|
+
},
|
|
21
|
+
principle: "L'agent comprend et répond.",
|
|
22
|
+
bullets: [
|
|
23
|
+
'Questions & réponses',
|
|
24
|
+
'Explications & clarifications',
|
|
25
|
+
'Discussion en langage naturel',
|
|
26
|
+
'Conseil informationnel'
|
|
27
|
+
],
|
|
28
|
+
example: '« Qu\'est-ce que cette fonctionnalité ? »'
|
|
29
|
+
},
|
|
30
|
+
recherche: {
|
|
31
|
+
id: 'recherche',
|
|
32
|
+
number: '2',
|
|
33
|
+
name: 'Mode Recherche / Analyse',
|
|
34
|
+
shortName: 'Recherche',
|
|
35
|
+
tagline: 'Chercher, Récupérer & Interpréter',
|
|
36
|
+
badgeLabel: 'Rech',
|
|
37
|
+
emoji: '🔎',
|
|
38
|
+
iconName: 'Search',
|
|
39
|
+
color: {
|
|
40
|
+
text: 'text-amber-400',
|
|
41
|
+
bg: 'bg-amber-500/10',
|
|
42
|
+
border: 'border-amber-500/30',
|
|
43
|
+
ring: 'ring-amber-500/40',
|
|
44
|
+
badgeBg: 'bg-amber-400',
|
|
45
|
+
badgeText: 'text-slate-950',
|
|
46
|
+
glow: 'shadow-amber-500/25',
|
|
47
|
+
accent: '#fbbf24'
|
|
48
|
+
},
|
|
49
|
+
principle: "L'agent cherche, récupère et interprète de l'information.",
|
|
50
|
+
bullets: [
|
|
51
|
+
'Recherche dans la base de connaissances',
|
|
52
|
+
'Consultation & extraction documentaire',
|
|
53
|
+
'Analyse et croisement de données',
|
|
54
|
+
'Comparaison & synthèse structurée'
|
|
55
|
+
],
|
|
56
|
+
example: '« Trouve les documents concernant ce projet et résume-les. »'
|
|
57
|
+
},
|
|
58
|
+
action: {
|
|
59
|
+
id: 'action',
|
|
60
|
+
number: '3',
|
|
61
|
+
name: 'Mode Action',
|
|
62
|
+
shortName: 'Action',
|
|
63
|
+
tagline: 'Agir sur le Système via Outils',
|
|
64
|
+
badgeLabel: 'Act',
|
|
65
|
+
emoji: '⚙️',
|
|
66
|
+
iconName: 'Zap',
|
|
67
|
+
color: {
|
|
68
|
+
text: 'text-emerald-400',
|
|
69
|
+
bg: 'bg-emerald-500/10',
|
|
70
|
+
border: 'border-emerald-500/30',
|
|
71
|
+
ring: 'ring-emerald-500/40',
|
|
72
|
+
badgeBg: 'bg-emerald-400',
|
|
73
|
+
badgeText: 'text-slate-950',
|
|
74
|
+
glow: 'shadow-emerald-500/25',
|
|
75
|
+
accent: '#34d399'
|
|
76
|
+
},
|
|
77
|
+
principle: "L'agent agit sur le système à travers des outils (différence clé avec un simple chatbot).",
|
|
78
|
+
bullets: [
|
|
79
|
+
'Créer, modifier, supprimer des contenus',
|
|
80
|
+
'Publier & programmer des diffusions',
|
|
81
|
+
'Appeler des API & intégrations',
|
|
82
|
+
'Déclencher des workflows & automatisations'
|
|
83
|
+
],
|
|
84
|
+
example: '« Crée cette actualité et programme sa publication demain. »'
|
|
85
|
+
},
|
|
86
|
+
autonome: {
|
|
87
|
+
id: 'autonome',
|
|
88
|
+
number: '4',
|
|
89
|
+
name: 'Mode Autonome',
|
|
90
|
+
shortName: 'Autonome',
|
|
91
|
+
tagline: 'Orchestration Multi-étapes vers un Objectif',
|
|
92
|
+
badgeLabel: 'Auto',
|
|
93
|
+
emoji: '🤖',
|
|
94
|
+
iconName: 'Cpu',
|
|
95
|
+
color: {
|
|
96
|
+
text: 'text-purple-400',
|
|
97
|
+
bg: 'bg-purple-500/10',
|
|
98
|
+
border: 'border-purple-500/30',
|
|
99
|
+
ring: 'ring-purple-500/40',
|
|
100
|
+
badgeBg: 'bg-purple-400',
|
|
101
|
+
badgeText: 'text-slate-950',
|
|
102
|
+
glow: 'shadow-purple-500/25',
|
|
103
|
+
accent: '#c084fc'
|
|
104
|
+
},
|
|
105
|
+
principle: "L'agent reçoit un objectif et détermine lui-même les étapes nécessaires sans guidage pas-à-pas.",
|
|
106
|
+
bullets: [
|
|
107
|
+
'Planification intelligente de l’objectif',
|
|
108
|
+
'Recherche & analyse autonome',
|
|
109
|
+
'Création & exécution des actions requises',
|
|
110
|
+
'Vérification & production du résultat final'
|
|
111
|
+
],
|
|
112
|
+
example: '« Prépare toute la communication de notre événement. »',
|
|
113
|
+
schema: [
|
|
114
|
+
'Objectif',
|
|
115
|
+
'Planification',
|
|
116
|
+
'Recherche',
|
|
117
|
+
'Analyse',
|
|
118
|
+
'Création',
|
|
119
|
+
'Actions',
|
|
120
|
+
'Vérification',
|
|
121
|
+
'Résultat'
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
const STORAGE_KEY = 'egen_assistant_mode';
|
|
126
|
+
export function getSavedAssistantMode() {
|
|
127
|
+
if (typeof window === 'undefined') return 'conversation';
|
|
128
|
+
try {
|
|
129
|
+
const saved = localStorage.getItem(STORAGE_KEY);
|
|
130
|
+
if (saved && ASSISTANT_MODES[saved]) return saved;
|
|
131
|
+
} catch {
|
|
132
|
+
// fallback
|
|
133
|
+
}
|
|
134
|
+
return 'conversation';
|
|
135
|
+
}
|
|
136
|
+
export function saveAssistantMode(mode) {
|
|
137
|
+
if (typeof window === 'undefined') return;
|
|
138
|
+
try {
|
|
139
|
+
localStorage.setItem(STORAGE_KEY, mode);
|
|
140
|
+
} catch {
|
|
141
|
+
// fallback
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './assistant-modes.js';
|
|
2
|
+
export { LiveOrb, createLiveOrb } from './live-orb.component.js';
|
|
3
|
+
export type { LiveOrbProps, LiveOrbOptions, LiveOrbInstance, LiveOrbVariant } from './live-orb.component.js';
|
|
4
|
+
export * from './prompt-input.component.js';
|
|
5
|
+
export * from './spline-scene.component.js';
|
|
6
|
+
export * from './recursive-erosion/recursive-erosion-background.component.js';
|
|
7
|
+
export * from './water-glass-modal.component.js';
|
|
8
|
+
export * from './xbox-audio.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/assistant/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACjE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC7G,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+DAA+D,CAAC;AAC9E,cAAc,kCAAkC,CAAC;AACjD,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./assistant-modes.js";
|
|
2
|
+
export { LiveOrb, createLiveOrb } from "./live-orb.component.js";
|
|
3
|
+
export * from "./prompt-input.component.js";
|
|
4
|
+
export * from "./spline-scene.component.js";
|
|
5
|
+
export * from "./recursive-erosion/recursive-erosion-background.component.js";
|
|
6
|
+
export * from "./water-glass-modal.component.js";
|
|
7
|
+
export * from "./xbox-audio.js";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type LiveOrbVariant = "white" | "black" | "webgl" | "custom";
|
|
3
|
+
export type LiveOrbOptions = {
|
|
4
|
+
/** Material preset. Default `"white"`. */
|
|
5
|
+
variant?: LiveOrbVariant;
|
|
6
|
+
/** Body hex — used when `variant="custom"`. */
|
|
7
|
+
color?: string;
|
|
8
|
+
/** Eye hex — used when `variant="custom"`. */
|
|
9
|
+
eyeColor?: string;
|
|
10
|
+
/** Unlit wash stops — used when `variant="webgl"`. */
|
|
11
|
+
colors?: string[];
|
|
12
|
+
/** Eyes follow the pointer. Default `true`. */
|
|
13
|
+
interactive?: boolean;
|
|
14
|
+
/** Occasional blink. Default `true`. */
|
|
15
|
+
blink?: boolean;
|
|
16
|
+
/** Fires when WebGL is ready (`true`) or torn down (`false`). */
|
|
17
|
+
onHasGl?: (ok: boolean) => void;
|
|
18
|
+
};
|
|
19
|
+
export type LiveOrbInstance = {
|
|
20
|
+
setOptions: (options: Partial<LiveOrbOptions>) => void;
|
|
21
|
+
destroy: () => void;
|
|
22
|
+
};
|
|
23
|
+
export declare const WHITE: {
|
|
24
|
+
readonly color: "#F4F4F5";
|
|
25
|
+
readonly eyeColor: "#09090B";
|
|
26
|
+
};
|
|
27
|
+
export declare const BLACK: {
|
|
28
|
+
readonly color: "#18181B";
|
|
29
|
+
readonly eyeColor: "#F4F4F5";
|
|
30
|
+
};
|
|
31
|
+
export declare const CUSTOM_DEFAULT: {
|
|
32
|
+
readonly color: "#7C5CFF";
|
|
33
|
+
readonly eyeColor: "#FAFAFA";
|
|
34
|
+
};
|
|
35
|
+
/** Violet / foam / dust-rose — stock unlit wash. */
|
|
36
|
+
export declare const WEBGL_COLORS: string[];
|
|
37
|
+
export declare function resolveVariant(variant: LiveOrbVariant, color?: string, eyeColor?: string, colors?: string[]): {
|
|
38
|
+
body: string;
|
|
39
|
+
eye: string;
|
|
40
|
+
mode: number;
|
|
41
|
+
palette: string[];
|
|
42
|
+
};
|
|
43
|
+
export declare function fallbackFaceStyle(resolved: ReturnType<typeof resolveVariant>): {
|
|
44
|
+
backgroundColor?: string;
|
|
45
|
+
backgroundImage?: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Evenly lit sphere with two capsule eyes that follow the pointer.
|
|
49
|
+
* The orb stays put — only the gaze moves.
|
|
50
|
+
*/
|
|
51
|
+
export declare function createLiveOrb(canvas: HTMLCanvasElement, initial?: LiveOrbOptions): LiveOrbInstance | null;
|
|
52
|
+
export type LiveOrbProps = Omit<LiveOrbOptions, "onHasGl"> & {
|
|
53
|
+
className?: string;
|
|
54
|
+
/** Edge length in CSS pixels. Default `280`. */
|
|
55
|
+
size?: number;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Evenly lit sphere with two capsule eyes that follow the pointer.
|
|
59
|
+
* The orb stays put — only the gaze moves.
|
|
60
|
+
*/
|
|
61
|
+
export declare function LiveOrb({ className, size, variant, color, eyeColor, colors, interactive, blink, }: LiveOrbProps): React.JSX.Element;
|
|
62
|
+
export default LiveOrb;
|
|
63
|
+
//# sourceMappingURL=live-orb.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-orb.component.d.ts","sourceRoot":"","sources":["../../src/assistant/live-orb.component.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAG3D,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEpE,MAAM,MAAM,cAAc,GAAG;IAC3B,0CAA0C;IAC1C,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,wCAAwC;IACxC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,iEAAiE;IACjE,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,OAAO,KAAK,IAAI,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACvD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,KAAK;;;CAAqD,CAAC;AACxE,eAAO,MAAM,KAAK;;;CAAqD,CAAC;AACxE,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AACX,oDAAoD;AACpD,eAAO,MAAM,YAAY,UAAoC,CAAC;AAmK9D,wBAAgB,cAAc,CAC5B,OAAO,EAAE,cAAc,EACvB,KAAK,CAAC,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,MAAM,EAAE;;;;;EAqBlB;AAED,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,GAC1C;IACD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAUA;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,iBAAiB,EACzB,OAAO,GAAE,cAAmB,GAC3B,eAAe,GAAG,IAAI,CA+LxB;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,GAAG;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EACtB,SAAS,EACT,IAAU,EACV,OAAiB,EACjB,KAAK,EACL,QAAQ,EACR,MAAM,EACN,WAAkB,EAClB,KAAY,GACb,EAAE,YAAY,qBA8Ed;AAED,eAAe,OAAO,CAAC"}
|