@nice2dev/ui-core 1.0.10

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 (107) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/README.md +62 -0
  3. package/dist/core/NiceInlineHelp.d.ts +69 -0
  4. package/dist/core/NiceInlineHelp.d.ts.map +1 -0
  5. package/dist/core/NiceThemeProvider.d.ts +31 -0
  6. package/dist/core/NiceThemeProvider.d.ts.map +1 -0
  7. package/dist/core/NiceThemeVariants.d.ts +55 -0
  8. package/dist/core/NiceThemeVariants.d.ts.map +1 -0
  9. package/dist/core/NiceUserPreferences.d.ts +304 -0
  10. package/dist/core/NiceUserPreferences.d.ts.map +1 -0
  11. package/dist/core/a11y-advanced.d.ts +157 -0
  12. package/dist/core/a11y-advanced.d.ts.map +1 -0
  13. package/dist/core/a11y.d.ts +299 -0
  14. package/dist/core/a11y.d.ts.map +1 -0
  15. package/dist/core/access-control.d.ts +59 -0
  16. package/dist/core/access-control.d.ts.map +1 -0
  17. package/dist/core/adapters.d.ts +178 -0
  18. package/dist/core/adapters.d.ts.map +1 -0
  19. package/dist/core/ai.d.ts +191 -0
  20. package/dist/core/ai.d.ts.map +1 -0
  21. package/dist/core/animations.d.ts +48 -0
  22. package/dist/core/animations.d.ts.map +1 -0
  23. package/dist/core/colorBlind.d.ts +22 -0
  24. package/dist/core/colorBlind.d.ts.map +1 -0
  25. package/dist/core/datasource-advanced.d.ts +261 -0
  26. package/dist/core/datasource-advanced.d.ts.map +1 -0
  27. package/dist/core/datasource-aggregation.d.ts +221 -0
  28. package/dist/core/datasource-aggregation.d.ts.map +1 -0
  29. package/dist/core/datasource-hooks.d.ts +93 -0
  30. package/dist/core/datasource-hooks.d.ts.map +1 -0
  31. package/dist/core/datasource-offline.d.ts +201 -0
  32. package/dist/core/datasource-offline.d.ts.map +1 -0
  33. package/dist/core/datasource.d.ts +181 -0
  34. package/dist/core/datasource.d.ts.map +1 -0
  35. package/dist/core/displayMode.d.ts +46 -0
  36. package/dist/core/displayMode.d.ts.map +1 -0
  37. package/dist/core/displayStyle.d.ts +79 -0
  38. package/dist/core/displayStyle.d.ts.map +1 -0
  39. package/dist/core/helpContext.d.ts +97 -0
  40. package/dist/core/helpContext.d.ts.map +1 -0
  41. package/dist/core/hooks.d.ts +149 -0
  42. package/dist/core/hooks.d.ts.map +1 -0
  43. package/dist/core/i18n.d.ts +10 -0
  44. package/dist/core/i18n.d.ts.map +1 -0
  45. package/dist/core/i18nDictionaries.d.ts +4 -0
  46. package/dist/core/i18nDictionaries.d.ts.map +1 -0
  47. package/dist/core/icons.d.ts +45 -0
  48. package/dist/core/icons.d.ts.map +1 -0
  49. package/dist/core/icuMessageFormat.d.ts +10 -0
  50. package/dist/core/icuMessageFormat.d.ts.map +1 -0
  51. package/dist/core/leak-detector.d.ts +263 -0
  52. package/dist/core/leak-detector.d.ts.map +1 -0
  53. package/dist/core/omniverkTypes.d.ts +164 -0
  54. package/dist/core/omniverkTypes.d.ts.map +1 -0
  55. package/dist/core/pluginSystem.d.ts +97 -0
  56. package/dist/core/pluginSystem.d.ts.map +1 -0
  57. package/dist/core/profiling.d.ts +276 -0
  58. package/dist/core/profiling.d.ts.map +1 -0
  59. package/dist/core/responsive.d.ts +107 -0
  60. package/dist/core/responsive.d.ts.map +1 -0
  61. package/dist/core/rtl.d.ts +47 -0
  62. package/dist/core/rtl.d.ts.map +1 -0
  63. package/dist/core/sanitizeHtml.d.ts +16 -0
  64. package/dist/core/sanitizeHtml.d.ts.map +1 -0
  65. package/dist/core/testing.d.ts +107 -0
  66. package/dist/core/testing.d.ts.map +1 -0
  67. package/dist/core/theme.d.ts +213 -0
  68. package/dist/core/theme.d.ts.map +1 -0
  69. package/dist/core/themeGallery.d.ts +104 -0
  70. package/dist/core/themeGallery.d.ts.map +1 -0
  71. package/dist/core/themePacks.d.ts +53 -0
  72. package/dist/core/themePacks.d.ts.map +1 -0
  73. package/dist/core/themePacksExtended.d.ts +59 -0
  74. package/dist/core/themePacksExtended.d.ts.map +1 -0
  75. package/dist/core/themePresets.d.ts +10 -0
  76. package/dist/core/themePresets.d.ts.map +1 -0
  77. package/dist/core/themeVariants.d.ts +204 -0
  78. package/dist/core/themeVariants.d.ts.map +1 -0
  79. package/dist/core/touch.d.ts +208 -0
  80. package/dist/core/touch.d.ts.map +1 -0
  81. package/dist/core/traceless.d.ts +461 -0
  82. package/dist/core/traceless.d.ts.map +1 -0
  83. package/dist/core/types.d.ts +105 -0
  84. package/dist/core/types.d.ts.map +1 -0
  85. package/dist/core/useThemeIsDark.d.ts +15 -0
  86. package/dist/core/useThemeIsDark.d.ts.map +1 -0
  87. package/dist/index.cjs +128 -0
  88. package/dist/index.cjs.map +1 -0
  89. package/dist/index.d.ts +49 -0
  90. package/dist/index.d.ts.map +1 -0
  91. package/dist/index.mjs +16881 -0
  92. package/dist/index.mjs.map +1 -0
  93. package/dist/performance/concurrent.d.ts +190 -0
  94. package/dist/performance/concurrent.d.ts.map +1 -0
  95. package/dist/performance/images.d.ts +189 -0
  96. package/dist/performance/images.d.ts.map +1 -0
  97. package/dist/performance/index.d.ts +17 -0
  98. package/dist/performance/index.d.ts.map +1 -0
  99. package/dist/performance/memory.d.ts +223 -0
  100. package/dist/performance/memory.d.ts.map +1 -0
  101. package/dist/performance/virtualization.d.ts +166 -0
  102. package/dist/performance/virtualization.d.ts.map +1 -0
  103. package/dist/performance/workers.d.ts +125 -0
  104. package/dist/performance/workers.d.ts.map +1 -0
  105. package/dist/viewSchema.d.ts +81 -0
  106. package/dist/viewSchema.d.ts.map +1 -0
  107. package/package.json +61 -0
