@smallwebco/tinypivot-react 1.0.61 → 1.0.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/style.css CHANGED
@@ -3170,3 +3170,1305 @@
3170
3170
  color: #1e293b !important;
3171
3171
  }
3172
3172
 
3173
+ /* ==========================================================================
3174
+ AI Analyst Component
3175
+ ========================================================================== */
3176
+ .vpg-ai-analyst {
3177
+ display: flex;
3178
+ flex-direction: column;
3179
+ height: 100%;
3180
+ background: #f8fafc;
3181
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
3182
+ }
3183
+
3184
+ /* Full-screen picker */
3185
+ .vpg-ai-picker-fullscreen {
3186
+ flex: 1;
3187
+ display: flex;
3188
+ align-items: center;
3189
+ justify-content: center;
3190
+ padding: 2rem;
3191
+ }
3192
+
3193
+ .vpg-ai-picker-content {
3194
+ max-width: 600px;
3195
+ width: 100%;
3196
+ max-height: 100%;
3197
+ display: flex;
3198
+ flex-direction: column;
3199
+ overflow: hidden;
3200
+ }
3201
+
3202
+ .vpg-ai-picker-header {
3203
+ text-align: center;
3204
+ margin-bottom: 2rem;
3205
+ flex-shrink: 0;
3206
+ }
3207
+
3208
+ .vpg-ai-analyst .vpg-ai-icon-lg {
3209
+ width: 4rem;
3210
+ height: 4rem;
3211
+ background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
3212
+ border-radius: 1rem;
3213
+ display: flex;
3214
+ align-items: center;
3215
+ justify-content: center;
3216
+ color: white;
3217
+ margin: 0 auto 1rem;
3218
+ }
3219
+
3220
+ .vpg-ai-analyst .vpg-ai-icon-lg svg {
3221
+ width: 2rem;
3222
+ height: 2rem;
3223
+ }
3224
+
3225
+ .vpg-ai-picker-header h2 {
3226
+ margin: 0 0 0.5rem;
3227
+ font-size: 1.5rem;
3228
+ font-weight: 600;
3229
+ color: #1e293b;
3230
+ }
3231
+
3232
+ .vpg-ai-picker-header p {
3233
+ margin: 0;
3234
+ color: #64748b;
3235
+ }
3236
+
3237
+ /* Search */
3238
+ .vpg-ai-analyst .vpg-ai-search {
3239
+ display: flex;
3240
+ align-items: center;
3241
+ gap: 0.75rem;
3242
+ padding: 0.75rem 1rem;
3243
+ background: white;
3244
+ border: 1px solid #e2e8f0;
3245
+ border-radius: 0.5rem;
3246
+ margin-bottom: 1rem;
3247
+ flex-shrink: 0;
3248
+ }
3249
+
3250
+ .vpg-ai-analyst .vpg-ai-search svg {
3251
+ width: 1.25rem;
3252
+ height: 1.25rem;
3253
+ color: #94a3b8;
3254
+ flex-shrink: 0;
3255
+ }
3256
+
3257
+ .vpg-ai-search-input {
3258
+ flex: 1;
3259
+ border: none;
3260
+ outline: none;
3261
+ font-size: 0.9375rem;
3262
+ color: #1e293b;
3263
+ background: transparent;
3264
+ }
3265
+
3266
+ .vpg-ai-search-input::-moz-placeholder {
3267
+ color: #94a3b8;
3268
+ }
3269
+
3270
+ .vpg-ai-search-input::placeholder {
3271
+ color: #94a3b8;
3272
+ }
3273
+
3274
+ /* Data source grid */
3275
+ .vpg-ai-datasource-grid {
3276
+ display: grid;
3277
+ grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
3278
+ gap: 0.75rem;
3279
+ overflow-y: auto;
3280
+ max-height: 400px;
3281
+ padding-right: 0.25rem;
3282
+ }
3283
+
3284
+ .vpg-ai-datasource-card {
3285
+ display: flex;
3286
+ align-items: center;
3287
+ gap: 0.75rem;
3288
+ padding: 1rem;
3289
+ background: white;
3290
+ border: 1px solid #e2e8f0;
3291
+ border-radius: 0.5rem;
3292
+ cursor: pointer;
3293
+ text-align: left;
3294
+ transition: all 0.15s;
3295
+ }
3296
+
3297
+ .vpg-ai-datasource-card:hover {
3298
+ border-color: #6366f1;
3299
+ box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
3300
+ }
3301
+
3302
+ .vpg-ai-datasource-icon {
3303
+ width: 2.25rem;
3304
+ height: 2.25rem;
3305
+ background: #eef2ff;
3306
+ border-radius: 0.5rem;
3307
+ display: flex;
3308
+ align-items: center;
3309
+ justify-content: center;
3310
+ color: #6366f1;
3311
+ flex-shrink: 0;
3312
+ }
3313
+
3314
+ .vpg-ai-datasource-icon svg {
3315
+ width: 1.125rem;
3316
+ height: 1.125rem;
3317
+ }
3318
+
3319
+ .vpg-ai-datasource-info {
3320
+ flex: 1;
3321
+ min-width: 0;
3322
+ }
3323
+
3324
+ .vpg-ai-datasource-name {
3325
+ display: block;
3326
+ font-size: 0.8125rem;
3327
+ font-weight: 600;
3328
+ color: #1e293b;
3329
+ white-space: nowrap;
3330
+ overflow: hidden;
3331
+ text-overflow: ellipsis;
3332
+ }
3333
+
3334
+ .vpg-ai-datasource-desc {
3335
+ display: block;
3336
+ font-size: 0.6875rem;
3337
+ color: #64748b;
3338
+ white-space: nowrap;
3339
+ overflow: hidden;
3340
+ text-overflow: ellipsis;
3341
+ }
3342
+
3343
+ .vpg-ai-no-results,
3344
+ .vpg-ai-empty-state {
3345
+ text-align: center;
3346
+ padding: 2rem;
3347
+ color: #94a3b8;
3348
+ }
3349
+
3350
+ .vpg-ai-docs-link {
3351
+ display: inline-flex;
3352
+ align-items: center;
3353
+ gap: 0.5rem;
3354
+ padding: 0.625rem 1rem;
3355
+ font-size: 0.875rem;
3356
+ color: #6366f1;
3357
+ background: #eef2ff;
3358
+ border-radius: 0.375rem;
3359
+ text-decoration: none;
3360
+ transition: all 0.15s;
3361
+ }
3362
+
3363
+ .vpg-ai-docs-link:hover {
3364
+ background: #e0e7ff;
3365
+ }
3366
+
3367
+ .vpg-ai-docs-link svg {
3368
+ width: 1rem;
3369
+ height: 1rem;
3370
+ }
3371
+
3372
+ /* Split Layout */
3373
+ .vpg-ai-split-layout {
3374
+ flex: 1;
3375
+ display: flex;
3376
+ min-height: 0;
3377
+ }
3378
+
3379
+ /* Chat Panel (1/4) */
3380
+ .vpg-ai-chat-panel {
3381
+ width: 300px;
3382
+ min-width: 260px;
3383
+ max-width: 360px;
3384
+ display: flex;
3385
+ flex-direction: column;
3386
+ background: white;
3387
+ border-right: 1px solid #e2e8f0;
3388
+ }
3389
+
3390
+ .vpg-ai-chat-header {
3391
+ display: flex;
3392
+ align-items: center;
3393
+ gap: 0.375rem;
3394
+ padding: 0.5rem 0.625rem;
3395
+ border-bottom: 1px solid #e2e8f0;
3396
+ }
3397
+
3398
+ .vpg-ai-back-btn {
3399
+ display: flex;
3400
+ align-items: center;
3401
+ justify-content: center;
3402
+ width: 1.5rem;
3403
+ height: 1.5rem;
3404
+ background: transparent;
3405
+ border: none;
3406
+ border-radius: 0.25rem;
3407
+ color: #64748b;
3408
+ cursor: pointer;
3409
+ transition: all 0.15s;
3410
+ }
3411
+
3412
+ .vpg-ai-back-btn:hover {
3413
+ background: #f1f5f9;
3414
+ color: #1e293b;
3415
+ }
3416
+
3417
+ .vpg-ai-back-btn svg {
3418
+ width: 0.875rem;
3419
+ height: 0.875rem;
3420
+ }
3421
+
3422
+ .vpg-ai-clear-btn {
3423
+ display: flex;
3424
+ align-items: center;
3425
+ justify-content: center;
3426
+ width: 1.5rem;
3427
+ height: 1.5rem;
3428
+ background: transparent;
3429
+ border: none;
3430
+ border-radius: 0.25rem;
3431
+ color: #64748b;
3432
+ cursor: pointer;
3433
+ transition: all 0.15s;
3434
+ }
3435
+
3436
+ .vpg-ai-clear-btn:hover {
3437
+ background: #fef2f2;
3438
+ color: #dc2626;
3439
+ }
3440
+
3441
+ .vpg-ai-clear-btn svg {
3442
+ width: 0.875rem;
3443
+ height: 0.875rem;
3444
+ }
3445
+
3446
+ .vpg-ai-chat-title {
3447
+ flex: 1;
3448
+ min-width: 0;
3449
+ }
3450
+
3451
+ .vpg-ai-chat-name {
3452
+ display: block;
3453
+ font-size: 0.75rem;
3454
+ font-weight: 600;
3455
+ color: #1e293b;
3456
+ white-space: nowrap;
3457
+ overflow: hidden;
3458
+ text-overflow: ellipsis;
3459
+ }
3460
+
3461
+ /* Messages */
3462
+ .vpg-ai-messages {
3463
+ flex: 1;
3464
+ overflow-y: auto;
3465
+ padding: 0.75rem;
3466
+ padding-bottom: 1rem;
3467
+ display: flex;
3468
+ flex-direction: column;
3469
+ gap: 0.5rem;
3470
+ }
3471
+
3472
+ .vpg-ai-welcome {
3473
+ text-align: center;
3474
+ padding: 0.75rem 0;
3475
+ }
3476
+
3477
+ .vpg-ai-welcome p {
3478
+ margin: 0 0 0.5rem;
3479
+ font-size: 0.75rem;
3480
+ color: #64748b;
3481
+ }
3482
+
3483
+ .vpg-ai-suggestions {
3484
+ display: flex;
3485
+ flex-wrap: wrap;
3486
+ justify-content: center;
3487
+ gap: 0.25rem;
3488
+ }
3489
+
3490
+ .vpg-ai-suggestions button {
3491
+ padding: 0.25rem 0.5rem;
3492
+ font-size: 0.625rem;
3493
+ color: #6366f1;
3494
+ background: #eef2ff;
3495
+ border: none;
3496
+ border-radius: 0.75rem;
3497
+ cursor: pointer;
3498
+ transition: all 0.15s;
3499
+ }
3500
+
3501
+ .vpg-ai-suggestions button:hover {
3502
+ background: #e0e7ff;
3503
+ }
3504
+
3505
+ /* Message styles */
3506
+ .vpg-ai-msg {
3507
+ max-width: 100%;
3508
+ font-size: 0.75rem;
3509
+ line-height: 1.5;
3510
+ }
3511
+
3512
+ .vpg-ai-msg-user {
3513
+ align-self: flex-end;
3514
+ background: #4f46e5;
3515
+ color: white;
3516
+ padding: 0.5rem 0.625rem;
3517
+ border-radius: 0.75rem 0.75rem 0.25rem 0.75rem;
3518
+ max-width: 90%;
3519
+ word-wrap: break-word;
3520
+ flex-shrink: 0;
3521
+ }
3522
+
3523
+ .vpg-ai-msg-assistant {
3524
+ background: #f1f5f9;
3525
+ color: #334155;
3526
+ padding: 0.5rem 0.625rem;
3527
+ border-radius: 0.75rem 0.75rem 0.75rem 0.25rem;
3528
+ max-width: 100%;
3529
+ flex-shrink: 0;
3530
+ }
3531
+
3532
+ .vpg-ai-assistant-content {
3533
+ white-space: pre-wrap;
3534
+ word-wrap: break-word;
3535
+ }
3536
+
3537
+ .vpg-ai-msg-error {
3538
+ display: inline-flex;
3539
+ align-items: center;
3540
+ gap: 0.25rem;
3541
+ margin-top: 0.375rem;
3542
+ padding: 0.25rem 0.5rem;
3543
+ background: #fef2f2;
3544
+ color: #dc2626;
3545
+ font-size: 0.6875rem;
3546
+ border-radius: 0.25rem;
3547
+ }
3548
+
3549
+ .vpg-ai-msg-error svg {
3550
+ width: 0.75rem;
3551
+ height: 0.75rem;
3552
+ }
3553
+
3554
+ /* Result message (clickable) */
3555
+ .vpg-ai-msg-result {
3556
+ background: white;
3557
+ border: 1px solid #e2e8f0;
3558
+ border-radius: 0.5rem;
3559
+ cursor: pointer;
3560
+ transition: all 0.15s;
3561
+ padding: 0.5rem;
3562
+ flex-shrink: 0;
3563
+ }
3564
+
3565
+ .vpg-ai-msg-result:hover {
3566
+ border-color: #c7d2fe;
3567
+ }
3568
+
3569
+ .vpg-ai-msg-result.vpg-ai-msg-selected {
3570
+ border-color: #6366f1;
3571
+ box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
3572
+ }
3573
+
3574
+ /* Result header with badge and SQL toggle */
3575
+ .vpg-ai-result-header {
3576
+ display: flex;
3577
+ align-items: center;
3578
+ justify-content: space-between;
3579
+ margin-bottom: 0.375rem;
3580
+ }
3581
+
3582
+ /* Result badge */
3583
+ .vpg-ai-result-badge {
3584
+ display: inline-flex;
3585
+ align-items: center;
3586
+ gap: 0.25rem;
3587
+ padding: 0.125rem 0.375rem;
3588
+ background: #ecfdf5;
3589
+ color: #059669;
3590
+ font-size: 0.625rem;
3591
+ font-weight: 600;
3592
+ border-radius: 0.25rem;
3593
+ }
3594
+
3595
+ .vpg-ai-result-badge svg {
3596
+ width: 0.75rem;
3597
+ height: 0.75rem;
3598
+ }
3599
+
3600
+ /* SQL toggle button */
3601
+ .vpg-ai-sql-toggle {
3602
+ display: inline-flex;
3603
+ align-items: center;
3604
+ gap: 0.25rem;
3605
+ padding: 0.125rem 0.375rem;
3606
+ background: #f1f5f9;
3607
+ color: #64748b;
3608
+ font-size: 0.625rem;
3609
+ font-weight: 500;
3610
+ border: 1px solid #e2e8f0;
3611
+ border-radius: 0.25rem;
3612
+ cursor: pointer;
3613
+ transition: all 0.15s;
3614
+ }
3615
+
3616
+ .vpg-ai-sql-toggle:hover {
3617
+ background: #e2e8f0;
3618
+ color: #475569;
3619
+ }
3620
+
3621
+ .vpg-ai-sql-toggle.vpg-ai-sql-expanded {
3622
+ background: #eef2ff;
3623
+ color: #6366f1;
3624
+ border-color: #c7d2fe;
3625
+ }
3626
+
3627
+ .vpg-ai-sql-toggle svg {
3628
+ width: 0.625rem;
3629
+ height: 0.625rem;
3630
+ }
3631
+
3632
+ /* Result content - full text */
3633
+ .vpg-ai-result-content {
3634
+ font-size: 0.75rem;
3635
+ color: #334155;
3636
+ line-height: 1.5;
3637
+ white-space: pre-wrap;
3638
+ word-wrap: break-word;
3639
+ }
3640
+
3641
+ .vpg-ai-analyst .vpg-ai-copy-btn {
3642
+ display: flex;
3643
+ align-items: center;
3644
+ justify-content: center;
3645
+ width: 1.25rem;
3646
+ height: 1.25rem;
3647
+ background: transparent;
3648
+ border: none;
3649
+ border-radius: 0.25rem;
3650
+ color: #94a3b8;
3651
+ cursor: pointer;
3652
+ transition: all 0.15s;
3653
+ }
3654
+
3655
+ .vpg-ai-analyst .vpg-ai-copy-btn:hover {
3656
+ background: #e2e8f0;
3657
+ color: #475569;
3658
+ }
3659
+
3660
+ .vpg-ai-analyst .vpg-ai-copy-btn svg {
3661
+ width: 0.625rem;
3662
+ height: 0.625rem;
3663
+ }
3664
+
3665
+ /* Loading */
3666
+ .vpg-ai-msg-loading {
3667
+ align-self: flex-start;
3668
+ }
3669
+
3670
+ .vpg-ai-typing {
3671
+ display: flex;
3672
+ gap: 0.1875rem;
3673
+ padding: 0.375rem 0.5rem;
3674
+ background: #f1f5f9;
3675
+ border-radius: 0.5rem;
3676
+ }
3677
+
3678
+ .vpg-ai-typing span {
3679
+ width: 0.3125rem;
3680
+ height: 0.3125rem;
3681
+ background: #94a3b8;
3682
+ border-radius: 50%;
3683
+ animation: vpg-ai-bounce 1.4s infinite ease-in-out both;
3684
+ }
3685
+
3686
+ .vpg-ai-typing span:nth-child(1) { animation-delay: -0.32s; }
3687
+ .vpg-ai-typing span:nth-child(2) { animation-delay: -0.16s; }
3688
+
3689
+ @keyframes vpg-ai-bounce {
3690
+ 0%, 80%, 100% { transform: scale(0); }
3691
+ 40% { transform: scale(1); }
3692
+ }
3693
+
3694
+ /* Input Area */
3695
+ .vpg-ai-input-area {
3696
+ padding: 0.5rem;
3697
+ border-top: 1px solid #e2e8f0;
3698
+ background: white;
3699
+ }
3700
+
3701
+ .vpg-ai-input-form {
3702
+ display: flex;
3703
+ gap: 0.375rem;
3704
+ align-items: flex-end;
3705
+ }
3706
+
3707
+ .vpg-ai-input {
3708
+ flex: 1;
3709
+ padding: 0.5rem 0.75rem;
3710
+ font-size: 0.8125rem;
3711
+ border: 1px solid #e2e8f0;
3712
+ border-radius: 0.75rem;
3713
+ resize: none;
3714
+ outline: none;
3715
+ transition: border-color 0.15s, box-shadow 0.15s;
3716
+ min-height: 2.25rem;
3717
+ max-height: 120px;
3718
+ overflow-y: auto;
3719
+ line-height: 1.4;
3720
+ }
3721
+
3722
+ .vpg-ai-input:focus {
3723
+ border-color: #6366f1;
3724
+ box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
3725
+ }
3726
+
3727
+ .vpg-ai-input:disabled {
3728
+ background: #f8fafc;
3729
+ cursor: not-allowed;
3730
+ }
3731
+
3732
+ .vpg-ai-send-btn {
3733
+ display: flex;
3734
+ align-items: center;
3735
+ justify-content: center;
3736
+ width: 1.75rem;
3737
+ height: 1.75rem;
3738
+ background: #4f46e5;
3739
+ border: none;
3740
+ border-radius: 50%;
3741
+ color: white;
3742
+ cursor: pointer;
3743
+ transition: all 0.15s;
3744
+ flex-shrink: 0;
3745
+ }
3746
+
3747
+ .vpg-ai-send-btn:hover:not(:disabled) {
3748
+ background: #4338ca;
3749
+ }
3750
+
3751
+ .vpg-ai-send-btn:disabled {
3752
+ background: #cbd5e1;
3753
+ cursor: not-allowed;
3754
+ }
3755
+
3756
+ .vpg-ai-send-btn svg {
3757
+ width: 0.75rem;
3758
+ height: 0.75rem;
3759
+ }
3760
+
3761
+ /* Input footer with model name and actions */
3762
+ .vpg-ai-input-footer {
3763
+ display: flex;
3764
+ align-items: center;
3765
+ justify-content: space-between;
3766
+ margin-top: 0.375rem;
3767
+ }
3768
+
3769
+ .vpg-ai-model-name {
3770
+ font-size: 0.625rem;
3771
+ font-style: italic;
3772
+ color: #94a3b8;
3773
+ }
3774
+
3775
+ /* Action buttons */
3776
+ .vpg-ai-input-actions {
3777
+ display: flex;
3778
+ gap: 0.25rem;
3779
+ }
3780
+
3781
+ .vpg-ai-action-btn {
3782
+ display: flex;
3783
+ align-items: center;
3784
+ gap: 0.25rem;
3785
+ padding: 0.25rem 0.5rem;
3786
+ font-size: 0.625rem;
3787
+ font-weight: 500;
3788
+ color: #64748b;
3789
+ background: #f1f5f9;
3790
+ border: none;
3791
+ border-radius: 0.25rem;
3792
+ cursor: pointer;
3793
+ transition: all 0.15s;
3794
+ }
3795
+
3796
+ .vpg-ai-action-btn:hover {
3797
+ background: #e2e8f0;
3798
+ color: #475569;
3799
+ }
3800
+
3801
+ .vpg-ai-action-btn svg {
3802
+ width: 0.625rem;
3803
+ height: 0.625rem;
3804
+ }
3805
+
3806
+ .vpg-ai-action-btn.vpg-ai-action-primary {
3807
+ background: #eef2ff;
3808
+ color: #4f46e5;
3809
+ }
3810
+
3811
+ .vpg-ai-action-btn.vpg-ai-action-primary:hover {
3812
+ background: #e0e7ff;
3813
+ }
3814
+
3815
+ /* Preview Panel (3/4) */
3816
+ .vpg-ai-preview-panel {
3817
+ flex: 1;
3818
+ display: flex;
3819
+ flex-direction: column;
3820
+ min-width: 0;
3821
+ background: #f8fafc;
3822
+ }
3823
+
3824
+ .vpg-ai-preview-header {
3825
+ display: flex;
3826
+ flex-direction: column;
3827
+ background: white;
3828
+ border-bottom: 1px solid #e2e8f0;
3829
+ }
3830
+
3831
+ .vpg-ai-preview-title-row {
3832
+ display: flex;
3833
+ align-items: center;
3834
+ justify-content: space-between;
3835
+ padding: 0.5rem 0.75rem;
3836
+ }
3837
+
3838
+ .vpg-ai-preview-header h3 {
3839
+ margin: 0;
3840
+ font-size: 0.875rem;
3841
+ font-weight: 600;
3842
+ color: #1e293b;
3843
+ }
3844
+
3845
+ .vpg-ai-preview-meta {
3846
+ display: flex;
3847
+ align-items: center;
3848
+ gap: 0.5rem;
3849
+ }
3850
+
3851
+ .vpg-ai-preview-count {
3852
+ font-size: 0.75rem;
3853
+ color: #64748b;
3854
+ padding: 0.125rem 0.5rem;
3855
+ background: #f1f5f9;
3856
+ border-radius: 0.25rem;
3857
+ }
3858
+
3859
+ .vpg-ai-preview-sql-btn,
3860
+ .vpg-ai-preview-view-btn {
3861
+ display: flex;
3862
+ align-items: center;
3863
+ gap: 0.25rem;
3864
+ padding: 0.25rem 0.5rem;
3865
+ font-size: 0.6875rem;
3866
+ font-weight: 500;
3867
+ color: #64748b;
3868
+ background: #f1f5f9;
3869
+ border: none;
3870
+ border-radius: 0.25rem;
3871
+ cursor: pointer;
3872
+ transition: all 0.15s;
3873
+ }
3874
+
3875
+ .vpg-ai-preview-sql-btn:hover,
3876
+ .vpg-ai-preview-view-btn:hover {
3877
+ background: #e2e8f0;
3878
+ color: #475569;
3879
+ }
3880
+
3881
+ .vpg-ai-preview-view-btn {
3882
+ background: #eef2ff;
3883
+ color: #4f46e5;
3884
+ }
3885
+
3886
+ .vpg-ai-preview-view-btn:hover {
3887
+ background: #e0e7ff;
3888
+ }
3889
+
3890
+ .vpg-ai-preview-sql-btn svg,
3891
+ .vpg-ai-preview-view-btn svg {
3892
+ width: 0.875rem;
3893
+ height: 0.875rem;
3894
+ }
3895
+
3896
+ /* Schema bar in preview header */
3897
+ .vpg-ai-schema-bar {
3898
+ display: flex;
3899
+ flex-wrap: wrap;
3900
+ gap: 0.25rem;
3901
+ padding: 0.5rem 0.75rem;
3902
+ background: #fafbfc;
3903
+ border-top: 1px solid #f1f5f9;
3904
+ max-height: 80px;
3905
+ overflow-y: auto;
3906
+ }
3907
+
3908
+ .vpg-ai-schema-chip {
3909
+ display: inline-flex;
3910
+ align-items: center;
3911
+ gap: 0.25rem;
3912
+ padding: 0.25rem 0.5rem;
3913
+ background: white;
3914
+ border: 1px solid #e2e8f0;
3915
+ border-radius: 0.25rem;
3916
+ font-size: 0.6875rem;
3917
+ }
3918
+
3919
+ .vpg-ai-chip-type {
3920
+ width: 1rem;
3921
+ height: 1rem;
3922
+ display: flex;
3923
+ align-items: center;
3924
+ justify-content: center;
3925
+ background: #e2e8f0;
3926
+ border-radius: 0.125rem;
3927
+ font-size: 0.625rem;
3928
+ font-weight: 700;
3929
+ color: #64748b;
3930
+ }
3931
+
3932
+ .vpg-ai-chip-name {
3933
+ color: #475569;
3934
+ font-family: ui-monospace, monospace;
3935
+ }
3936
+
3937
+ /* SQL Panel (collapsible, above the table) */
3938
+ .vpg-ai-sql-panel {
3939
+ background: #f8fafc;
3940
+ border-bottom: 1px solid #e2e8f0;
3941
+ }
3942
+
3943
+ .vpg-ai-sql-panel-header {
3944
+ display: flex;
3945
+ align-items: center;
3946
+ justify-content: space-between;
3947
+ padding: 0.5rem 0.75rem;
3948
+ background: #f1f5f9;
3949
+ border-bottom: 1px solid #e2e8f0;
3950
+ }
3951
+
3952
+ .vpg-ai-sql-panel-title {
3953
+ font-size: 0.6875rem;
3954
+ font-weight: 600;
3955
+ color: #64748b;
3956
+ text-transform: uppercase;
3957
+ letter-spacing: 0.025em;
3958
+ }
3959
+
3960
+ .vpg-ai-sql-panel-actions {
3961
+ display: flex;
3962
+ align-items: center;
3963
+ gap: 0.25rem;
3964
+ }
3965
+
3966
+ .vpg-ai-sql-panel-close {
3967
+ display: flex;
3968
+ align-items: center;
3969
+ justify-content: center;
3970
+ width: 1.25rem;
3971
+ height: 1.25rem;
3972
+ background: transparent;
3973
+ border: none;
3974
+ border-radius: 0.25rem;
3975
+ color: #94a3b8;
3976
+ cursor: pointer;
3977
+ transition: all 0.15s;
3978
+ }
3979
+
3980
+ .vpg-ai-sql-panel-close:hover {
3981
+ background: #e2e8f0;
3982
+ color: #475569;
3983
+ }
3984
+
3985
+ .vpg-ai-sql-panel-close svg {
3986
+ width: 0.75rem;
3987
+ height: 0.75rem;
3988
+ }
3989
+
3990
+ .vpg-ai-sql-panel-code {
3991
+ margin: 0;
3992
+ padding: 0.75rem;
3993
+ overflow-x: auto;
3994
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
3995
+ font-size: 0.75rem;
3996
+ line-height: 1.5;
3997
+ color: #334155;
3998
+ background: #f8fafc;
3999
+ white-space: pre-wrap;
4000
+ word-break: break-word;
4001
+ max-height: 150px;
4002
+ overflow-y: auto;
4003
+ }
4004
+
4005
+ .vpg-ai-sql-panel-code code {
4006
+ font-family: inherit;
4007
+ }
4008
+
4009
+ /* SQL button active state */
4010
+ .vpg-ai-preview-sql-btn.vpg-ai-sql-active {
4011
+ background: #eef2ff;
4012
+ color: #6366f1;
4013
+ border-color: #c7d2fe;
4014
+ }
4015
+
4016
+ /* Loading state */
4017
+ .vpg-ai-preview-loading {
4018
+ flex: 1;
4019
+ display: flex;
4020
+ flex-direction: column;
4021
+ align-items: center;
4022
+ justify-content: center;
4023
+ gap: 0.75rem;
4024
+ padding: 2rem;
4025
+ }
4026
+
4027
+ .vpg-ai-preview-spinner {
4028
+ width: 2rem;
4029
+ height: 2rem;
4030
+ border: 2px solid #e2e8f0;
4031
+ border-top-color: #6366f1;
4032
+ border-radius: 50%;
4033
+ animation: vpg-ai-spin 1s linear infinite;
4034
+ }
4035
+
4036
+ @keyframes vpg-ai-spin {
4037
+ to { transform: rotate(360deg); }
4038
+ }
4039
+
4040
+ .vpg-ai-preview-loading span {
4041
+ font-size: 0.8125rem;
4042
+ color: #64748b;
4043
+ }
4044
+
4045
+ /* Ready state (schema loaded, no data yet) */
4046
+ .vpg-ai-preview-ready {
4047
+ flex: 1;
4048
+ display: flex;
4049
+ flex-direction: column;
4050
+ align-items: center;
4051
+ justify-content: center;
4052
+ padding: 2rem;
4053
+ text-align: center;
4054
+ }
4055
+
4056
+ .vpg-ai-preview-ready-icon {
4057
+ width: 4rem;
4058
+ height: 4rem;
4059
+ background: #ecfdf5;
4060
+ border-radius: 1rem;
4061
+ display: flex;
4062
+ align-items: center;
4063
+ justify-content: center;
4064
+ color: #10b981;
4065
+ margin-bottom: 1rem;
4066
+ }
4067
+
4068
+ .vpg-ai-preview-ready-icon svg {
4069
+ width: 2rem;
4070
+ height: 2rem;
4071
+ }
4072
+
4073
+ .vpg-ai-preview-ready p {
4074
+ margin: 0 0 0.25rem;
4075
+ font-size: 1rem;
4076
+ font-weight: 600;
4077
+ color: #1e293b;
4078
+ }
4079
+
4080
+ .vpg-ai-preview-ready span {
4081
+ font-size: 0.875rem;
4082
+ color: #64748b;
4083
+ }
4084
+
4085
+ .vpg-ai-preview-hint {
4086
+ margin-top: 1rem;
4087
+ padding: 0.5rem 1rem;
4088
+ background: #f8fafc;
4089
+ border-radius: 0.5rem;
4090
+ font-size: 0.8125rem;
4091
+ color: #64748b;
4092
+ }
4093
+
4094
+ /* Preview empty state */
4095
+ .vpg-ai-preview-empty {
4096
+ flex: 1;
4097
+ display: flex;
4098
+ flex-direction: column;
4099
+ align-items: center;
4100
+ justify-content: center;
4101
+ padding: 2rem;
4102
+ text-align: center;
4103
+ }
4104
+
4105
+ .vpg-ai-preview-empty-icon {
4106
+ width: 3.5rem;
4107
+ height: 3.5rem;
4108
+ background: #e2e8f0;
4109
+ border-radius: 0.75rem;
4110
+ display: flex;
4111
+ align-items: center;
4112
+ justify-content: center;
4113
+ color: #94a3b8;
4114
+ margin-bottom: 0.75rem;
4115
+ }
4116
+
4117
+ .vpg-ai-preview-empty-icon svg {
4118
+ width: 1.75rem;
4119
+ height: 1.75rem;
4120
+ }
4121
+
4122
+ .vpg-ai-preview-empty p {
4123
+ margin: 0 0 0.25rem;
4124
+ font-size: 0.8125rem;
4125
+ font-weight: 500;
4126
+ color: #475569;
4127
+ }
4128
+
4129
+ .vpg-ai-preview-empty span {
4130
+ font-size: 0.75rem;
4131
+ color: #94a3b8;
4132
+ }
4133
+
4134
+ /* Preview table */
4135
+ .vpg-ai-preview-table-container {
4136
+ flex: 1;
4137
+ overflow: auto;
4138
+ }
4139
+
4140
+ .vpg-ai-preview-table {
4141
+ width: 100%;
4142
+ border-collapse: collapse;
4143
+ font-size: 0.6875rem;
4144
+ }
4145
+
4146
+ .vpg-ai-preview-table thead {
4147
+ position: sticky;
4148
+ top: 0;
4149
+ z-index: 10;
4150
+ }
4151
+
4152
+ .vpg-ai-preview-table th {
4153
+ padding: 0.375rem 0.625rem;
4154
+ text-align: left;
4155
+ font-size: 0.625rem;
4156
+ font-weight: 600;
4157
+ color: #475569;
4158
+ text-transform: uppercase;
4159
+ letter-spacing: 0.025em;
4160
+ background: #f1f5f9;
4161
+ border-bottom: 1px solid #e2e8f0;
4162
+ white-space: nowrap;
4163
+ }
4164
+
4165
+ .vpg-ai-preview-table td {
4166
+ padding: 0.375rem 0.625rem;
4167
+ color: #334155;
4168
+ background: white;
4169
+ border-bottom: 1px solid #f1f5f9;
4170
+ white-space: nowrap;
4171
+ max-width: 180px;
4172
+ overflow: hidden;
4173
+ text-overflow: ellipsis;
4174
+ }
4175
+
4176
+ .vpg-ai-preview-table tr:hover td {
4177
+ background: #f8fafc;
4178
+ }
4179
+
4180
+ .vpg-ai-preview-more {
4181
+ padding: 0.5rem 0.75rem;
4182
+ text-align: center;
4183
+ font-size: 0.6875rem;
4184
+ color: #64748b;
4185
+ background: white;
4186
+ border-top: 1px solid #e2e8f0;
4187
+ }
4188
+
4189
+ .vpg-ai-preview-more button {
4190
+ color: #4f46e5;
4191
+ background: none;
4192
+ border: none;
4193
+ cursor: pointer;
4194
+ font-weight: 500;
4195
+ margin-left: 0.25rem;
4196
+ }
4197
+
4198
+ .vpg-ai-preview-more button:hover {
4199
+ text-decoration: underline;
4200
+ }
4201
+
4202
+ /* Dark theme */
4203
+ .vpg-ai-analyst.vpg-theme-dark {
4204
+ background: #0f172a;
4205
+ }
4206
+
4207
+ .vpg-theme-dark .vpg-ai-picker-header h2 {
4208
+ color: #f1f5f9;
4209
+ }
4210
+
4211
+ .vpg-theme-dark .vpg-ai-picker-header p {
4212
+ color: #94a3b8;
4213
+ }
4214
+
4215
+ .vpg-theme-dark .vpg-ai-analyst .vpg-ai-search {
4216
+ background: #1e293b;
4217
+ border-color: #334155;
4218
+ }
4219
+
4220
+ .vpg-theme-dark .vpg-ai-search-input {
4221
+ color: #e2e8f0;
4222
+ }
4223
+
4224
+ .vpg-theme-dark .vpg-ai-datasource-card {
4225
+ background: #1e293b;
4226
+ border-color: #334155;
4227
+ }
4228
+
4229
+ .vpg-theme-dark .vpg-ai-datasource-card:hover {
4230
+ border-color: #6366f1;
4231
+ }
4232
+
4233
+ .vpg-theme-dark .vpg-ai-datasource-name {
4234
+ color: #f1f5f9;
4235
+ }
4236
+
4237
+ .vpg-theme-dark .vpg-ai-chat-panel {
4238
+ background: #1e293b;
4239
+ border-color: #334155;
4240
+ }
4241
+
4242
+ .vpg-theme-dark .vpg-ai-chat-header {
4243
+ border-color: #334155;
4244
+ }
4245
+
4246
+ .vpg-theme-dark .vpg-ai-back-btn:hover {
4247
+ background: #334155;
4248
+ }
4249
+
4250
+ .vpg-theme-dark .vpg-ai-clear-btn:hover {
4251
+ background: rgba(220, 38, 38, 0.15);
4252
+ color: #f87171;
4253
+ }
4254
+
4255
+ .vpg-theme-dark .vpg-ai-chat-name {
4256
+ color: #f1f5f9;
4257
+ }
4258
+
4259
+ .vpg-theme-dark .vpg-ai-welcome p {
4260
+ color: #94a3b8;
4261
+ }
4262
+
4263
+ .vpg-theme-dark .vpg-ai-suggestions button {
4264
+ background: #334155;
4265
+ color: #a5b4fc;
4266
+ }
4267
+
4268
+ .vpg-theme-dark .vpg-ai-suggestions button:hover {
4269
+ background: #475569;
4270
+ }
4271
+
4272
+ .vpg-theme-dark .vpg-ai-msg-assistant {
4273
+ background: #334155;
4274
+ color: #e2e8f0;
4275
+ }
4276
+
4277
+ .vpg-theme-dark .vpg-ai-msg-result {
4278
+ background: #1e293b;
4279
+ border-color: #334155;
4280
+ }
4281
+
4282
+ .vpg-theme-dark .vpg-ai-msg-result:hover {
4283
+ border-color: #475569;
4284
+ }
4285
+
4286
+ .vpg-theme-dark .vpg-ai-msg-result.vpg-ai-msg-selected {
4287
+ border-color: #6366f1;
4288
+ }
4289
+
4290
+ .vpg-theme-dark .vpg-ai-result-badge {
4291
+ background: rgba(16, 185, 129, 0.15);
4292
+ color: #34d399;
4293
+ }
4294
+
4295
+ .vpg-theme-dark .vpg-ai-result-content {
4296
+ color: #e2e8f0;
4297
+ }
4298
+
4299
+ .vpg-theme-dark .vpg-ai-typing {
4300
+ background: #334155;
4301
+ }
4302
+
4303
+ .vpg-theme-dark .vpg-ai-input-area {
4304
+ background: #1e293b;
4305
+ border-color: #334155;
4306
+ }
4307
+
4308
+ .vpg-theme-dark .vpg-ai-input {
4309
+ background: #0f172a;
4310
+ border-color: #334155;
4311
+ color: #e2e8f0;
4312
+ }
4313
+
4314
+ .vpg-theme-dark .vpg-ai-input:focus {
4315
+ border-color: #6366f1;
4316
+ }
4317
+
4318
+ .vpg-theme-dark .vpg-ai-action-btn {
4319
+ background: #334155;
4320
+ color: #94a3b8;
4321
+ }
4322
+
4323
+ .vpg-theme-dark .vpg-ai-action-btn:hover {
4324
+ background: #475569;
4325
+ color: #e2e8f0;
4326
+ }
4327
+
4328
+ .vpg-theme-dark .vpg-ai-action-btn.vpg-ai-action-primary {
4329
+ background: rgba(99, 102, 241, 0.2);
4330
+ color: #a5b4fc;
4331
+ }
4332
+
4333
+ .vpg-theme-dark .vpg-ai-preview-panel {
4334
+ background: #0f172a;
4335
+ }
4336
+
4337
+ .vpg-theme-dark .vpg-ai-preview-header {
4338
+ background: #1e293b;
4339
+ border-color: #334155;
4340
+ }
4341
+
4342
+ .vpg-theme-dark .vpg-ai-preview-header h3 {
4343
+ color: #f1f5f9;
4344
+ }
4345
+
4346
+ .vpg-theme-dark .vpg-ai-preview-sql-btn,
4347
+ .vpg-theme-dark .vpg-ai-preview-view-btn {
4348
+ background: #334155;
4349
+ color: #94a3b8;
4350
+ }
4351
+
4352
+ .vpg-theme-dark .vpg-ai-preview-sql-btn:hover,
4353
+ .vpg-theme-dark .vpg-ai-preview-view-btn:hover {
4354
+ background: #475569;
4355
+ color: #e2e8f0;
4356
+ }
4357
+
4358
+ .vpg-theme-dark .vpg-ai-preview-view-btn {
4359
+ background: rgba(99, 102, 241, 0.2);
4360
+ color: #a5b4fc;
4361
+ }
4362
+
4363
+ .vpg-theme-dark .vpg-ai-preview-count {
4364
+ background: #334155;
4365
+ color: #94a3b8;
4366
+ }
4367
+
4368
+ .vpg-theme-dark .vpg-ai-schema-bar {
4369
+ background: #0f172a;
4370
+ border-color: #334155;
4371
+ }
4372
+
4373
+ .vpg-theme-dark .vpg-ai-schema-chip {
4374
+ background: #1e293b;
4375
+ border-color: #334155;
4376
+ }
4377
+
4378
+ .vpg-theme-dark .vpg-ai-chip-type {
4379
+ background: #334155;
4380
+ color: #94a3b8;
4381
+ }
4382
+
4383
+ .vpg-theme-dark .vpg-ai-chip-name {
4384
+ color: #e2e8f0;
4385
+ }
4386
+
4387
+ .vpg-theme-dark .vpg-ai-preview-loading span {
4388
+ color: #94a3b8;
4389
+ }
4390
+
4391
+ .vpg-theme-dark .vpg-ai-preview-spinner {
4392
+ border-color: #334155;
4393
+ border-top-color: #6366f1;
4394
+ }
4395
+
4396
+ .vpg-theme-dark .vpg-ai-preview-ready-icon {
4397
+ background: rgba(16, 185, 129, 0.15);
4398
+ }
4399
+
4400
+ .vpg-theme-dark .vpg-ai-preview-ready p {
4401
+ color: #f1f5f9;
4402
+ }
4403
+
4404
+ .vpg-theme-dark .vpg-ai-preview-ready span {
4405
+ color: #94a3b8;
4406
+ }
4407
+
4408
+ .vpg-theme-dark .vpg-ai-preview-hint {
4409
+ background: #1e293b;
4410
+ color: #94a3b8;
4411
+ }
4412
+
4413
+ .vpg-theme-dark .vpg-ai-preview-empty-icon {
4414
+ background: #334155;
4415
+ }
4416
+
4417
+ .vpg-theme-dark .vpg-ai-preview-empty p {
4418
+ color: #e2e8f0;
4419
+ }
4420
+
4421
+ .vpg-theme-dark .vpg-ai-preview-table th {
4422
+ background: #1e293b;
4423
+ border-color: #334155;
4424
+ color: #94a3b8;
4425
+ }
4426
+
4427
+ .vpg-theme-dark .vpg-ai-preview-table td {
4428
+ background: #0f172a;
4429
+ border-color: #1e293b;
4430
+ color: #e2e8f0;
4431
+ }
4432
+
4433
+ .vpg-theme-dark .vpg-ai-preview-table tr:hover td {
4434
+ background: #1e293b;
4435
+ }
4436
+
4437
+ .vpg-theme-dark .vpg-ai-preview-more {
4438
+ background: #1e293b;
4439
+ border-color: #334155;
4440
+ }
4441
+
4442
+ .vpg-theme-dark .vpg-ai-model-name {
4443
+ color: #64748b;
4444
+ }
4445
+
4446
+ .vpg-theme-dark .vpg-ai-sql-panel {
4447
+ background: #0f172a;
4448
+ border-color: #334155;
4449
+ }
4450
+
4451
+ .vpg-theme-dark .vpg-ai-sql-panel-header {
4452
+ background: #1e293b;
4453
+ border-color: #334155;
4454
+ }
4455
+
4456
+ .vpg-theme-dark .vpg-ai-sql-panel-title {
4457
+ color: #94a3b8;
4458
+ }
4459
+
4460
+ .vpg-theme-dark .vpg-ai-sql-panel-close:hover {
4461
+ background: #334155;
4462
+ color: #e2e8f0;
4463
+ }
4464
+
4465
+ .vpg-theme-dark .vpg-ai-sql-panel-code {
4466
+ background: #0f172a;
4467
+ color: #e2e8f0;
4468
+ }
4469
+
4470
+ .vpg-theme-dark .vpg-ai-preview-sql-btn.vpg-ai-sql-active {
4471
+ background: rgba(99, 102, 241, 0.2);
4472
+ color: #a5b4fc;
4473
+ }
4474
+