apiskill 0.1.0 → 0.1.2

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/src/styles.css CHANGED
@@ -411,6 +411,44 @@ p {
411
411
  justify-content: flex-end;
412
412
  }
413
413
 
414
+ .document-toolbar {
415
+ grid-template-columns: minmax(0, 1fr) auto;
416
+ align-items: center;
417
+ }
418
+
419
+ .document-source-summary {
420
+ display: grid;
421
+ min-width: 0;
422
+ gap: 3px;
423
+ }
424
+
425
+ .document-source-summary > span {
426
+ color: #6a7685;
427
+ font-size: 12px;
428
+ font-weight: 700;
429
+ }
430
+
431
+ .document-source-summary strong,
432
+ .document-source-summary small {
433
+ overflow: hidden;
434
+ text-overflow: ellipsis;
435
+ white-space: nowrap;
436
+ }
437
+
438
+ .document-source-summary strong {
439
+ color: #1d2936;
440
+ font-size: 13px;
441
+ }
442
+
443
+ .document-source-summary small {
444
+ color: #176b4f;
445
+ font-size: 12px;
446
+ }
447
+
448
+ .document-toolbar > .version-message {
449
+ grid-column: 1 / -1;
450
+ }
451
+
414
452
  .source-tabs {
415
453
  display: inline-flex;
416
454
  width: fit-content;
@@ -447,10 +485,86 @@ p {
447
485
  gap: 10px;
448
486
  }
449
487
 
450
- .blank-document-dialog-body {
488
+ .document-dialog {
489
+ width: min(760px, 100%);
490
+ max-height: calc(100vh - 40px);
491
+ overflow: auto;
492
+ border: 1px solid #d7dde4;
493
+ border-radius: 8px;
494
+ background: #fff;
495
+ box-shadow: 0 18px 60px rgba(18, 25, 35, 0.22);
496
+ animation: dialog-enter 160ms ease-out;
497
+ }
498
+
499
+ .document-dialog-tabs {
500
+ display: flex;
501
+ gap: 2px;
502
+ overflow-x: auto;
503
+ padding: 10px 20px 0;
504
+ border-bottom: 1px solid #e5eaf0;
505
+ }
506
+
507
+ .document-dialog-tabs button {
508
+ display: inline-flex;
509
+ flex: 0 0 auto;
510
+ align-items: center;
511
+ justify-content: center;
512
+ gap: 6px;
513
+ min-height: 38px;
514
+ padding: 0 12px;
515
+ border: 0;
516
+ border-bottom: 2px solid transparent;
517
+ color: #5c6877;
518
+ background: transparent;
519
+ font-size: 13px;
520
+ font-weight: 800;
521
+ }
522
+
523
+ .document-dialog-tabs button.active {
524
+ border-bottom-color: #1b6b65;
525
+ color: #155a55;
526
+ }
527
+
528
+ .document-dialog-body {
529
+ min-height: 174px;
530
+ padding: 20px;
531
+ background: #f7f9fb;
532
+ }
533
+
534
+ .blank-document-fields {
451
535
  display: grid;
452
- gap: 10px;
453
- padding: 16px 20px 2px;
536
+ gap: 12px;
537
+ }
538
+
539
+ .document-source-input {
540
+ min-height: 46px;
541
+ background: #fff;
542
+ }
543
+
544
+ .document-file-picker {
545
+ display: grid;
546
+ grid-template-columns: auto minmax(0, 1fr);
547
+ align-content: center;
548
+ min-height: 134px;
549
+ padding: 22px;
550
+ background: #fff;
551
+ }
552
+
553
+ .document-file-picker > svg {
554
+ grid-row: 1 / span 2;
555
+ }
556
+
557
+ .document-file-picker small {
558
+ color: #748091;
559
+ }
560
+
561
+ .document-dialog-actions {
562
+ gap: 8px;
563
+ padding-top: 18px;
564
+ }
565
+
566
+ .document-dialog-actions .clear-document-source {
567
+ margin-right: auto;
454
568
  }
455
569
 
456
570
  .source-input,
@@ -1399,6 +1513,7 @@ td code {
1399
1513
  place-items: center;
1400
1514
  padding: 20px;
1401
1515
  background: rgba(18, 25, 35, 0.48);
1516
+ animation: backdrop-enter 140ms ease-out;
1402
1517
  }
1403
1518
 
1404
1519
  .import-dialog {
@@ -1930,6 +2045,19 @@ td code {
1930
2045
  }
1931
2046
  }
1932
2047
 
2048
+ @keyframes backdrop-enter {
2049
+ from {
2050
+ opacity: 0;
2051
+ }
2052
+ }
2053
+
2054
+ @keyframes dialog-enter {
2055
+ from {
2056
+ opacity: 0;
2057
+ transform: translateY(8px);
2058
+ }
2059
+ }
2060
+
1933
2061
  @media (max-width: 980px) {
1934
2062
  .app-shell {
1935
2063
  padding: 12px;
@@ -1996,6 +2124,10 @@ td code {
1996
2124
  flex-wrap: wrap;
1997
2125
  }
1998
2126
 
2127
+ .document-dialog-tabs {
2128
+ width: 100%;
2129
+ }
2130
+
1999
2131
  .source-form {
2000
2132
  grid-template-columns: 1fr;
2001
2133
  }
@@ -2085,6 +2217,31 @@ td code {
2085
2217
  flex: 1;
2086
2218
  }
2087
2219
 
2220
+ .document-dialog {
2221
+ max-height: calc(100vh - 20px);
2222
+ }
2223
+
2224
+ .document-dialog-tabs {
2225
+ display: grid;
2226
+ grid-template-columns: repeat(3, minmax(0, 1fr));
2227
+ overflow: visible;
2228
+ padding-inline: 12px;
2229
+ }
2230
+
2231
+ .document-dialog-tabs button {
2232
+ min-width: 0;
2233
+ padding-inline: 6px;
2234
+ }
2235
+
2236
+ .document-dialog-body {
2237
+ min-height: 210px;
2238
+ padding: 16px;
2239
+ }
2240
+
2241
+ .document-dialog-actions .clear-document-source {
2242
+ margin-right: 0;
2243
+ }
2244
+
2088
2245
  .import-dialog-actions .secondary-button {
2089
2246
  width: 100%;
2090
2247
  }
package/vite.config.ts CHANGED
@@ -15,9 +15,10 @@ import {
15
15
  openApiStats,
16
16
  } from './src/manualApiConfig';
17
17
  import { startMockServer } from './scripts/lib/mock-server.mjs';
18
+ import { getDefaultCacheDir } from './scripts/lib/cache-paths.mjs';
18
19
 
19
20
  const appRootDir = process.env.APISKILL_ROOT || process.cwd();
20
- const cacheDir = process.env.APISKILL_CACHE_DIR || resolve(appRootDir, 'cache');
21
+ const cacheDir = getDefaultCacheDir();
21
22
  const versionsDir = resolve(cacheDir, 'versions');
22
23
  const latestMetaPath = resolve(cacheDir, 'latest-import.json');
23
24
  const legacyCachePath = resolve(cacheDir, 'openapi-cache.json');