@@ -0,0 +1,461 @@
1
+ /**
2
+ * @fileoverview Traceless™ — Zero-Trace Privacy Architecture
3
+ * @module @nice2dev/ui/core/traceless
4
+ *
5
+ * Traceless™ is OmniVerk's flagship privacy feature that allows complete control
6
+ * over client-side storage (cookies, localStorage, sessionStorage).
7
+ *
8
+ * "Żadnych śladów. Żadnych cookies. Żadnego localStorage. Żadnego bannera. Traceless."
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * import { TracelessProvider, useTracelessPolicy, StorageAdapter } from '@nice2dev/ui';
13
+ *
14
+ * // In your app root:
15
+ * <TracelessProvider>
16
+ * <App />
17
+ * </TracelessProvider>
18
+ *
19
+ * // In components:
20
+ * const { mode, canUseCookies, canUseLocalStorage } = useTracelessPolicy();
21
+ * const storage = useStorageAdapter();
22
+ * storage.set('key', 'value'); // Automatically respects policy
23
+ * ```
24
+ */
25
+ /**
26
+ * Privacy storage modes from most private to most permissive.
27
+ *
28
+ * | Mode | Cookies | localStorage | sessionStorage | Consent Banner |
29
+ * |------------|---------|--------------|----------------|----------------|
30
+ * | traceless | ❌ | ❌ | ❌ | ❌ Never |
31
+ * | ephemeral | ❌ | ❌ | ✅ | ❌ Never |
32
+ * | private | 1 auth | ❌ | ✅ | ❌ Exempt |
33
+ * | balanced | ❌ | ✅ | ✅ | ⚠️ Maybe |
34
+ * | full | ✅ | ✅ | ✅ | ✅ Required |
35
+ * | custom | Config | Config | Config | Config |
36
+ */
37
+ export type TracelessMode = 'traceless' | 'ephemeral' | 'private' | 'balanced' | 'full' | 'custom';
38
+ /**
39
+ * Per-control storage mode configuration.
40
+ */
41
+ export type ControlStorageMode = 'traceless' | 'ephemeral' | 'persistent' | 'auto';
42
+ /**
43
+ * Main policy interface for Traceless system.
44
+ * Three independent flags for granular control.
45
+ */
46
+ export interface ITracelessPolicy {
47
+ /** Whether cookies are allowed (any cookies) */
48
+ cookiesAllowed: boolean;
49
+ /** Whether localStorage is allowed */
50
+ localStorageAllowed: boolean;
51
+ /** Whether sessionStorage is allowed */
52
+ sessionStorageAllowed: boolean;
53
+ /** Whether only strictly necessary auth cookie is allowed (httpOnly) */
54
+ strictAuthCookieOnly: boolean;
55
+ /** The effective mode derived from flags */
56
+ effectiveMode: TracelessMode;
57
+ /** Source of the policy (instance, tenant, group, user) */
58
+ source: TracelessPolicySource;
59
+ /** Whether consent banner should be shown */
60
+ requiresConsentBanner: boolean;
61
+ /** Timestamp when policy was resolved */
62
+ resolvedAt: number;
63
+ /** Policy version for cache invalidation */
64
+ version: string;
65
+ }
66
+ /**
67
+ * Source hierarchy for policy resolution.
68
+ * Lower sources cannot exceed permissions of higher sources.
69
+ */
70
+ export type TracelessPolicySource = 'instance' | 'tenant' | 'group' | 'user' | 'control' | 'default';
71
+ /**
72
+ * Instance-level ceiling configuration.
73
+ * Sets the maximum permissions any tenant/user can have.
74
+ */
75
+ export interface TracelessInstanceCeiling {
76
+ /** Maximum cookie permission for all tenants */
77
+ maxCookies: boolean;
78
+ /** Maximum localStorage permission for all tenants */
79
+ maxLocalStorage: boolean;
80
+ /** Maximum sessionStorage permission for all tenants */
81
+ maxSessionStorage: boolean;
82
+ /** Instance-wide default mode */
83
+ defaultMode: TracelessMode;
84
+ /** Allow tenants to override? */
85
+ allowTenantOverride: boolean;
86
+ /** Instance ID for audit */
87
+ instanceId: string;
88
+ }
89
+ /**
90
+ * Tenant-level policy configuration.
91
+ */
92
+ export interface TracelessTenantPolicy {
93
+ tenantId: string;
94
+ /** Policy mode (cannot exceed instance ceiling) */
95
+ mode: TracelessMode;
96
+ /** Custom overrides */
97
+ customPolicy?: Partial<ITracelessPolicy>;
98
+ /** Allow user groups to override? */
99
+ allowGroupOverride: boolean;
100
+ /** Allow individual users to override? */
101
+ allowUserOverride: boolean;
102
+ /** Last updated timestamp */
103
+ updatedAt: number;
104
+ /** Updated by user ID */
105
+ updatedBy?: string;
106
+ }
107
+ /**
108
+ * User group policy.
109
+ */
110
+ export interface TracelessGroupPolicy {
111
+ groupId: string;
112
+ tenantId: string;
113
+ /** Policy mode (cannot exceed tenant policy) */
114
+ mode: TracelessMode;
115
+ /** Allow users in this group to self-lockdown? */
116
+ allowUserLockdown: boolean;
117
+ }
118
+ /**
119
+ * User self-lockdown configuration.
120
+ * Users can only INCREASE privacy, never decrease it.
121
+ */
122
+ export interface TracelessUserPreference {
123
+ userId: string;
124
+ /** User's preferred mode (must be >= group mode in privacy) */
125
+ preferredMode: TracelessMode;
126
+ /** Explicit overrides (can only restrict, not permit) */
127
+ restrictCookies?: boolean;
128
+ restrictLocalStorage?: boolean;
129
+ restrictSessionStorage?: boolean;
130
+ /** When user set this preference */
131
+ setAt: number;
132
+ }
133
+ /**
134
+ * Module storage requirements declaration.
135
+ */
136
+ export interface ModuleStorageRequirement {
137
+ moduleId: string;
138
+ moduleName: string;
139
+ /** Minimum required for full functionality */
140
+ minSessionStorage: boolean;
141
+ minLocalStorage: boolean;
142
+ minCookies: boolean;
143
+ /** Features that degrade without storage */
144
+ degradedFeatures: DegradedFeature[];
145
+ }
146
+ /**
147
+ * Feature degradation info for UX warnings.
148
+ */
149
+ export interface DegradedFeature {
150
+ featureId: string;
151
+ featureName: string;
152
+ /** What's affected */
153
+ degradationType: 'disabled' | 'limited' | 'no-persistence' | 'reset-on-refresh';
154
+ /** User-friendly message */
155
+ userMessage: string;
156
+ /** Locale key for i18n */
157
+ messageKey: string;
158
+ }
159
+ /**
160
+ * Audit entry for policy changes.
161
+ */
162
+ export interface TracelessAuditEntry {
163
+ id: string;
164
+ timestamp: number;
165
+ action: 'policy_changed' | 'user_lockdown' | 'admin_override' | 'api_access';
166
+ actorId: string;
167
+ actorType: 'system' | 'admin' | 'user';
168
+ previousMode?: TracelessMode;
169
+ newMode?: TracelessMode;
170
+ previousPolicy?: Partial<ITracelessPolicy>;
171
+ newPolicy?: Partial<ITracelessPolicy>;
172
+ ipAddress?: string;
173
+ userAgent?: string;
174
+ reason?: string;
175
+ source: TracelessPolicySource;
176
+ tenantId?: string;
177
+ groupId?: string;
178
+ userId?: string;
179
+ }
180
+ /**
181
+ * Default policy - most private out of the box (traceless).
182
+ */
183
+ export declare const DEFAULT_TRACELESS_POLICY: ITracelessPolicy;
184
+ /**
185
+ * Policy presets for each mode.
186
+ */
187
+ export declare const TRACELESS_MODE_PRESETS: Record<TracelessMode, Omit<ITracelessPolicy, 'source' | 'resolvedAt' | 'version'>>;
188
+ /**
189
+ * Privacy level ordering (lower index = more private).
190
+ */
191
+ export declare const PRIVACY_LEVEL_ORDER: TracelessMode[];
192
+ /**
193
+ * Compares two modes and returns the more private one.
194
+ */
195
+ export declare function getMorePrivateMode(a: TracelessMode, b: TracelessMode): TracelessMode;
196
+ /**
197
+ * Checks if mode A is at least as private as mode B.
198
+ */
199
+ export declare function isAtLeastAsPrivate(a: TracelessMode, b: TracelessMode): boolean;
200
+ /**
201
+ * Resolves effective policy from hierarchy.
202
+ * Instance ceiling → Tenant policy → Group policy → User preference
203
+ */
204
+ export declare function resolveTracelessPolicy(instanceCeiling: TracelessInstanceCeiling, tenantPolicy?: TracelessTenantPolicy, groupPolicy?: TracelessGroupPolicy, userPreference?: TracelessUserPreference): ITracelessPolicy;
205
+ /**
206
+ * Derives the effective mode from policy flags.
207
+ */
208
+ export declare function deriveMode(policy: Pick<ITracelessPolicy, 'cookiesAllowed' | 'localStorageAllowed' | 'sessionStorageAllowed' | 'strictAuthCookieOnly'>): TracelessMode;
209
+ /**
210
+ * Determines if consent banner should be shown.
211
+ */
212
+ export declare function shouldShowConsentBanner(policy: ITracelessPolicy): boolean;
213
+ /**
214
+ * Storage backend type.
215
+ */
216
+ export type StorageBackendType = 'memory' | 'session' | 'local';
217
+ /**
218
+ * Unified storage adapter that respects Traceless policy.
219
+ * Gracefully degrades based on what's available.
220
+ */
221
+ export declare class StorageAdapter {
222
+ private policy;
223
+ private namespace;
224
+ private defaultBackend;
225
+ constructor(policy: ITracelessPolicy, namespace?: string, defaultBackend?: StorageBackendType);
226
+ /**
227
+ * Gets the appropriate storage backend based on policy.
228
+ */
229
+ private getBackend;
230
+ /**
231
+ * Gets the prefixed key.
232
+ */
233
+ private getKey;
234
+ /**
235
+ * Gets a value from storage.
236
+ */
237
+ get<T = string>(key: string, preferredBackend?: StorageBackendType): T | null;
238
+ /**
239
+ * Sets a value in storage.
240
+ * Silently no-ops if storage is not available (graceful degradation).
241
+ */
242
+ set(key: string, value: unknown, preferredBackend?: StorageBackendType): boolean;
243
+ /**
244
+ * Removes a value from storage.
245
+ */
246
+ remove(key: string, preferredBackend?: StorageBackendType): boolean;
247
+ /**
248
+ * Clears all namespaced values from storage.
249
+ */
250
+ clear(preferredBackend?: StorageBackendType): void;
251
+ /**
252
+ * Gets all keys in the namespace.
253
+ */
254
+ keys(preferredBackend?: StorageBackendType): string[];
255
+ /**
256
+ * Checks if a key exists.
257
+ */
258
+ has(key: string, preferredBackend?: StorageBackendType): boolean;
259
+ /**
260
+ * Gets info about current storage capabilities.
261
+ */
262
+ getCapabilities(): StorageCapabilities;
263
+ /**
264
+ * Gets the actual backend type being used.
265
+ */
266
+ private getActualBackendType;
267
+ /**
268
+ * Updates the policy (e.g., after user changes preferences).
269
+ */
270
+ updatePolicy(policy: ITracelessPolicy): void;
271
+ }
272
+ /**
273
+ * Storage capabilities info.
274
+ */
275
+ export interface StorageCapabilities {
276
+ canUseCookies: boolean;
277
+ canUseLocalStorage: boolean;
278
+ canUseSessionStorage: boolean;
279
+ canPersist: boolean;
280
+ effectiveMode: TracelessMode;
281
+ actualBackend: StorageBackendType;
282
+ }
283
+ /**
284
+ * Props for traceless-aware controls.
285
+ */
286
+ export interface TracelessControlProps {
287
+ /**
288
+ * Whether this control can use cookies.
289
+ * Can only restrict (false), not permit (true) if policy forbids.
290
+ * @default false
291
+ */
292
+ cookies?: boolean;
293
+ /**
294
+ * Whether this control can use localStorage.
295
+ * Can only restrict (false), not permit (true) if policy forbids.
296
+ * @default false
297
+ */
298
+ localStorage?: boolean;
299
+ /**
300
+ * Storage mode shorthand.
301
+ * - 'traceless': All storage off
302
+ * - 'ephemeral': sessionStorage only
303
+ * - 'persistent': localStorage OK
304
+ * - 'auto': Respect global policy (default)
305
+ * @default 'auto'
306
+ */
307
+ storageMode?: ControlStorageMode;
308
+ }
309
+ /**
310
+ * Resolves control-level storage permissions.
311
+ */
312
+ export declare function resolveControlStoragePermissions(globalPolicy: ITracelessPolicy, controlProps: TracelessControlProps): ITracelessPolicy;
313
+ /**
314
+ * Generates a compliance report for the current traceless configuration.
315
+ */
316
+ export declare function generateTracelessComplianceReport(policy: ITracelessPolicy, instanceId: string, tenantId?: string): TracelessComplianceReport;
317
+ /**
318
+ * Compliance report structure.
319
+ */
320
+ export interface TracelessComplianceReport {
321
+ generatedAt: string;
322
+ instanceId: string;
323
+ tenantId?: string;
324
+ effectiveMode: TracelessMode;
325
+ cookies: {
326
+ count: number;
327
+ allowed: boolean;
328
+ strictAuthOnly: boolean;
329
+ thirdParty: boolean;
330
+ tracking: boolean;
331
+ };
332
+ localStorage: {
333
+ bytesUsed: number;
334
+ allowed: boolean;
335
+ keysCount: number;
336
+ };
337
+ sessionStorage: {
338
+ bytesUsed: number;
339
+ allowed: boolean;
340
+ keysCount: number;
341
+ };
342
+ consentBanner: {
343
+ required: boolean;
344
+ shown: boolean;
345
+ };
346
+ compliance: {
347
+ ePrivacyCompliant: boolean;
348
+ gdprCompliant: boolean;
349
+ pecrCompliant: boolean;
350
+ };
351
+ statement: string;
352
+ }
353
+ /**
354
+ * Badge display info for TracelessBadge component.
355
+ */
356
+ export interface TracelessBadgeInfo {
357
+ mode: TracelessMode;
358
+ icon: string;
359
+ color: string;
360
+ label: string;
361
+ tooltip: string;
362
+ cssClass: string;
363
+ }
364
+ /**
365
+ * Gets badge display info for the current mode.
366
+ */
367
+ export declare function getTracelessBadgeInfo(policy: ITracelessPolicy): TracelessBadgeInfo;
368
+ /**
369
+ * Graceful degradation information for components.
370
+ */
371
+ export interface GracefulDegradationInfo {
372
+ /** Whether persistence is available */
373
+ canPersist: boolean;
374
+ /** Whether session storage is available */
375
+ canSession: boolean;
376
+ /** Warning message to show (if any) */
377
+ warningMessage?: string;
378
+ /** Locale key for warning */
379
+ warningKey?: string;
380
+ }
381
+ /**
382
+ * Gets graceful degradation info for a specific use case.
383
+ */
384
+ export declare function getGracefulDegradationInfo(policy: ITracelessPolicy, useCase: 'preferences' | 'draft' | 'history' | 'auth' | 'grid-state'): GracefulDegradationInfo;
385
+ /**
386
+ * HTTP header name for storage policy.
387
+ */
388
+ export declare const TRACELESS_POLICY_HEADER = "X-OmniVerk-Storage-Policy";
389
+ /**
390
+ * Parses policy from HTTP header.
391
+ */
392
+ export declare function parsePolicyFromHeader(headerValue: string): TracelessMode | null;
393
+ /**
394
+ * Creates policy header value.
395
+ */
396
+ export declare function createPolicyHeader(policy: ITracelessPolicy): string;
397
+ /**
398
+ * Creates a new StorageAdapter with the given policy.
399
+ */
400
+ export declare function createStorageAdapter(policy: ITracelessPolicy, namespace?: string): StorageAdapter;
401
+ /**
402
+ * Creates the most restrictive instance ceiling (for healthcare, etc.).
403
+ */
404
+ export declare function createRestrictiveInstanceCeiling(instanceId: string): TracelessInstanceCeiling;
405
+ /**
406
+ * Creates a permissive instance ceiling (for general SaaS).
407
+ */
408
+ export declare function createPermissiveInstanceCeiling(instanceId: string): TracelessInstanceCeiling;
409
+ /**
410
+ * Clears all client-side storage (for traceless mode enforcement).
411
+ * WARNING: This clears ALL storage, not just app data.
412
+ */
413
+ export declare function clearAllClientStorage(): void;
414
+ /**
415
+ * Audit scanner: checks if any storage is being used against policy.
416
+ * Returns violations found.
417
+ */
418
+ export declare function auditStorageCompliance(policy: ITracelessPolicy): StorageAuditResult;
419
+ /**
420
+ * Storage audit result.
421
+ */
422
+ export interface StorageAuditResult {
423
+ compliant: boolean;
424
+ violations: StorageViolation[];
425
+ auditedAt: number;
426
+ policy: TracelessMode;
427
+ }
428
+ /**
429
+ * Storage violation entry.
430
+ */
431
+ export interface StorageViolation {
432
+ type: 'cookie' | 'localStorage' | 'sessionStorage';
433
+ severity: 'low' | 'medium' | 'high';
434
+ message: string;
435
+ data?: string;
436
+ }
437
+ declare const _default: {
438
+ DEFAULT_TRACELESS_POLICY: ITracelessPolicy;
439
+ TRACELESS_MODE_PRESETS: Record<TracelessMode, Omit<ITracelessPolicy, "source" | "version" | "resolvedAt">>;
440
+ PRIVACY_LEVEL_ORDER: TracelessMode[];
441
+ TRACELESS_POLICY_HEADER: string;
442
+ getMorePrivateMode: typeof getMorePrivateMode;
443
+ isAtLeastAsPrivate: typeof isAtLeastAsPrivate;
444
+ resolveTracelessPolicy: typeof resolveTracelessPolicy;
445
+ deriveMode: typeof deriveMode;
446
+ shouldShowConsentBanner: typeof shouldShowConsentBanner;
447
+ StorageAdapter: typeof StorageAdapter;
448
+ resolveControlStoragePermissions: typeof resolveControlStoragePermissions;
449
+ generateTracelessComplianceReport: typeof generateTracelessComplianceReport;
450
+ getTracelessBadgeInfo: typeof getTracelessBadgeInfo;
451
+ getGracefulDegradationInfo: typeof getGracefulDegradationInfo;
452
+ parsePolicyFromHeader: typeof parsePolicyFromHeader;
453
+ createPolicyHeader: typeof createPolicyHeader;
454
+ createStorageAdapter: typeof createStorageAdapter;
455
+ createRestrictiveInstanceCeiling: typeof createRestrictiveInstanceCeiling;
456
+ createPermissiveInstanceCeiling: typeof createPermissiveInstanceCeiling;
457
+ clearAllClientStorage: typeof clearAllClientStorage;
458
+ auditStorageCompliance: typeof auditStorageCompliance;
459
+ };
460
+ export default _default;
461
+ //# sourceMappingURL=traceless.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"traceless.d.ts","sourceRoot":"","sources":["../../src/core/traceless.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEnG;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,WAAW,GAAG,YAAY,GAAG,MAAM,CAAC;AAEnF;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gDAAgD;IAChD,cAAc,EAAE,OAAO,CAAC;IACxB,sCAAsC;IACtC,mBAAmB,EAAE,OAAO,CAAC;IAC7B,wCAAwC;IACxC,qBAAqB,EAAE,OA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G,cAAc,CAEjG;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,UAAU,EAAE,MAAM,GAAG,wBAAwB,CAS7F;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,UAAU,EAAE,MAAM,GAAG,wBAAwB,CAS5F;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CA8B5C;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,gBAAgB,GAAG,kBAAkB,CAoDnF;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,QAAQ,GAAG,cAAc,GAAG,gBAAgB,CAAC;IACnD,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;;;;;;;;;;;;;;;;;;;;;;;;AAMD,wBAsBE"}
@@ -0,0 +1,105 @@
1
+ /** T-shirt sizing used across all components for consistent visual density. */
2
+ export type NiceSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
3
+ /** @deprecated Legacy size names — use NiceSize values instead. */
4
+ export type NiceSizeLegacy = 'small' | 'medium' | 'large';
5
+ /**
6
+ * Normalizes a size value, converting deprecated legacy names to NiceSize.
7
+ * Emits a one-time console warning per legacy value in development mode.
8
+ */
9
+ export declare function normalizeSize(size: string | undefined, componentName?: string): NiceSize;
10
+ /**
11
+ * Layout sizing for editors, viewers and players.
12
+ * - `'minimal'` — smallest usable chrome, toolbar hidden or icon-only
13
+ * - `'compact'` — reduced padding, single-row toolbar
14
+ * - `'standard'` — default layout with full toolbar
15
+ * - `'fullscreen'` — expands to fill the viewport
16
+ */
17
+ export type NiceEditorSize = 'minimal' | 'compact' | 'standard' | 'fullscreen';
18
+ /** Visual style variant for buttons, alerts, badges and other themed controls. */
19
+ export type NiceVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'ghost' | 'outline';
20
+ /** Whitespace / padding density preset. */
21
+ export type NiceDensity = 'compact' | 'normal' | 'comfortable';
22
+ /**
23
+ * Per-component visibility & interaction level used by the access control system.
24
+ * - `'full'` — fully interactive (default)
25
+ * - `'readOnly'` — renders but cannot be edited
26
+ * - `'disabled'` — renders greyed-out
27
+ * - `'hidden'` — not rendered at all
28
+ */
29
+ export type NiceAccessMode = 'full' | 'readOnly' | 'disabled' | 'hidden';
30
+ /** Base props inherited by every NiceToDev component. */
31
+ export interface NiceBaseProps {
32
+ /** Additional CSS class name(s). */
33
+ className?: string;
34
+ /** Inline style object. */
35
+ style?: React.CSSProperties;
36
+ /** HTML `id` attribute. When omitted a stable auto-generated id is used. */
37
+ id?: string;
38
+ /** Tooltip text shown on hover. */
39
+ title?: string;
40
+ /** Test identifier for integration / e2e test selectors. */
41
+ 'data-testid'?: string;
42
+ /** Controls component visibility and interaction — see {@link NiceAccessMode}. */
43
+ accessMode?: NiceAccessMode;
44
+ /**
45
+ * Visual presentation style override.
46
+ * When set, overrides the global `displayStyle` from `NiceThemeProvider`.
47
+ * @see NiceDisplayStyle
48
+ */
49
+ displayStyle?: import('../core/displayStyle').NiceDisplayStyle;
50
+ }
51
+ /** Extended base props for form-field components (inputs, selects, etc.). */
52
+ export interface NiceFormFieldProps extends NiceBaseProps {
53
+ /** Field label displayed above or beside the control. */
54
+ label?: string;
55
+ /** Assistive text shown below the field. */
56
+ helperText?: string;
57
+ /** Validation error message — when set the field is styled as invalid. */
58
+ error?: string;
59
+ /** Marks the field as required (adds visual indicator). */
60
+ required?: boolean;
61
+ /** Disables the field. */
62
+ disabled?: boolean;
63
+ /** Makes the field read-only. */
64
+ readOnly?: boolean;
65
+ /** Visual size of the field. */
66
+ size?: NiceSize;
67
+ /** HTML `name` attribute used in form serialization. */
68
+ name?: string;
69
+ /** When true, pressing Enter will trigger the onSubmit callback (if provided). */
70
+ submitOnEnter?: boolean;
71
+ /** Callback triggered when Enter is pressed (if submitOnEnter is true). */
72
+ onSubmit?: () => void;
73
+ /** Show a keyboard shortcuts hint icon (?) next to the label. */
74
+ showKeyboardHints?: boolean;
75
+ /** Label position: 'top' (default, stacked) or 'left' (inline beside the control). */
76
+ labelPlacement?: 'top' | 'left';
77
+ /** Error/validation position: 'bottom' (default) or 'right' (inline beside the control). */
78
+ errorPlacement?: 'bottom' | 'right';
79
+ /** Shows a loading spinner inside the control and disables interaction. */
80
+ loading?: boolean;
81
+ /** Explicit width for the label (e.g. '120px', '30%'). Only applies when labelPlacement is 'left'. */
82
+ labelWidth?: string | number;
83
+ /** Explicit width for the control (e.g. '200px', '50%'). Defaults to 100% in column layout. */
84
+ controlWidth?: string | number;
85
+ /** When `true`, the control renders as a clickable label-style display of the current value
86
+ * (no input border/chrome). Click switches it into the regular editable control. Useful for
87
+ * inline-editable cells or "click-to-edit" patterns — replaces the standalone NiceInPlaceEditor. */
88
+ displayMode?: boolean;
89
+ }
90
+ /** A single option displayed in selects, radio-groups, autocompletes and similar list-based editors. */
91
+ export type NiceOption<T = string> = {
92
+ /** The option's backing value. */
93
+ value: T;
94
+ /** Display text shown to the user. */
95
+ label: string;
96
+ /** When `true` the option cannot be selected. */
97
+ disabled?: boolean;
98
+ /** Optional icon rendered before the label. */
99
+ icon?: React.ReactNode;
100
+ /** Secondary description text. */
101
+ description?: string;
102
+ /** Grouping key for grouped dropdowns. */
103
+ group?: string;
104
+ };
105
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAIA,+EAA+E;AAC/E,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,IAAI,GAAG,IAA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AAM,CAAC;CAChB,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Live boolean indicating whether the active theme renders as "dark".
3
+ *
4
+ * Resolution order:
5
+ * 1. `<html data-theme="dark|light">` attribute (explicit consumer wins)
6
+ * 2. `nice-dark` / `nice-light` (and bare `dark`) class on `<html>`
7
+ * 3. `--text-primary` CSS variable luminance (light text → dark theme)
8
+ * 4. `prefers-color-scheme: dark` media query as last-resort fallback
9
+ *
10
+ * Updates whenever any of the above change (MutationObserver on `<html>`
11
+ * attributes/class/style + media-query listener), so canvas-based renderers
12
+ * (QR, barcode, charts…) stay in sync without consumers wiring `useDarkMode`.
13
+ */
14
+ export declare function useThemeIsDark(): boolean;
15
+ //# sourceMappingURL=useThemeIsDark.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useThemeIsDark.d.ts","sourceRoot":"","sources":["../../src/core/useThemeIsDark.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,IAAI,OAAO,CA4BxC"}