@yarvelle/ui 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.
Files changed (42) hide show
  1. package/bin/yarvelle-ui-codegen.js +115 -0
  2. package/dist/index-DLbrj3Po.d.ts +90 -0
  3. package/dist/index.d.ts +706 -0
  4. package/dist/index.js +4418 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/lib/api/index.d.ts +99 -0
  7. package/dist/lib/api/index.js +113 -0
  8. package/dist/lib/api/index.js.map +1 -0
  9. package/dist/lib/auth/index.d.ts +21 -0
  10. package/dist/lib/auth/index.js +37 -0
  11. package/dist/lib/auth/index.js.map +1 -0
  12. package/dist/lib/cn.d.ts +5 -0
  13. package/dist/lib/cn.js +10 -0
  14. package/dist/lib/cn.js.map +1 -0
  15. package/dist/lib/i18n/index.d.ts +7 -0
  16. package/dist/lib/i18n/index.js +45 -0
  17. package/dist/lib/i18n/index.js.map +1 -0
  18. package/dist/lib/index.d.ts +8 -0
  19. package/dist/lib/index.js +272 -0
  20. package/dist/lib/index.js.map +1 -0
  21. package/dist/lib/sse/index.d.ts +11 -0
  22. package/dist/lib/sse/index.js +43 -0
  23. package/dist/lib/sse/index.js.map +1 -0
  24. package/dist/lib/storage-namespace.d.ts +6 -0
  25. package/dist/lib/storage-namespace.js +34 -0
  26. package/dist/lib/storage-namespace.js.map +1 -0
  27. package/dist/slots/index.d.ts +12 -0
  28. package/dist/slots/index.js +86 -0
  29. package/dist/slots/index.js.map +1 -0
  30. package/dist/styles.css +270 -0
  31. package/dist/testing/index.d.ts +3 -0
  32. package/dist/testing/index.js +36 -0
  33. package/dist/testing/index.js.map +1 -0
  34. package/dist/tokens/index.d.ts +37 -0
  35. package/dist/tokens/index.js +155 -0
  36. package/dist/tokens/index.js.map +1 -0
  37. package/dist/tokens/tailwind-preset.d.ts +5 -0
  38. package/dist/tokens/tailwind-preset.js +155 -0
  39. package/dist/tokens/tailwind-preset.js.map +1 -0
  40. package/dist/types-CP_CDg6G.d.ts +51 -0
  41. package/package.json +69 -4
  42. package/README.md +0 -3
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/storage-namespace.ts","../../src/lib/api/client.ts","../../src/lib/api/hooks.ts","../../src/lib/sse/parser.ts","../../src/lib/auth/auth-context.ts","../../src/lib/i18n/formatters.ts","../../src/lib/cn.ts"],"sourcesContent":["// Yarvelle Core — Domain-Neutral AI Agent Runtime & Execution Engine\n// Copyright 2026 Spectrayan (https://spectrayan.com)\n//\n// Licensed under the PolyForm Noncommercial License 1.0.0 and the\n// Yarvelle Core Additional Terms (see LICENSE and ADDITIONAL-TERMS.md).\n// Personal and household local use only. Commercial use, hosted service\n// offering, rebranding, white-labeling, and redistribution of modified\n// forks are prohibited without a written commercial license from Spectrayan.\n//\n// Required Notice: Copyright 2026 Spectrayan (https://spectrayan.com)\n\nexport function getStorageKey(namespace: string, key: string, suffix?: string): string {\n const base = `${namespace}_${key}`;\n return suffix ? `${base}_${suffix}` : base;\n}\n\nexport function getScopedItem(namespace: string, key: string, suffix?: string): string | null {\n if (typeof window === 'undefined') return null;\n try {\n return localStorage.getItem(getStorageKey(namespace, key, suffix));\n } catch {\n return null;\n }\n}\n\nexport function setScopedItem(namespace: string, key: string, value: string, suffix?: string): void {\n if (typeof window === 'undefined') return;\n try {\n localStorage.setItem(getStorageKey(namespace, key, suffix), value);\n } catch {\n // Ignore storage quota errors in sandboxed environments\n }\n}\n\nexport function removeScopedItem(namespace: string, key: string, suffix?: string): void {\n if (typeof window === 'undefined') return;\n try {\n localStorage.removeItem(getStorageKey(namespace, key, suffix));\n } catch {\n // Ignore errors\n }\n}\n","// Yarvelle Core — Domain-Neutral AI Agent Runtime & Execution Engine\n// Copyright 2026 Spectrayan (https://spectrayan.com)\n//\n// Licensed under the PolyForm Noncommercial License 1.0.0 and the\n// Yarvelle Core Additional Terms (see LICENSE and ADDITIONAL-TERMS.md).\n// Personal and household local use only. Commercial use, hosted service\n// offering, rebranding, white-labeling, and redistribution of modified\n// forks are prohibited without a written commercial license from Spectrayan.\n//\n// Required Notice: Copyright 2026 Spectrayan (https://spectrayan.com)\n\nimport type {\n ApprovalDecisionRequest,\n ApprovalItem,\n NoteItem,\n ReminderItem,\n RoutineItem,\n TaskItemData,\n UiContext,\n UiPreference,\n UiPreferenceUpdate,\n} from './types.js';\n\nexport class ApiClient {\n private baseUrl: string;\n\n constructor(baseUrl: string = '/api/v1') {\n this.baseUrl = baseUrl.replace(/\\/+$/, '');\n }\n\n private async request<T>(path: string, options: RequestInit = {}): Promise<T> {\n const url = `${this.baseUrl}${path.startsWith('/') ? path : `/${path}`}`;\n const headers = new Headers(options.headers || {});\n if (!headers.has('Content-Type') && options.body && typeof options.body === 'string') {\n headers.set('Content-Type', 'application/json');\n }\n\n const response = await fetch(url, { ...options, headers });\n if (!response.ok) {\n let detail = `HTTP ${response.status} ${response.statusText}`;\n try {\n const body = await response.json();\n if (body.detail) detail = body.detail;\n } catch {\n // Fallback to text status\n }\n throw new Error(detail);\n }\n return response.json() as Promise<T>;\n }\n\n async getUiContext(profileId?: string): Promise<UiContext> {\n const q = profileId ? `?profile_id=${encodeURIComponent(profileId)}` : '';\n return this.request<UiContext>(`/me/ui-context${q}`);\n }\n\n async getUiPrefs(profileId: string): Promise<UiPreference> {\n return this.request<UiPreference>(`/me/profiles/${encodeURIComponent(profileId)}/ui-prefs`);\n }\n\n async updateUiPrefs(profileId: string, prefs: UiPreferenceUpdate): Promise<UiPreference> {\n return this.request<UiPreference>(`/me/profiles/${encodeURIComponent(profileId)}/ui-prefs`, {\n method: 'PUT',\n body: JSON.stringify(prefs),\n });\n }\n\n async decideApproval(approvalId: string, decision: 'approve' | 'reject', reason?: string): Promise<ApprovalItem> {\n const body: ApprovalDecisionRequest = { decision, reason };\n return this.request<ApprovalItem>(`/approvals/${encodeURIComponent(approvalId)}/decide`, {\n method: 'POST',\n body: JSON.stringify(body),\n });\n }\n\n async resumeChat(threadId: string, payload: Record<string, unknown> = {}): Promise<{ status: string }> {\n return this.request<{ status: string }>(`/chat/resume`, {\n method: 'POST',\n body: JSON.stringify({ thread_id: threadId, ...payload }),\n });\n }\n}\n\nexport const defaultApiClient = new ApiClient();\n","// Yarvelle Core — Domain-Neutral AI Agent Runtime & Execution Engine\n// Copyright 2026 Spectrayan (https://spectrayan.com)\n//\n// Licensed under the PolyForm Noncommercial License 1.0.0 and the\n// Yarvelle Core Additional Terms (see LICENSE and ADDITIONAL-TERMS.md).\n// Personal and household local use only. Commercial use, hosted service\n// offering, rebranding, white-labeling, and redistribution of modified\n// forks are prohibited without a written commercial license from Spectrayan.\n//\n// Required Notice: Copyright 2026 Spectrayan (https://spectrayan.com)\n\nimport { useCallback, useEffect, useState } from 'react';\nimport { defaultApiClient } from './client.js';\nimport type { UiContext, UiPreference, UiPreferenceUpdate } from './types.js';\n\nexport function useUiContext(profileId?: string) {\n const [data, setData] = useState<UiContext | null>(null);\n const [loading, setLoading] = useState<boolean>(true);\n const [error, setError] = useState<Error | null>(null);\n\n const refetch = useCallback(async () => {\n setLoading(true);\n setError(null);\n try {\n const result = await defaultApiClient.getUiContext(profileId);\n setData(result);\n } catch (err) {\n setError(err instanceof Error ? err : new Error(String(err)));\n } finally {\n setLoading(false);\n }\n }, [profileId]);\n\n useEffect(() => {\n refetch();\n }, [refetch]);\n\n return { data, loading, error, refetch };\n}\n\nexport function useUiPrefs(profileId: string) {\n const [data, setData] = useState<UiPreference | null>(null);\n const [loading, setLoading] = useState<boolean>(true);\n const [error, setError] = useState<Error | null>(null);\n\n const refetch = useCallback(async () => {\n if (!profileId) return;\n setLoading(true);\n setError(null);\n try {\n const result = await defaultApiClient.getUiPrefs(profileId);\n setData(result);\n } catch (err) {\n setError(err instanceof Error ? err : new Error(String(err)));\n } finally {\n setLoading(false);\n }\n }, [profileId]);\n\n useEffect(() => {\n refetch();\n }, [refetch]);\n\n const updatePrefs = useCallback(\n async (prefs: UiPreferenceUpdate) => {\n const updated = await defaultApiClient.updateUiPrefs(profileId, prefs);\n setData(updated);\n return updated;\n },\n [profileId]\n );\n\n return { data, loading, error, refetch, updatePrefs };\n}\n","// Yarvelle Core — Domain-Neutral AI Agent Runtime & Execution Engine\n// Copyright 2026 Spectrayan (https://spectrayan.com)\n//\n// Licensed under the PolyForm Noncommercial License 1.0.0 and the\n// Yarvelle Core Additional Terms (see LICENSE and ADDITIONAL-TERMS.md).\n// Personal and household local use only. Commercial use, hosted service\n// offering, rebranding, white-labeling, and redistribution of modified\n// forks are prohibited without a written commercial license from Spectrayan.\n//\n// Required Notice: Copyright 2026 Spectrayan (https://spectrayan.com)\n\nexport interface SseEvent {\n event?: string;\n data: string;\n id?: string;\n}\n\nexport function parseSseChunk(chunk: string, buffer: string = ''): { events: SseEvent[]; remainingBuffer: string } {\n const combined = buffer + chunk;\n const lines = combined.split(/\\r?\\n/);\n const events: SseEvent[] = [];\n\n let currentEvent: SseEvent = { data: '' };\n let hasData = false;\n\n // The last line might be incomplete if chunk ended mid-line\n const completeLines = lines.slice(0, -1);\n const remaining = lines[lines.length - 1];\n\n for (const line of completeLines) {\n if (line.trim() === '') {\n if (hasData) {\n events.push(currentEvent);\n currentEvent = { data: '' };\n hasData = false;\n }\n continue;\n }\n\n if (line.startsWith(':')) {\n // Comment / heartbeat line\n continue;\n }\n\n const colonIdx = line.indexOf(':');\n if (colonIdx === -1) {\n continue;\n }\n\n const field = line.slice(0, colonIdx).trim();\n const value = line.slice(colonIdx + 1).replace(/^\\s/, '');\n\n if (field === 'event') {\n currentEvent.event = value;\n } else if (field === 'data') {\n currentEvent.data = currentEvent.data ? `${currentEvent.data}\\n${value}` : value;\n hasData = true;\n } else if (field === 'id') {\n currentEvent.id = value;\n }\n }\n\n return { events, remainingBuffer: remaining };\n}\n","// Yarvelle Core — Domain-Neutral AI Agent Runtime & Execution Engine\n// Copyright 2026 Spectrayan (https://spectrayan.com)\n//\n// Licensed under the PolyForm Noncommercial License 1.0.0 and the\n// Yarvelle Core Additional Terms (see LICENSE and ADDITIONAL-TERMS.md).\n// Personal and household local use only. Commercial use, hosted service\n// offering, rebranding, white-labeling, and redistribution of modified\n// forks are prohibited without a written commercial license from Spectrayan.\n//\n// Required Notice: Copyright 2026 Spectrayan (https://spectrayan.com)\n\nimport React, { createContext, useContext, useState } from 'react';\n\nexport interface UserSession {\n userId: string;\n username: string;\n role: string;\n token?: string;\n}\n\nexport interface AuthContextValue {\n session: UserSession | null;\n isAuthenticated: boolean;\n setSession: (session: UserSession | null) => void;\n logout: () => void;\n}\n\nconst AuthContext = createContext<AuthContextValue>({\n session: null,\n isAuthenticated: false,\n setSession: () => {},\n logout: () => {},\n});\n\nexport const AuthProvider: React.FC<{ children: React.ReactNode; initialSession?: UserSession | null }> = ({\n children,\n initialSession = null,\n}) => {\n const [session, setSession] = useState<UserSession | null>(initialSession);\n\n const logout = () => {\n setSession(null);\n };\n\n return React.createElement(\n AuthContext.Provider,\n {\n value: {\n session,\n isAuthenticated: !!session,\n setSession,\n logout,\n },\n },\n children\n );\n};\n\nexport const useAuth = () => useContext(AuthContext);\n","// Yarvelle Core — Domain-Neutral AI Agent Runtime & Execution Engine\n// Copyright 2026 Spectrayan (https://spectrayan.com)\n//\n// Licensed under the PolyForm Noncommercial License 1.0.0 and the\n// Yarvelle Core Additional Terms (see LICENSE and ADDITIONAL-TERMS.md).\n// Personal and household local use only. Commercial use, hosted service\n// offering, rebranding, white-labeling, and redistribution of modified\n// forks are prohibited without a written commercial license from Spectrayan.\n//\n// Required Notice: Copyright 2026 Spectrayan (https://spectrayan.com)\n\nexport function getTextDirection(locale: string): 'ltr' | 'rtl' {\n const rtlLocales = ['ar', 'he', 'fa', 'ur', 'ar-SA', 'he-IL'];\n const prefix = locale.split('-')[0].toLowerCase();\n return rtlLocales.includes(locale) || rtlLocales.includes(prefix) ? 'rtl' : 'ltr';\n}\n\nexport function formatDate(\n value: Date | string | number,\n locale: string = 'en-US',\n options: Intl.DateTimeFormatOptions = { dateStyle: 'medium' }\n): string {\n const d = typeof value === 'object' ? value : new Date(value);\n try {\n return new Intl.DateTimeFormat(locale, options).format(d);\n } catch {\n return d.toLocaleDateString();\n }\n}\n\nexport function formatTime(\n value: Date | string | number,\n locale: string = 'en-US',\n options: Intl.DateTimeFormatOptions = { timeStyle: 'short' }\n): string {\n const d = typeof value === 'object' ? value : new Date(value);\n try {\n return new Intl.DateTimeFormat(locale, options).format(d);\n } catch {\n return d.toLocaleTimeString();\n }\n}\n\nexport function formatDateTime(\n value: Date | string | number,\n locale: string = 'en-US',\n options: Intl.DateTimeFormatOptions = { dateStyle: 'medium', timeStyle: 'short' }\n): string {\n const d = typeof value === 'object' ? value : new Date(value);\n try {\n return new Intl.DateTimeFormat(locale, options).format(d);\n } catch {\n return `${d.toLocaleDateString()} ${d.toLocaleTimeString()}`;\n }\n}\n\nexport function formatNumber(\n value: number,\n locale: string = 'en-US',\n options: Intl.NumberFormatOptions = {}\n): string {\n try {\n return new Intl.NumberFormat(locale, options).format(value);\n } catch {\n return String(value);\n }\n}\n","// Yarvelle Core — Domain-Neutral AI Agent Runtime & Execution Engine\n// Copyright 2026 Spectrayan (https://spectrayan.com)\n//\n// Licensed under the PolyForm Noncommercial License 1.0.0 and the\n// Yarvelle Core Additional Terms (see LICENSE and ADDITIONAL-TERMS.md).\n// Personal and household local use only. Commercial use, hosted service\n// offering, rebranding, white-labeling, and redistribution of modified\n// forks are prohibited without a written commercial license from Spectrayan.\n//\n// Required Notice: Copyright 2026 Spectrayan (https://spectrayan.com)\n\nimport { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";AAWO,SAAS,cAAc,WAAmB,KAAa,QAAyB;AACrF,QAAM,OAAO,GAAG,SAAS,IAAI,GAAG;AAChC,SAAO,SAAS,GAAG,IAAI,IAAI,MAAM,KAAK;AACxC;AAEO,SAAS,cAAc,WAAmB,KAAa,QAAgC;AAC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AQ,OAAO,EAAE,OAAO,CAAC;AAAA,EAC1D,QAAQ;AACN,WAAO,GAAG,EAAE,mBAAmB,CAAC,IAAI,EAAE,mBAAmB,CAAC;AAAA,EAC5D;AACF;AAEO,SAAS,aACd,OACA,SAAiB,SACjB,UAAoC,CAAC,GAC7B;AACR,MAAI;AACF,WAAO,IAAI,KAAK,aAAa,QAAQ,OAAO,EAAE,OAAO,KAAK;AAAA,EAC5D,QAAQ;AACN,WAAO,OAAO,KAAK;AAAA,EACrB;AACF;;;ACvDA,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAA8B;AAClD,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;","names":["useState"]}
@@ -0,0 +1,11 @@
1
+ interface SseEvent {
2
+ event?: string;
3
+ data: string;
4
+ id?: string;
5
+ }
6
+ declare function parseSseChunk(chunk: string, buffer?: string): {
7
+ events: SseEvent[];
8
+ remainingBuffer: string;
9
+ };
10
+
11
+ export { type SseEvent, parseSseChunk };
@@ -0,0 +1,43 @@
1
+ // src/lib/sse/parser.ts
2
+ function parseSseChunk(chunk, buffer = "") {
3
+ const combined = buffer + chunk;
4
+ const lines = combined.split(/\r?\n/);
5
+ const events = [];
6
+ let currentEvent = { data: "" };
7
+ let hasData = false;
8
+ const completeLines = lines.slice(0, -1);
9
+ const remaining = lines[lines.length - 1];
10
+ for (const line of completeLines) {
11
+ if (line.trim() === "") {
12
+ if (hasData) {
13
+ events.push(currentEvent);
14
+ currentEvent = { data: "" };
15
+ hasData = false;
16
+ }
17
+ continue;
18
+ }
19
+ if (line.startsWith(":")) {
20
+ continue;
21
+ }
22
+ const colonIdx = line.indexOf(":");
23
+ if (colonIdx === -1) {
24
+ continue;
25
+ }
26
+ const field = line.slice(0, colonIdx).trim();
27
+ const value = line.slice(colonIdx + 1).replace(/^\s/, "");
28
+ if (field === "event") {
29
+ currentEvent.event = value;
30
+ } else if (field === "data") {
31
+ currentEvent.data = currentEvent.data ? `${currentEvent.data}
32
+ ${value}` : value;
33
+ hasData = true;
34
+ } else if (field === "id") {
35
+ currentEvent.id = value;
36
+ }
37
+ }
38
+ return { events, remainingBuffer: remaining };
39
+ }
40
+ export {
41
+ parseSseChunk
42
+ };
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/lib/sse/parser.ts"],"sourcesContent":["// Yarvelle Core — Domain-Neutral AI Agent Runtime & Execution Engine\n// Copyright 2026 Spectrayan (https://spectrayan.com)\n//\n// Licensed under the PolyForm Noncommercial License 1.0.0 and the\n// Yarvelle Core Additional Terms (see LICENSE and ADDITIONAL-TERMS.md).\n// Personal and household local use only. Commercial use, hosted service\n// offering, rebranding, white-labeling, and redistribution of modified\n// forks are prohibited without a written commercial license from Spectrayan.\n//\n// Required Notice: Copyright 2026 Spectrayan (https://spectrayan.com)\n\nexport interface SseEvent {\n event?: string;\n data: string;\n id?: string;\n}\n\nexport function parseSseChunk(chunk: string, buffer: string = ''): { events: SseEvent[]; remainingBuffer: string } {\n const combined = buffer + chunk;\n const lines = combined.split(/\\r?\\n/);\n const events: SseEvent[] = [];\n\n let currentEvent: SseEvent = { data: '' };\n let hasData = false;\n\n // The last line might be incomplete if chunk ended mid-line\n const completeLines = lines.slice(0, -1);\n const remaining = lines[lines.length - 1];\n\n for (const line of completeLines) {\n if (line.trim() === '') {\n if (hasData) {\n events.push(currentEvent);\n currentEvent = { data: '' };\n hasData = false;\n }\n continue;\n }\n\n if (line.startsWith(':')) {\n // Comment / heartbeat line\n continue;\n }\n\n const colonIdx = line.indexOf(':');\n if (colonIdx === -1) {\n continue;\n }\n\n const field = line.slice(0, colonIdx).trim();\n const value = line.slice(colonIdx + 1).replace(/^\\s/, '');\n\n if (field === 'event') {\n currentEvent.event = value;\n } else if (field === 'data') {\n currentEvent.data = currentEvent.data ? `${currentEvent.data}\\n${value}` : value;\n hasData = true;\n } else if (field === 'id') {\n currentEvent.id = value;\n }\n }\n\n return { events, remainingBuffer: remaining };\n}\n"],"mappings":";AAiBO,SAAS,cAAc,OAAe,SAAiB,IAAqD;AACjH,QAAM,WAAW,SAAS;AAC1B,QAAM,QAAQ,SAAS,MAAM,OAAO;AACpC,QAAM,SAAqB,CAAC;AAE5B,MAAI,eAAyB,EAAE,MAAM,GAAG;AACxC,MAAI,UAAU;AAGd,QAAM,gBAAgB,MAAM,MAAM,GAAG,EAAE;AACvC,QAAM,YAAY,MAAM,MAAM,SAAS,CAAC;AAExC,aAAW,QAAQ,eAAe;AAChC,QAAI,KAAK,KAAK,MAAM,IAAI;AACtB,UAAI,SAAS;AACX,eAAO,KAAK,YAAY;AACxB,uBAAe,EAAE,MAAM,GAAG;AAC1B,kBAAU;AAAA,MACZ;AACA;AAAA,IACF;AAEA,QAAI,KAAK,WAAW,GAAG,GAAG;AAExB;AAAA,IACF;AAEA,UAAM,WAAW,KAAK,QAAQ,GAAG;AACjC,QAAI,aAAa,IAAI;AACnB;AAAA,IACF;AAEA,UAAM,QAAQ,KAAK,MAAM,GAAG,QAAQ,EAAE,KAAK;AAC3C,UAAM,QAAQ,KAAK,MAAM,WAAW,CAAC,EAAE,QAAQ,OAAO,EAAE;AAExD,QAAI,UAAU,SAAS;AACrB,mBAAa,QAAQ;AAAA,IACvB,WAAW,UAAU,QAAQ;AAC3B,mBAAa,OAAO,aAAa,OAAO,GAAG,aAAa,IAAI;AAAA,EAAK,KAAK,KAAK;AAC3E,gBAAU;AAAA,IACZ,WAAW,UAAU,MAAM;AACzB,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF;AAEA,SAAO,EAAE,QAAQ,iBAAiB,UAAU;AAC9C;","names":[]}
@@ -0,0 +1,6 @@
1
+ declare function getStorageKey(namespace: string, key: string, suffix?: string): string;
2
+ declare function getScopedItem(namespace: string, key: string, suffix?: string): string | null;
3
+ declare function setScopedItem(namespace: string, key: string, value: string, suffix?: string): void;
4
+ declare function removeScopedItem(namespace: string, key: string, suffix?: string): void;
5
+
6
+ export { getScopedItem, getStorageKey, removeScopedItem, setScopedItem };
@@ -0,0 +1,34 @@
1
+ // src/lib/storage-namespace.ts
2
+ function getStorageKey(namespace, key, suffix) {
3
+ const base = `${namespace}_${key}`;
4
+ return suffix ? `${base}_${suffix}` : base;
5
+ }
6
+ function getScopedItem(namespace, key, suffix) {
7
+ if (typeof window === "undefined") return null;
8
+ try {
9
+ return localStorage.getItem(getStorageKey(namespace, key, suffix));
10
+ } catch {
11
+ return null;
12
+ }
13
+ }
14
+ function setScopedItem(namespace, key, value, suffix) {
15
+ if (typeof window === "undefined") return;
16
+ try {
17
+ localStorage.setItem(getStorageKey(namespace, key, suffix), value);
18
+ } catch {
19
+ }
20
+ }
21
+ function removeScopedItem(namespace, key, suffix) {
22
+ if (typeof window === "undefined") return;
23
+ try {
24
+ localStorage.removeItem(getStorageKey(namespace, key, suffix));
25
+ } catch {
26
+ }
27
+ }
28
+ export {
29
+ getScopedItem,
30
+ getStorageKey,
31
+ removeScopedItem,
32
+ setScopedItem
33
+ };
34
+ //# sourceMappingURL=storage-namespace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/lib/storage-namespace.ts"],"sourcesContent":["// Yarvelle Core — Domain-Neutral AI Agent Runtime & Execution Engine\n// Copyright 2026 Spectrayan (https://spectrayan.com)\n//\n// Licensed under the PolyForm Noncommercial License 1.0.0 and the\n// Yarvelle Core Additional Terms (see LICENSE and ADDITIONAL-TERMS.md).\n// Personal and household local use only. Commercial use, hosted service\n// offering, rebranding, white-labeling, and redistribution of modified\n// forks are prohibited without a written commercial license from Spectrayan.\n//\n// Required Notice: Copyright 2026 Spectrayan (https://spectrayan.com)\n\nexport function getStorageKey(namespace: string, key: string, suffix?: string): string {\n const base = `${namespace}_${key}`;\n return suffix ? `${base}_${suffix}` : base;\n}\n\nexport function getScopedItem(namespace: string, key: string, suffix?: string): string | null {\n if (typeof window === 'undefined') return null;\n try {\n return localStorage.getItem(getStorageKey(namespace, key, suffix));\n } catch {\n return null;\n }\n}\n\nexport function setScopedItem(namespace: string, key: string, value: string, suffix?: string): void {\n if (typeof window === 'undefined') return;\n try {\n localStorage.setItem(getStorageKey(namespace, key, suffix), value);\n } catch {\n // Ignore storage quota errors in sandboxed environments\n }\n}\n\nexport function removeScopedItem(namespace: string, key: string, suffix?: string): void {\n if (typeof window === 'undefined') return;\n try {\n localStorage.removeItem(getStorageKey(namespace, key, suffix));\n } catch {\n // Ignore errors\n }\n}\n"],"mappings":";AAWO,SAAS,cAAc,WAAmB,KAAa,QAAyB;AACrF,QAAM,OAAO,GAAG,SAAS,IAAI,GAAG;AAChC,SAAO,SAAS,GAAG,IAAI,IAAI,MAAM,KAAK;AACxC;AAEO,SAAS,cAAc,WAAmB,KAAa,QAAgC;AAC5F,MAAI,OAAO,WAAW,YAAa,QAAO;AAC1C,MAAI;AACF,WAAO,aAAa,QAAQ,cAAc,WAAW,KAAK,MAAM,CAAC;AAAA,EACnE,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEO,SAAS,cAAc,WAAmB,KAAa,OAAe,QAAuB;AAClG,MAAI,OAAO,WAAW,YAAa;AACnC,MAAI;AACF,iBAAa,QAAQ,cAAc,WAAW,KAAK,MAAM,GAAG,KAAK;AAAA,EACnE,QAAQ;AAAA,EAER;AACF;AAEO,SAAS,iBAAiB,WAAmB,KAAa,QAAuB;AACtF,MAAI,OAAO,WAAW,YAAa;AACnC,MAAI;AACF,iBAAa,WAAW,cAAc,WAAW,KAAK,MAAM,CAAC;AAAA,EAC/D,QAAQ;AAAA,EAER;AACF;","names":[]}
@@ -0,0 +1,12 @@
1
+ import { S as SlotContribution, a as SlotProps } from '../types-CP_CDg6G.js';
2
+ export { A as AudienceBand, F as FilterSlotsOptions, I as IconId, M as MessageId, P as PackUi, b as ScopeId, c as SlotId, d as definePackUi, f as filterSlotContributions, i as isScopeSatisfied, m as matchesScopePattern } from '../types-CP_CDg6G.js';
3
+ import React__default from 'react';
4
+
5
+ interface SlotRendererProps {
6
+ contribution: SlotContribution;
7
+ slotProps: SlotProps;
8
+ fallback?: React__default.ReactNode;
9
+ }
10
+ declare const SlotRenderer: React__default.FC<SlotRendererProps>;
11
+
12
+ export { SlotContribution, SlotProps, SlotRenderer, type SlotRendererProps };
@@ -0,0 +1,86 @@
1
+ // src/slots/types.ts
2
+ function definePackUi(def) {
3
+ return {
4
+ pack: def.pack,
5
+ contributions: def.contributions,
6
+ messages: def.messages
7
+ };
8
+ }
9
+ function matchesScopePattern(pattern, target) {
10
+ if (pattern === "*" || pattern === target) return true;
11
+ if (pattern.endsWith(".*")) {
12
+ const prefix = pattern.slice(0, -2);
13
+ return target === prefix || target.startsWith(`${prefix}.`);
14
+ }
15
+ return false;
16
+ }
17
+ function isScopeSatisfied(requiredScope, activeScopes) {
18
+ return activeScopes.some((active) => matchesScopePattern(active, requiredScope));
19
+ }
20
+ function filterSlotContributions(contributions, options = {}) {
21
+ const { slot, enabledPacks, activeScopes, hiddenPanels = [], audience } = options;
22
+ return contributions.filter((c) => {
23
+ if (slot && c.slot !== slot) return false;
24
+ if (enabledPacks && !enabledPacks.includes(c.pack)) return false;
25
+ if (hiddenPanels.includes(c.id)) return false;
26
+ if (audience && c.audiences && c.audiences.length > 0 && !c.audiences.includes(audience)) {
27
+ return false;
28
+ }
29
+ if (activeScopes && c.requiredScopes && c.requiredScopes.length > 0) {
30
+ const allSatisfied = c.requiredScopes.every((req) => isScopeSatisfied(req, activeScopes));
31
+ if (!allSatisfied) return false;
32
+ }
33
+ return true;
34
+ }).sort((a, b) => (a.order ?? 100) - (b.order ?? 100));
35
+ }
36
+
37
+ // src/slots/SlotRenderer.tsx
38
+ import { useEffect, useState } from "react";
39
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
40
+ var SlotRenderer = ({
41
+ contribution,
42
+ slotProps,
43
+ fallback = null
44
+ }) => {
45
+ const [LoadedComp, setLoadedComp] = useState(() => contribution.component ?? null);
46
+ const [error, setError] = useState(null);
47
+ useEffect(() => {
48
+ let cancelled = false;
49
+ if (contribution.component) {
50
+ setLoadedComp(() => contribution.component ?? null);
51
+ return;
52
+ }
53
+ if (contribution.load) {
54
+ contribution.load().then((mod) => {
55
+ if (!cancelled) {
56
+ setLoadedComp(() => mod.default);
57
+ }
58
+ }).catch((err) => {
59
+ if (!cancelled) {
60
+ setError(err instanceof Error ? err : new Error(String(err)));
61
+ }
62
+ });
63
+ }
64
+ return () => {
65
+ cancelled = true;
66
+ };
67
+ }, [contribution]);
68
+ if (error) {
69
+ return /* @__PURE__ */ jsxs("div", { className: "yc-SlotRenderer-error text-danger text-sm p-4", "data-slot": "error", children: [
70
+ "Failed to load slot: ",
71
+ contribution.id
72
+ ] });
73
+ }
74
+ if (!LoadedComp) {
75
+ return /* @__PURE__ */ jsx(Fragment, { children: fallback });
76
+ }
77
+ return /* @__PURE__ */ jsx("div", { className: "yc-SlotRenderer-root", "data-slot": "root", "data-pack": contribution.pack, "data-contribution": contribution.id, children: /* @__PURE__ */ jsx(LoadedComp, { ...slotProps }) });
78
+ };
79
+ export {
80
+ SlotRenderer,
81
+ definePackUi,
82
+ filterSlotContributions,
83
+ isScopeSatisfied,
84
+ matchesScopePattern
85
+ };
86
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/slots/types.ts","../../src/slots/SlotRenderer.tsx"],"sourcesContent":["// Yarvelle Core — Domain-Neutral AI Agent Runtime & Execution Engine\n// Copyright 2026 Spectrayan (https://spectrayan.com)\n//\n// Licensed under the PolyForm Noncommercial License 1.0.0 and the\n// Yarvelle Core Additional Terms (see LICENSE and ADDITIONAL-TERMS.md).\n// Personal and household local use only. Commercial use, hosted service\n// offering, rebranding, white-labeling, and redistribution of modified\n// forks are prohibited without a written commercial license from Spectrayan.\n//\n// Required Notice: Copyright 2026 Spectrayan (https://spectrayan.com)\n\nimport type { ComponentType } from 'react';\n\nexport type SlotId =\n | 'dashboard.card'\n | 'sidebar.item'\n | 'profile.detail'\n | 'chat.messageRenderer'\n | 'chat.composerAction'\n | 'chat.beforeSend'\n | 'settings.section'\n | 'onboarding.step';\n\nexport type AudienceBand = 'adult' | 'teen' | 'child' | 'viewer';\nexport type ScopeId = string;\nexport type MessageId = string;\nexport type IconId = string;\n\nexport interface SlotProps<P = Record<string, unknown>> {\n profileId: string;\n scopes: ScopeId[];\n density?: 'compact' | 'comfortable';\n extra?: P;\n}\n\nexport interface SlotContribution<P = Record<string, unknown>> {\n id: string;\n pack: string;\n slot: SlotId;\n title: MessageId;\n icon?: IconId;\n order?: number;\n route?: string;\n requiredScopes: ScopeId[];\n audiences?: AudienceBand[];\n messageKind?: string;\n component?: ComponentType<SlotProps<P>>;\n load?: () => Promise<{ default: ComponentType<SlotProps<P>> }>;\n}\n\nexport interface PackUi {\n pack: string;\n contributions: SlotContribution[];\n messages?: Record<string, Record<string, string>>;\n}\n\nexport function definePackUi(def: {\n pack: string;\n contributions: SlotContribution[];\n messages?: Record<string, Record<string, string>>;\n}): PackUi {\n return {\n pack: def.pack,\n contributions: def.contributions,\n messages: def.messages,\n };\n}\n\nexport interface FilterSlotsOptions {\n slot?: SlotId;\n enabledPacks?: string[];\n activeScopes?: string[];\n hiddenPanels?: string[];\n audience?: AudienceBand;\n}\n\nexport function matchesScopePattern(pattern: string, target: string): boolean {\n if (pattern === '*' || pattern === target) return true;\n if (pattern.endsWith('.*')) {\n const prefix = pattern.slice(0, -2);\n return target === prefix || target.startsWith(`${prefix}.`);\n }\n return false;\n}\n\nexport function isScopeSatisfied(requiredScope: string, activeScopes: string[]): boolean {\n return activeScopes.some((active) => matchesScopePattern(active, requiredScope));\n}\n\nexport function filterSlotContributions(\n contributions: SlotContribution[],\n options: FilterSlotsOptions = {}\n): SlotContribution[] {\n const { slot, enabledPacks, activeScopes, hiddenPanels = [], audience } = options;\n\n return contributions\n .filter((c) => {\n if (slot && c.slot !== slot) return false;\n if (enabledPacks && !enabledPacks.includes(c.pack)) return false;\n if (hiddenPanels.includes(c.id)) return false;\n if (audience && c.audiences && c.audiences.length > 0 && !c.audiences.includes(audience)) {\n return false;\n }\n if (activeScopes && c.requiredScopes && c.requiredScopes.length > 0) {\n const allSatisfied = c.requiredScopes.every((req) => isScopeSatisfied(req, activeScopes));\n if (!allSatisfied) return false;\n }\n return true;\n })\n .sort((a, b) => (a.order ?? 100) - (b.order ?? 100));\n}\n","// Yarvelle Core — Domain-Neutral AI Agent Runtime & Execution Engine\n// Copyright 2026 Spectrayan (https://spectrayan.com)\n//\n// Licensed under the PolyForm Noncommercial License 1.0.0 and the\n// Yarvelle Core Additional Terms (see LICENSE and ADDITIONAL-TERMS.md).\n// Personal and household local use only. Commercial use, hosted service\n// offering, rebranding, white-labeling, and redistribution of modified\n// forks are prohibited without a written commercial license from Spectrayan.\n//\n// Required Notice: Copyright 2026 Spectrayan (https://spectrayan.com)\n\nimport React, { useEffect, useState } from 'react';\nimport type { ComponentType } from 'react';\nimport type { SlotContribution, SlotProps } from './types.js';\n\nexport interface SlotRendererProps {\n contribution: SlotContribution;\n slotProps: SlotProps;\n fallback?: React.ReactNode;\n}\n\nexport const SlotRenderer: React.FC<SlotRendererProps> = ({\n contribution,\n slotProps,\n fallback = null,\n}) => {\n const [LoadedComp, setLoadedComp] = useState<ComponentType<SlotProps> | null>(() => contribution.component ?? null);\n const [error, setError] = useState<Error | null>(null);\n\n useEffect(() => {\n let cancelled = false;\n if (contribution.component) {\n setLoadedComp(() => contribution.component ?? null);\n return;\n }\n if (contribution.load) {\n contribution\n .load()\n .then((mod) => {\n if (!cancelled) {\n setLoadedComp(() => mod.default);\n }\n })\n .catch((err) => {\n if (!cancelled) {\n setError(err instanceof Error ? err : new Error(String(err)));\n }\n });\n }\n return () => {\n cancelled = true;\n };\n }, [contribution]);\n\n if (error) {\n return (\n <div className=\"yc-SlotRenderer-error text-danger text-sm p-4\" data-slot=\"error\">\n Failed to load slot: {contribution.id}\n </div>\n );\n }\n\n if (!LoadedComp) {\n return <>{fallback}</>;\n }\n\n return (\n <div className=\"yc-SlotRenderer-root\" data-slot=\"root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I;AACvD;;;ACnGA,SAAgB,WAAW,gBAAgB;AA6CrC,SAOK,eAPL;AAnCC,IAAM,eAA4C,CAAC;AAAA,EACxD;AAAA,EACA;AAAA,EACA,WAAW;AACb,MAAM;AACJ,QAAM,CAAC,YAAY,aAAa,IAAI,SAA0C,MAAM,aAAa,aAAa,IAAI;AAClH,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAuB,IAAI;AAErD,YAAU,MAAM;AACd,QAAI,YAAY;AAChB,QAAI,aAAa,WAAW;AAC1B,oBAAc,MAAM,aAAa,aAAa,IAAI;AAClD;AAAA,IACF;AACA,QAAI,aAAa,MAAM;AACrB,mBACG,KAAK,EACL,KAAK,CAAC,QAAQ;AACb,YAAI,CAAC,WAAW;AACd,wBAAc,MAAM,IAAI,OAAO;AAAA,QACjC;AAAA,MACF,CAAC,EACA,MAAM,CAAC,QAAQ;AACd,YAAI,CAAC,WAAW;AACd,mBAAS,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,GAAG,CAAC,CAAC;AAAA,QAC9D;AAAA,MACF,CAAC;AAAA,IACL;AACA,WAAO,MAAM;AACX,kBAAY;AAAA,IACd;AAAA,EACF,GAAG,CAAC,YAAY,CAAC;AAEjB,MAAI,OAAO;AACT,WACE,qBAAC,SAAI,WAAU,iDAAgD,aAAU,SAAQ;AAAA;AAAA,MACzD,aAAa;AAAA,OACrC;AAAA,EAEJ;AAEA,MAAI,CAAC,YAAY;AACf,WAAO,gCAAG,oBAAS;AAAA,EACrB;AAEA,SACE,oBAAC,SAAI,WAAU,wBAAuB,aAAU,QAAO,aAAW,aAAa,MAAM,qBAAmB,aAAa,IACnH,8BAAC,cAAY,GAAG,WAAW,GAC7B;AAEJ;","names":[]}
@@ -0,0 +1,270 @@
1
+ /*
2
+ * Yarvelle Core — Domain-Neutral AI Agent Runtime & Execution Engine
3
+ * Copyright 2026 Spectrayan (https://spectrayan.com)
4
+ *
5
+ * Licensed under the PolyForm Noncommercial License 1.0.0 and the
6
+ * Yarvelle Core Additional Terms (see LICENSE and ADDITIONAL-TERMS.md).
7
+ * Personal and household local use only. Commercial use, hosted service
8
+ * offering, rebranding, white-labeling, and redistribution of modified
9
+ * forks are prohibited without a written commercial license from Spectrayan.
10
+ *
11
+ * Required Notice: Copyright 2026 Spectrayan (https://spectrayan.com)
12
+ */
13
+ /*
14
+ * Yarvelle Core UI Design Tokens
15
+ * Emitted automatically by scripts/build-tokens.mjs — DO NOT EDIT DIRECTLY
16
+ */
17
+
18
+ :root {
19
+ color-scheme: light;
20
+
21
+ /* Surfaces */
22
+ --ui-canvas: #f7faf8;
23
+ --ui-surface: #ffffff;
24
+ --ui-surface-2: #f1f5f4;
25
+ --ui-surface-3: #e7eeeb;
26
+ --ui-rail: #f2f7f4;
27
+ --ui-overlay: rgba(15, 23, 42, 0.40);
28
+
29
+ /* Text */
30
+ --ui-fg: #0f172a;
31
+ --ui-fg-muted: #475569;
32
+ --ui-fg-subtle: #5b6b7f;
33
+ --ui-fg-on-primary: #ffffff;
34
+ --ui-fg-link: #047857;
35
+
36
+ /* Lines / Borders */
37
+ --ui-border: #e2e8e5;
38
+ --ui-border-strong: #7f8ea3;
39
+
40
+ /* Primary Action */
41
+ --ui-primary: #047857;
42
+ --ui-primary-hover: #065f46;
43
+ --ui-primary-fg: #ffffff;
44
+ --ui-primary-soft: #ecfdf5;
45
+ --ui-primary-soft-fg: #065f46;
46
+
47
+ /* Status */
48
+ --ui-info-bg: #eef2ff;
49
+ --ui-info-fg: #3730a3;
50
+ --ui-info-border: #c7d2fe;
51
+ --ui-warn-bg: #fffbeb;
52
+ --ui-warn-fg: #92400e;
53
+ --ui-warn-border: #fcd34d;
54
+ --ui-danger-bg: #fef2f2;
55
+ --ui-danger-fg: #b91c1c;
56
+ --ui-danger-border: #fca5a5;
57
+ --ui-success-bg: #ecfdf5;
58
+ --ui-success-fg: #065f46;
59
+ --ui-success-border: #a7f3d0;
60
+
61
+ /* Emergency */
62
+ --ui-emergency: #b91c1c;
63
+ --ui-emergency-fg: #ffffff;
64
+
65
+ /* Focus */
66
+ --ui-focus: #047857;
67
+ --ui-focus-offset: #ffffff;
68
+
69
+ /* Member Identity */
70
+ --ui-member-1-bg: #d1fae5;
71
+ --ui-member-1-fg: #065f46;
72
+ --ui-member-2-bg: #ede9fe;
73
+ --ui-member-2-fg: #5b21b6;
74
+ --ui-member-3-bg: #fef3c7;
75
+ --ui-member-3-fg: #92400e;
76
+ --ui-member-4-bg: #e0f2fe;
77
+ --ui-member-4-fg: #075985;
78
+ --ui-member-5-bg: #ffe4e6;
79
+ --ui-member-5-fg: #9f1239;
80
+
81
+ /* Scope Domains */
82
+ --ui-scope-health-bg: #ecfdf5;
83
+ --ui-scope-health-fg: #065f46;
84
+ --ui-scope-finance-bg: #ecfeff;
85
+ --ui-scope-finance-fg: #0e7490;
86
+ --ui-scope-education-bg: #fdf4ff;
87
+ --ui-scope-education-fg: #86198f;
88
+ --ui-scope-household-bg: #fffbeb;
89
+ --ui-scope-household-fg: #92400e;
90
+
91
+ /* Risk Tiers */
92
+ --ui-risk-low-bg: #ecfdf5;
93
+ --ui-risk-low-fg: #065f46;
94
+ --ui-risk-low-border: #a7f3d0;
95
+ --ui-risk-medium-bg: #fffbeb;
96
+ --ui-risk-medium-fg: #92400e;
97
+ --ui-risk-medium-border: #fcd34d;
98
+ --ui-risk-high-bg: #fff7ed;
99
+ --ui-risk-high-fg: #c2410c;
100
+ --ui-risk-high-border: #fdba74;
101
+ --ui-risk-critical-bg: #fef2f2;
102
+ --ui-risk-critical-fg: #b91c1c;
103
+ --ui-risk-critical-border: #fca5a5;
104
+
105
+ /* Typography */
106
+ --ui-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
107
+ --ui-font-display: Fraunces, 'Iowan Old Style', Georgia, serif;
108
+ --ui-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
109
+ --ui-text-xs: 0.75rem;
110
+ --ui-leading-xs: 1rem;
111
+ --ui-text-sm: 0.875rem;
112
+ --ui-leading-sm: 1.25rem;
113
+ --ui-text-md: 1rem;
114
+ --ui-leading-md: 1.5rem;
115
+ --ui-text-lg: 1.125rem;
116
+ --ui-leading-lg: 1.75rem;
117
+ --ui-text-xl: 1.25rem;
118
+ --ui-leading-xl: 1.75rem;
119
+ --ui-text-2xl: 1.5rem;
120
+ --ui-leading-2xl: 2rem;
121
+ --ui-text-3xl: 1.875rem;
122
+ --ui-leading-3xl: 2.25rem;
123
+ --ui-text-4xl: 2.25rem;
124
+ --ui-leading-4xl: 2.5rem;
125
+ --ui-weight-regular: 400;
126
+ --ui-weight-medium: 500;
127
+ --ui-weight-semibold: 600;
128
+ --ui-weight-bold: 700;
129
+
130
+ /* Spacing */
131
+ --ui-space-0: 0px;
132
+ --ui-space-1: 4px;
133
+ --ui-space-2: 8px;
134
+ --ui-space-3: 12px;
135
+ --ui-space-4: 16px;
136
+ --ui-space-5: 20px;
137
+ --ui-space-6: 24px;
138
+ --ui-space-8: 32px;
139
+ --ui-space-10: 40px;
140
+ --ui-space-12: 48px;
141
+ --ui-space-16: 64px;
142
+
143
+ /* Radius */
144
+ --ui-radius-sm: 6px;
145
+ --ui-radius-md: 10px;
146
+ --ui-radius-lg: 14px;
147
+ --ui-radius-xl: 20px;
148
+ --ui-radius-full: 9999px;
149
+
150
+ /* Shadow */
151
+ --ui-shadow-0: none;
152
+ --ui-shadow-1: 0 1px 2px rgb(15 23 42 / 0.04), 0 1px 1px rgb(15 23 42 / 0.03);
153
+ --ui-shadow-2: 0 4px 12px -2px rgb(15 23 42 / 0.08), 0 2px 4px -2px rgb(15 23 42 / 0.05);
154
+ --ui-shadow-3: 0 20px 40px -12px rgb(15 23 42 / 0.20);
155
+
156
+ /* Sizing and Layout */
157
+ --ui-tap: 44px;
158
+ --ui-rail-w: 256px;
159
+ --ui-content-max: 1120px;
160
+ --ui-content-wide: 1280px;
161
+ --ui-topbar-h: 56px;
162
+ --ui-tabbar-h: 64px;
163
+
164
+ /* Motion */
165
+ --ui-ease: cubic-bezier(0.2, 0, 0, 1);
166
+ --ui-duration-fast: 120ms;
167
+ --ui-duration-base: 200ms;
168
+ --ui-duration-slow: 320ms;
169
+
170
+ /* Z-Index */
171
+ --ui-z-rail: 20;
172
+ --ui-z-sticky: 30;
173
+ --ui-z-popover: 40;
174
+ --ui-z-modal: 50;
175
+ --ui-z-toast: 60;
176
+ --ui-z-skip: 70;
177
+ }
178
+
179
+ [data-theme="dark"], .dark {
180
+ color-scheme: dark;
181
+
182
+ /* Surfaces */
183
+ --ui-canvas: #0b1220;
184
+ --ui-surface: #111a2b;
185
+ --ui-surface-2: #16213a;
186
+ --ui-surface-3: #1d2a45;
187
+ --ui-rail: #0e1726;
188
+ --ui-overlay: rgba(2, 6, 23, 0.60);
189
+
190
+ /* Text */
191
+ --ui-fg: #e2e8f0;
192
+ --ui-fg-muted: #94a3b8;
193
+ --ui-fg-subtle: #8291a7;
194
+ --ui-fg-on-primary: #04201a;
195
+ --ui-fg-link: #34d399;
196
+
197
+ /* Lines / Borders */
198
+ --ui-border: #1f2c44;
199
+ --ui-border-strong: #5b6e8a;
200
+
201
+ /* Primary Action */
202
+ --ui-primary: #10b981;
203
+ --ui-primary-hover: #34d399;
204
+ --ui-primary-fg: #04201a;
205
+ --ui-primary-soft: rgba(16, 185, 129, 0.12);
206
+ --ui-primary-soft-fg: #6ee7b7;
207
+
208
+ /* Status */
209
+ --ui-info-bg: rgba(99, 102, 241, 0.14);
210
+ --ui-info-fg: #c7d2fe;
211
+ --ui-info-border: rgba(129, 140, 248, 0.35);
212
+ --ui-warn-bg: rgba(245, 158, 11, 0.12);
213
+ --ui-warn-fg: #fcd34d;
214
+ --ui-warn-border: rgba(245, 158, 11, 0.35);
215
+ --ui-danger-bg: rgba(239, 68, 68, 0.12);
216
+ --ui-danger-fg: #fca5a5;
217
+ --ui-danger-border: rgba(239, 68, 68, 0.35);
218
+ --ui-success-bg: rgba(16, 185, 129, 0.12);
219
+ --ui-success-fg: #6ee7b7;
220
+ --ui-success-border: rgba(16, 185, 129, 0.35);
221
+
222
+ /* Emergency */
223
+ --ui-emergency: #b91c1c;
224
+ --ui-emergency-fg: #ffffff;
225
+
226
+ /* Focus */
227
+ --ui-focus: #34d399;
228
+ --ui-focus-offset: #0b1220;
229
+
230
+ /* Member Identity */
231
+ --ui-member-1-bg: #064e3b;
232
+ --ui-member-1-fg: #a7f3d0;
233
+ --ui-member-2-bg: #3b2a6e;
234
+ --ui-member-2-fg: #ddd6fe;
235
+ --ui-member-3-bg: #5a3410;
236
+ --ui-member-3-fg: #fde68a;
237
+ --ui-member-4-bg: #0c3a55;
238
+ --ui-member-4-fg: #bae6fd;
239
+ --ui-member-5-bg: #5b1426;
240
+ --ui-member-5-fg: #fecdd3;
241
+
242
+ /* Scope Domains */
243
+ --ui-scope-health-bg: rgba(16, 185, 129, 0.15);
244
+ --ui-scope-health-fg: #6ee7b7;
245
+ --ui-scope-finance-bg: rgba(6, 182, 212, 0.15);
246
+ --ui-scope-finance-fg: #67e8f9;
247
+ --ui-scope-education-bg: rgba(217, 70, 239, 0.15);
248
+ --ui-scope-education-fg: #f0abfc;
249
+ --ui-scope-household-bg: rgba(245, 158, 11, 0.15);
250
+ --ui-scope-household-fg: #fde68a;
251
+
252
+ /* Risk Tiers */
253
+ --ui-risk-low-bg: rgba(16, 185, 129, 0.12);
254
+ --ui-risk-low-fg: #6ee7b7;
255
+ --ui-risk-low-border: rgba(16, 185, 129, 0.35);
256
+ --ui-risk-medium-bg: rgba(245, 158, 11, 0.12);
257
+ --ui-risk-medium-fg: #fcd34d;
258
+ --ui-risk-medium-border: rgba(245, 158, 11, 0.35);
259
+ --ui-risk-high-bg: rgba(249, 115, 22, 0.12);
260
+ --ui-risk-high-fg: #fdba74;
261
+ --ui-risk-high-border: rgba(249, 115, 22, 0.35);
262
+ --ui-risk-critical-bg: rgba(239, 68, 68, 0.12);
263
+ --ui-risk-critical-fg: #fca5a5;
264
+ --ui-risk-critical-border: rgba(239, 68, 68, 0.35);
265
+
266
+ /* Dark Shadows */
267
+ --ui-shadow-1: 0 1px 2px rgb(0 0 0 / 0.30);
268
+ --ui-shadow-2: 0 8px 20px -4px rgb(0 0 0 / 0.50);
269
+ --ui-shadow-3: 0 24px 48px -12px rgb(0 0 0 / 0.60);
270
+ }
@@ -0,0 +1,3 @@
1
+ import '../types-CP_CDg6G.js';
2
+ export { f as createMockChatMessage, g as createMockProfile, h as createMockSlotContribution } from '../index-DLbrj3Po.js';
3
+ import 'react';
@@ -0,0 +1,36 @@
1
+ // src/testing/index.ts
2
+ function createMockSlotContribution(overrides) {
3
+ return {
4
+ id: "test-slot-1",
5
+ pack: "test-pack",
6
+ slot: "dashboard.card",
7
+ title: "Test Card",
8
+ requiredScopes: ["general"],
9
+ order: 10,
10
+ ...overrides
11
+ };
12
+ }
13
+ function createMockProfile(overrides) {
14
+ return {
15
+ id: "profile-1",
16
+ displayName: "Primary User",
17
+ role: "owner",
18
+ scopes: ["general", "notes", "calendar"],
19
+ ...overrides
20
+ };
21
+ }
22
+ function createMockChatMessage(overrides) {
23
+ return {
24
+ id: "msg-1",
25
+ role: "user",
26
+ content: "Hello, world!",
27
+ createdAt: "12:00 PM",
28
+ ...overrides
29
+ };
30
+ }
31
+ export {
32
+ createMockChatMessage,
33
+ createMockProfile,
34
+ createMockSlotContribution
35
+ };
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/testing/index.ts"],"sourcesContent":["// Yarvelle Core — Domain-Neutral AI Agent Runtime & Execution Engine\n// Copyright 2026 Spectrayan (https://spectrayan.com)\n//\n// Licensed under the PolyForm Noncommercial License 1.0.0 and the\n// Yarvelle Core Additional Terms (see LICENSE and ADDITIONAL-TERMS.md).\n// Personal and household local use only. Commercial use, hosted service\n// offering, rebranding, white-labeling, and redistribution of modified\n// forks are prohibited without a written commercial license from Spectrayan.\n//\n// Required Notice: Copyright 2026 Spectrayan (https://spectrayan.com)\n\nimport * as React from 'react';\nimport type { SlotContribution, SlotProps } from '../slots/types.js';\nimport type { ProfileMember } from '../profiles/types.js';\nimport type { ChatMessage } from '../chat/types.js';\n\nexport function createMockSlotContribution(\n overrides?: Partial<SlotContribution>\n): SlotContribution {\n return {\n id: 'test-slot-1',\n pack: 'test-pack',\n slot: 'dashboard.card',\n title: 'Test Card',\n requiredScopes: ['general'],\n order: 10,\n ...overrides,\n };\n}\n\nexport function createMockProfile(\n overrides?: Partial<ProfileMember>\n): ProfileMember {\n return {\n id: 'profile-1',\n displayName: 'Primary User',\n role: 'owner',\n scopes: ['general', 'notes', 'calendar'],\n ...overrides,\n };\n}\n\nexport function createMockChatMessage(\n overrides?: Partial<ChatMessage>\n): ChatMessage {\n return {\n id: 'msg-1',\n role: 'user',\n content: 'Hello, world!',\n createdAt: '12:00 PM',\n ...overrides,\n };\n}\n"],"mappings":";AAgBO,SAAS,2BACd,WACkB;AAClB,SAAO;AAAA,IACL,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,gBAAgB,CAAC,SAAS;AAAA,IAC1B,OAAO;AAAA,IACP,GAAG;AAAA,EACL;AACF;AAEO,SAAS,kBACd,WACe;AACf,SAAO;AAAA,IACL,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,MAAM;AAAA,IACN,QAAQ,CAAC,WAAW,SAAS,UAAU;AAAA,IACvC,GAAG;AAAA,EACL;AACF;AAEO,SAAS,sBACd,WACa;AACb,SAAO;AAAA,IACL,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,WAAW;AAAA,IACX,GAAG;AAAA,EACL;AACF;","names":[]}
@@ -0,0 +1,37 @@
1
+ export { default, default as yarvellePreset } from './tailwind-preset.js';
2
+ import 'tailwindcss';
3
+
4
+ // Yarvelle Core — Domain-Neutral AI Agent Runtime & Execution Engine
5
+ // Copyright 2026 Spectrayan (https://spectrayan.com)
6
+ //
7
+ // Licensed under the PolyForm Noncommercial License 1.0.0 and the
8
+ // Yarvelle Core Additional Terms (see LICENSE and ADDITIONAL-TERMS.md).
9
+ // Personal and household local use only. Commercial use, hosted service
10
+ // offering, rebranding, white-labeling, and redistribution of modified
11
+ // forks are prohibited without a written commercial license from Spectrayan.
12
+ //
13
+ // Required Notice: Copyright 2026 Spectrayan (https://spectrayan.com)
14
+
15
+ // Emitted automatically by scripts/build-tokens.mjs — DO NOT EDIT DIRECTLY
16
+
17
+ type UiColorToken =
18
+ | "canvas" | "surface" | "surface-2" | "surface-3" | "rail" | "overlay"
19
+ | "fg" | "fg-muted" | "fg-subtle" | "fg-on-primary" | "fg-link"
20
+ | "border" | "border-strong"
21
+ | "primary" | "primary-hover" | "primary-fg" | "primary-soft" | "primary-soft-fg"
22
+ | "info-bg" | "info-fg" | "info-border"
23
+ | "warn-bg" | "warn-fg" | "warn-border"
24
+ | "danger-bg" | "danger-fg" | "danger-border"
25
+ | "success-bg" | "success-fg" | "success-border"
26
+ | "emergency" | "emergency-fg" | "focus" | "focus-offset"
27
+ | "member-1-bg" | "member-1-fg" | "member-2-bg" | "member-2-fg" | "member-3-bg" | "member-3-fg" | "member-4-bg" | "member-4-fg" | "member-5-bg" | "member-5-fg"
28
+ | "scope-health-bg" | "scope-health-fg" | "scope-finance-bg" | "scope-finance-fg" | "scope-education-bg" | "scope-education-fg" | "scope-household-bg" | "scope-household-fg"
29
+ | "risk-low-bg" | "risk-low-fg" | "risk-low-border" | "risk-medium-bg" | "risk-medium-fg" | "risk-medium-border" | "risk-high-bg" | "risk-high-fg" | "risk-high-border" | "risk-critical-bg" | "risk-critical-fg" | "risk-critical-border";
30
+
31
+ type UiSpaceToken = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "8" | "10" | "12" | "16";
32
+ type UiRadiusToken = "sm" | "md" | "lg" | "xl" | "full";
33
+ type UiShadowToken = "0" | "1" | "2" | "3";
34
+ type UiTextSizeToken = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl";
35
+ type UiZIndexToken = "rail" | "sticky" | "popover" | "modal" | "toast" | "skip";
36
+
37
+ export type { UiColorToken, UiRadiusToken, UiShadowToken, UiSpaceToken, UiTextSizeToken, UiZIndexToken };