@open-mercato/search 0.5.1-develop.2856.35de414092 → 0.5.1-develop.2874.77704bccbd

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.
@@ -48,7 +48,7 @@ export function GlobalSearchSection({
48
48
  checked={strategies.has('fulltext')}
49
49
  onChange={() => onToggleStrategy('fulltext')}
50
50
  disabled={saving || (strategies.has('fulltext') && strategies.size === 1)}
51
- className="mt-1 h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"
51
+ className="mt-1 h-4 w-4 rounded border-gray-300 text-primary focus-visible:ring-ring"
52
52
  />
53
53
  <div className="flex-1">
54
54
  <div className="flex items-center gap-2">
@@ -76,7 +76,7 @@ export function GlobalSearchSection({
76
76
  checked={strategies.has('vector')}
77
77
  onChange={() => onToggleStrategy('vector')}
78
78
  disabled={saving || (strategies.has('vector') && strategies.size === 1)}
79
- className="mt-1 h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"
79
+ className="mt-1 h-4 w-4 rounded border-gray-300 text-primary focus-visible:ring-ring"
80
80
  />
81
81
  <div className="flex-1">
82
82
  <div className="flex items-center gap-2">
@@ -104,7 +104,7 @@ export function GlobalSearchSection({
104
104
  checked={strategies.has('tokens')}
105
105
  onChange={() => onToggleStrategy('tokens')}
106
106
  disabled={saving || (strategies.has('tokens') && strategies.size === 1)}
107
- className="mt-1 h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"
107
+ className="mt-1 h-4 w-4 rounded border-gray-300 text-primary focus-visible:ring-ring"
108
108
  />
109
109
  <div className="flex-1">
110
110
  <span className="font-medium">
@@ -482,15 +482,15 @@ export function VectorSearchSection({
482
482
  key={driver.id}
483
483
  className={`flex items-start gap-3 p-3 rounded-md border ${
484
484
  isCurrent && isReady
485
- ? 'border-emerald-200 bg-emerald-50 dark:border-emerald-800 dark:bg-emerald-900/20'
485
+ ? 'border-status-success-border bg-status-success-bg'
486
486
  : !driver.implemented
487
- ? 'border-border bg-muted/20 opacity-60'
487
+ ? 'border-border bg-muted/30 opacity-60'
488
488
  : 'border-border bg-muted/30'
489
489
  }`}
490
490
  >
491
491
  <div className={`flex h-8 w-8 items-center justify-center rounded-full flex-shrink-0 ${
492
492
  isCurrent && isReady
493
- ? 'bg-emerald-100 text-emerald-600 dark:bg-emerald-900/40 dark:text-emerald-400'
493
+ ? 'bg-status-success-bg text-status-success-icon'
494
494
  : 'bg-muted text-muted-foreground'
495
495
  }`}>
496
496
  <svg className="h-4 w-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth={2}>
@@ -499,16 +499,16 @@ export function VectorSearchSection({
499
499
  </div>
500
500
  <div className="flex-1 min-w-0">
501
501
  <div className="flex items-center gap-2">
502
- <p className={`text-sm font-medium ${isCurrent && isReady ? 'text-emerald-700 dark:text-emerald-300' : ''}`}>
502
+ <p className={`text-sm font-medium ${isCurrent && isReady ? 'text-status-success-text' : ''}`}>
503
503
  {driver.name}
504
504
  </p>
505
505
  {isCurrent && (
506
- <span className="text-[10px] px-1.5 py-0.5 rounded bg-emerald-100 text-emerald-700 dark:bg-emerald-900/40 dark:text-emerald-300">
506
+ <span className="text-overline px-1.5 py-0.5 rounded bg-status-success-bg text-status-success-text">
507
507
  {t('search.settings.vector.active', 'Active')}
508
508
  </span>
509
509
  )}
510
510
  {!driver.implemented && (
511
- <span className="text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground">
511
+ <span className="text-overline px-1.5 py-0.5 rounded bg-muted text-muted-foreground">
512
512
  {t('search.settings.vector.comingSoon', 'Coming soon')}
513
513
  </span>
514
514
  )}
@@ -516,8 +516,8 @@ export function VectorSearchSection({
516
516
  <div className="mt-1 space-y-0.5">
517
517
  {driver.envVars.map((envVar) => (
518
518
  <div key={envVar.name} className="flex items-center gap-1.5">
519
- <div className={`h-1.5 w-1.5 rounded-full ${envVar.set ? 'bg-emerald-500' : 'bg-muted-foreground/40'}`} />
520
- <code className="text-[10px] text-muted-foreground font-mono">{envVar.name}</code>
519
+ <div className={`h-1.5 w-1.5 rounded-full ${envVar.set ? 'bg-status-success-icon' : 'bg-muted-foreground/40'}`} />
520
+ <code className="text-overline text-muted-foreground font-mono">{envVar.name}</code>
521
521
  </div>
522
522
  ))}
523
523
  </div>
@@ -549,7 +549,7 @@ export function VectorSearchSection({
549
549
  ? 'border-primary bg-primary/5 ring-1 ring-primary/20'
550
550
  : isConfigured
551
551
  ? 'border-border hover:border-primary/50 hover:bg-muted/50 cursor-pointer'
552
- : 'border-border bg-muted/20 opacity-50 cursor-not-allowed'
552
+ : 'border-border bg-muted/30 opacity-50 cursor-not-allowed'
553
553
  }`}
554
554
  >
555
555
  <div className="flex items-start justify-between gap-2">
@@ -559,7 +559,7 @@ export function VectorSearchSection({
559
559
  {info.name}
560
560
  </p>
561
561
  {isCurrentlySaved && isConfigured && (
562
- <span className="text-[10px] px-1.5 py-0.5 rounded bg-emerald-100 text-emerald-700 dark:bg-emerald-900/40 dark:text-emerald-300">
562
+ <span className="text-overline px-1.5 py-0.5 rounded bg-status-success-bg text-status-success-text">
563
563
  {t('search.settings.vector.active', 'Active')}
564
564
  </span>
565
565
  )}
@@ -570,7 +570,7 @@ export function VectorSearchSection({
570
570
  </p>
571
571
  ) : (
572
572
  <p className="text-xs text-muted-foreground mt-1">
573
- {t('search.settings.vector.setEnvVar', 'Set')} <code className="font-mono text-[10px] bg-muted px-1 rounded">{info.envKeyRequired}</code>
573
+ {t('search.settings.vector.setEnvVar', 'Set')} <code className="font-mono text-overline bg-muted px-1 rounded">{info.envKeyRequired}</code>
574
574
  </p>
575
575
  )}
576
576
  </div>
@@ -578,7 +578,7 @@ export function VectorSearchSection({
578
578
  isSelected
579
579
  ? 'bg-primary text-primary-foreground'
580
580
  : isConfigured
581
- ? 'bg-emerald-100 text-emerald-600 dark:bg-emerald-900/40 dark:text-emerald-400'
581
+ ? 'bg-status-success-bg text-status-success-icon'
582
582
  : 'bg-muted text-muted-foreground'
583
583
  }`}>
584
584
  {isSelected ? (
@@ -606,7 +606,7 @@ export function VectorSearchSection({
606
606
  </Label>
607
607
  <select
608
608
  id={`model-${providerId}`}
609
- className="w-full rounded-md border border-input bg-background px-2 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-60"
609
+ className="w-full rounded-md border border-input bg-background px-2 py-1.5 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50"
610
610
  value={displayModel}
611
611
  onChange={(e) => handleModelChange(e.target.value)}
612
612
  disabled={embeddingLoading || embeddingSaving}
@@ -652,7 +652,7 @@ export function VectorSearchSection({
652
652
  {t('search.settings.dimension.label', 'Dimensions')}: {displayDimension}
653
653
  </span>
654
654
  {embeddingSettings?.indexedDimension && embeddingSettings.indexedDimension !== displayDimension && (
655
- <span className="text-amber-600 dark:text-amber-400">
655
+ <span className="text-status-warning-text">
656
656
  {t('search.settings.dimension.mismatch', 'mismatch')}: {embeddingSettings.indexedDimension}
657
657
  </span>
658
658
  )}
@@ -678,12 +678,12 @@ export function VectorSearchSection({
678
678
  </div>
679
679
 
680
680
  {/* Setup Instructions */}
681
- <div className="p-3 rounded-md bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800">
681
+ <div className="p-3 rounded-md bg-status-info-bg border border-status-info-border">
682
682
  <div className="flex items-start gap-2">
683
- <svg className="h-5 w-5 text-blue-600 dark:text-blue-400 flex-shrink-0 mt-0.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
683
+ <svg className="h-5 w-5 text-status-info-icon flex-shrink-0 mt-0.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
684
684
  <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
685
685
  </svg>
686
- <div className="text-sm text-blue-800 dark:text-blue-200">
686
+ <div className="text-sm text-status-info-text">
687
687
  <p className="font-medium mb-1">{t('search.settings.vector.howTo', 'How to set up')}</p>
688
688
  <p className="text-xs">{t('search.settings.vector.howToDescription', 'Add the API key for your preferred provider to your .env file. Only providers with configured API keys can be selected.')}</p>
689
689
  </div>
@@ -701,16 +701,16 @@ export function VectorSearchSection({
701
701
  <span>{t('search.settings.loadingLabel', 'Loading settings...')}</span>
702
702
  </div>
703
703
  ) : !isEmbeddingConfigured ? (
704
- <div className="p-4 rounded-md bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800">
704
+ <div className="p-4 rounded-md bg-status-warning-bg border border-status-warning-border">
705
705
  <div className="flex items-start gap-3">
706
- <svg className="h-5 w-5 text-amber-600 dark:text-amber-400 flex-shrink-0 mt-0.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
706
+ <svg className="h-5 w-5 text-status-warning-icon flex-shrink-0 mt-0.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
707
707
  <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
708
708
  </svg>
709
709
  <div>
710
- <p className="text-sm font-medium text-amber-800 dark:text-amber-200">
710
+ <p className="text-sm font-medium text-status-warning-text">
711
711
  {t('search.settings.vectorNotConfigured', 'No embedding provider configured')}
712
712
  </p>
713
- <p className="text-xs text-amber-700 dark:text-amber-300 mt-1">
713
+ <p className="text-xs text-status-warning-text mt-1">
714
714
  {t('search.settings.vectorNotConfiguredHint', 'Configure an embedding provider in the Configuration tab to enable indexing.')}
715
715
  </p>
716
716
  </div>
@@ -763,14 +763,14 @@ export function VectorSearchSection({
763
763
 
764
764
  {/* Active reindex lock banner */}
765
765
  {vectorReindexLock && (
766
- <div className="p-3 rounded-md bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800">
766
+ <div className="p-3 rounded-md bg-status-info-bg border border-status-info-border">
767
767
  <div className="flex items-start gap-3">
768
- <Spinner size="sm" className="flex-shrink-0 mt-0.5 text-blue-600 dark:text-blue-400" />
768
+ <Spinner size="sm" className="flex-shrink-0 mt-0.5 text-status-info-icon" />
769
769
  <div className="flex-1">
770
- <p className="text-sm font-medium text-blue-800 dark:text-blue-200">
770
+ <p className="text-sm font-medium text-status-info-text">
771
771
  {t('search.settings.reindexInProgress', 'Reindex operation in progress')}
772
772
  </p>
773
- <p className="text-xs text-blue-700 dark:text-blue-300 mt-1">
773
+ <p className="text-xs text-status-info-text mt-1">
774
774
  {t('search.settings.reindexInProgressDetails', 'Action: {{action}} | Started {{minutes}} minutes ago', {
775
775
  action: vectorReindexLock.action,
776
776
  minutes: vectorReindexLock.elapsedMinutes,
@@ -781,11 +781,11 @@ export function VectorSearchSection({
781
781
  </div>
782
782
  )}
783
783
 
784
- <div className="flex items-center gap-2 p-2 rounded bg-amber-50 dark:bg-amber-900/20">
785
- <svg className="h-4 w-4 text-amber-600 dark:text-amber-400 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
784
+ <div className="flex items-center gap-2 p-2 rounded bg-status-warning-bg">
785
+ <svg className="h-4 w-4 text-status-warning-icon flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
786
786
  <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
787
787
  </svg>
788
- <p className="text-xs text-amber-800 dark:text-amber-200">
788
+ <p className="text-xs text-status-warning-text">
789
789
  {t('search.settings.vectorReindex.warning', 'This may take a while for large datasets and will consume API credits.')}
790
790
  </p>
791
791
  </div>
@@ -830,18 +830,18 @@ export function VectorSearchSection({
830
830
  key={log.id}
831
831
  className={`p-2 rounded-md text-sm ${
832
832
  log.level === 'error'
833
- ? 'bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800'
833
+ ? 'bg-status-error-bg border border-status-error-border'
834
834
  : 'bg-muted/50'
835
835
  }`}
836
836
  >
837
837
  <div className="flex items-start gap-2">
838
838
  {log.level === 'error' && (
839
- <svg className="h-4 w-4 text-red-600 dark:text-red-400 flex-shrink-0 mt-0.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
839
+ <svg className="h-4 w-4 text-status-error-icon flex-shrink-0 mt-0.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
840
840
  <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
841
841
  </svg>
842
842
  )}
843
843
  <div className="flex-1 min-w-0">
844
- <p className={`text-xs ${log.level === 'error' ? 'text-red-800 dark:text-red-200' : 'text-foreground'}`}>
844
+ <p className={`text-xs ${log.level === 'error' ? 'text-status-error-text' : 'text-foreground'}`}>
845
845
  {log.message}
846
846
  </p>
847
847
  <p className="text-xs text-muted-foreground mt-0.5">
@@ -881,7 +881,7 @@ export function VectorSearchSection({
881
881
 
882
882
  {/* Vector Reindex Confirmation Dialog */}
883
883
  {showVectorReindexDialog && (
884
- <div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50">
884
+ <div className="fixed inset-0 z-modal flex items-center justify-center bg-black/50">
885
885
  <div className="mx-4 max-w-md rounded-lg border border-border bg-card p-6 shadow-lg">
886
886
  <h3 className="text-lg font-semibold mb-2">{t('search.settings.reindex.confirmTitle', 'Confirm Reindex')}</h3>
887
887
  <p className="text-sm text-muted-foreground mb-4">
@@ -901,7 +901,7 @@ export function VectorSearchSection({
901
901
 
902
902
  {/* Embedding Provider Change Confirmation Dialog */}
903
903
  {showEmbeddingConfirmDialog && pendingEmbeddingConfig && (
904
- <div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50">
904
+ <div className="fixed inset-0 z-modal flex items-center justify-center bg-black/50">
905
905
  <div className="mx-4 max-w-lg rounded-lg border border-border bg-card p-6 shadow-lg">
906
906
  <h3 className="text-lg font-semibold mb-2">{t('search.settings.change.title', 'Confirm Provider Change')}</h3>
907
907
  <p className="text-sm text-muted-foreground mb-4">