@portel/photon-core 2.5.4 → 2.6.1

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.
@@ -122,6 +122,16 @@ const colorPalette = {
122
122
  100: '#ffffff',
123
123
  },
124
124
 
125
+ // Light-theme neutrals (cool blue-gray undertone, higher contrast)
126
+ neutralLight: {
127
+ 85: '#BCC5CF', // heavy borders / dividers
128
+ 88: '#C4CDD5', // surface-container-highest
129
+ 91: '#D5DBE1', // surface-container-high
130
+ 94: '#E5E9EE', // bg-app — visible structure
131
+ 96: '#EBEEF2', // surface-container
132
+ 98: '#F6F7F9', // surface — slightly off-white panels
133
+ },
134
+
125
135
  // Primary (blue - trust, action)
126
136
  primary: {
127
137
  10: '#001d36',
@@ -225,19 +235,19 @@ export const colorsDark = {
225
235
  scrim: 'rgba(0, 0, 0, 0.5)',
226
236
  } as const;
227
237
 
228
- // System colors - Light Theme
238
+ // System colors - Light Theme (cool blue-gray, WCAG compliant)
229
239
  export const colorsLight = {
230
- // Surfaces (inverted - light backgrounds)
231
- surface: colorPalette.neutral[100], // white
232
- surfaceContainer: colorPalette.neutral[95],
233
- surfaceContainerHigh: colorPalette.neutral[90],
234
- surfaceContainerHighest: colorPalette.neutral[80],
235
- surfaceBright: colorPalette.neutral[100],
236
-
237
- // Text on surfaces (dark text on light)
238
- onSurface: colorPalette.neutral[10],
239
- onSurfaceVariant: colorPalette.neutral[30],
240
- onSurfaceMuted: colorPalette.neutral[50],
240
+ // Surfaces (cool blue-gray, higher contrast between levels)
241
+ surface: colorPalette.neutralLight[98], // #F6F7F9 — panels
242
+ surfaceContainer: colorPalette.neutralLight[96], // #EBEEF2 — containers
243
+ surfaceContainerHigh: colorPalette.neutralLight[91], // #D5DBE1
244
+ surfaceContainerHighest: colorPalette.neutralLight[88], // #C4CDD5
245
+ surfaceBright: colorPalette.neutral[100], // #FFFFFF — overlays/modals
246
+
247
+ // Text on surfaces (deep charcoal, high contrast)
248
+ onSurface: '#1A2332', // 12.3:1 on #E5E9EE — WCAG AAA
249
+ onSurfaceVariant: '#3D4C5C', // darker variant for readability
250
+ onSurfaceMuted: '#556270', // 5.1:1 on #E5E9EE — WCAG AA
241
251
 
242
252
  // Primary (darker for light theme)
243
253
  primary: colorPalette.primary[40],
@@ -263,12 +273,12 @@ export const colorsLight = {
263
273
  onError: colorPalette.neutral[100], // white text
264
274
  onErrorContainer: colorPalette.error[10],
265
275
 
266
- // Outline (darker for light theme)
267
- outline: colorPalette.neutral[50],
268
- outlineVariant: colorPalette.neutral[80],
276
+ // Outline (visible but not harsh)
277
+ outline: '#8B95A3', // stronger than before for visibility
278
+ outlineVariant: '#D1D5DB', // visible border, not washed out
269
279
 
270
- // Scrim (overlay)
271
- scrim: 'rgba(0, 0, 0, 0.3)' as const,
280
+ // Scrim (overlay — lighter than dark theme's 0.5)
281
+ scrim: 'rgba(0, 0, 0, 0.2)' as const,
272
282
  };
273
283
 
274
284
  // Default export (dark theme for backwards compatibility)
@@ -298,6 +308,16 @@ export const elevation = {
298
308
  '5': '0px 4px 4px 0px rgba(0, 0, 0, 0.30), 0px 8px 12px 6px rgba(0, 0, 0, 0.15)',
299
309
  } as const;
300
310
 
311
+ // Light theme elevation — visible but not harsh
312
+ export const elevationLight = {
313
+ '0': 'none',
314
+ '1': '0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.08)',
315
+ '2': '0px 2px 6px rgba(0, 0, 0, 0.1), 0px 4px 8px rgba(0, 0, 0, 0.06)',
316
+ '3': '0px 4px 8px rgba(0, 0, 0, 0.1), 0px 10px 20px rgba(0, 0, 0, 0.06)',
317
+ '4': '0px 10px 15px rgba(0, 0, 0, 0.09), 0px 20px 25px rgba(0, 0, 0, 0.05)',
318
+ '5': '0px 20px 25px rgba(0, 0, 0, 0.07), 0px 25px 50px rgba(0, 0, 0, 0.05)',
319
+ } as const;
320
+
301
321
  // =============================================================================
302
322
  // BORDER RADIUS - Apple HIG inspired
303
323
  // =============================================================================
@@ -522,12 +542,28 @@ export function generateTokensCSS(): string {
522
542
  [data-theme="light"],
523
543
  .light {
524
544
  ${generateColorVars(colorsLight)}
545
+
546
+ /* Light-mode elevation (softer shadows) */
547
+ --elevation-0: ${elevationLight['0']};
548
+ --elevation-1: ${elevationLight['1']};
549
+ --elevation-2: ${elevationLight['2']};
550
+ --elevation-3: ${elevationLight['3']};
551
+ --elevation-4: ${elevationLight['4']};
552
+ --elevation-5: ${elevationLight['5']};
525
553
  }
526
554
 
527
555
  /* System Preference: Light Mode */
528
556
  @media (prefers-color-scheme: light) {
529
557
  [data-theme="system"] {
530
558
  ${generateColorVars(colorsLight)}
559
+
560
+ /* Light-mode elevation (softer shadows) */
561
+ --elevation-0: ${elevationLight['0']};
562
+ --elevation-1: ${elevationLight['1']};
563
+ --elevation-2: ${elevationLight['2']};
564
+ --elevation-3: ${elevationLight['3']};
565
+ --elevation-4: ${elevationLight['4']};
566
+ --elevation-5: ${elevationLight['5']};
531
567
  }
532
568
  }
533
569
  `;
@@ -764,9 +800,9 @@ export function getThemeTokens(theme: 'light' | 'dark'): Record<string, string>
764
800
 
765
801
  // --- Shadows ---
766
802
  '--shadow-hairline': `0 0 0 1px ${themeColors.outlineVariant}`,
767
- '--shadow-sm': elevation['1'],
768
- '--shadow-md': elevation['2'],
769
- '--shadow-lg': elevation['3'],
803
+ '--shadow-sm': theme === 'light' ? elevationLight['1'] : elevation['1'],
804
+ '--shadow-md': theme === 'light' ? elevationLight['2'] : elevation['2'],
805
+ '--shadow-lg': theme === 'light' ? elevationLight['3'] : elevation['3'],
770
806
 
771
807
  // --- Border Width ---
772
808
  '--border-width-regular': '1px',
package/src/index.ts CHANGED
@@ -453,6 +453,11 @@ export {
453
453
  ReactiveMap,
454
454
  ReactiveSet,
455
455
  type Emitter,
456
+ // Level 2+: Rich queryable collection with rendering hints
457
+ Collection,
458
+ type RenderHint,
459
+ type RenderFormat,
460
+ type CompareOp,
456
461
  } from './collections/index.js';
457
462
 
458
463
  // ===== PURPOSE-DRIVEN UI TYPES =====