apiskill 0.1.1 → 0.1.3

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
@@ -30,8 +30,12 @@ button {
30
30
  }
31
31
 
32
32
  .app-shell {
33
+ display: flex;
34
+ flex-direction: column;
35
+ height: 100svh;
33
36
  min-height: 100vh;
34
- padding: 18px;
37
+ padding: 18px 18px 0;
38
+ overflow: hidden;
35
39
  }
36
40
 
37
41
  .topbar {
@@ -411,6 +415,44 @@ p {
411
415
  justify-content: flex-end;
412
416
  }
413
417
 
418
+ .document-toolbar {
419
+ grid-template-columns: minmax(0, 1fr) auto;
420
+ align-items: center;
421
+ }
422
+
423
+ .document-source-summary {
424
+ display: grid;
425
+ min-width: 0;
426
+ gap: 3px;
427
+ }
428
+
429
+ .document-source-summary > span {
430
+ color: #6a7685;
431
+ font-size: 12px;
432
+ font-weight: 700;
433
+ }
434
+
435
+ .document-source-summary strong,
436
+ .document-source-summary small {
437
+ overflow: hidden;
438
+ text-overflow: ellipsis;
439
+ white-space: nowrap;
440
+ }
441
+
442
+ .document-source-summary strong {
443
+ color: #1d2936;
444
+ font-size: 13px;
445
+ }
446
+
447
+ .document-source-summary small {
448
+ color: #176b4f;
449
+ font-size: 12px;
450
+ }
451
+
452
+ .document-toolbar > .version-message {
453
+ grid-column: 1 / -1;
454
+ }
455
+
414
456
  .source-tabs {
415
457
  display: inline-flex;
416
458
  width: fit-content;
@@ -447,10 +489,86 @@ p {
447
489
  gap: 10px;
448
490
  }
449
491
 
450
- .blank-document-dialog-body {
492
+ .document-dialog {
493
+ width: min(760px, 100%);
494
+ max-height: calc(100vh - 40px);
495
+ overflow: auto;
496
+ border: 1px solid #d7dde4;
497
+ border-radius: 8px;
498
+ background: #fff;
499
+ box-shadow: 0 18px 60px rgba(18, 25, 35, 0.22);
500
+ animation: dialog-enter 160ms ease-out;
501
+ }
502
+
503
+ .document-dialog-tabs {
504
+ display: flex;
505
+ gap: 2px;
506
+ overflow-x: auto;
507
+ padding: 10px 20px 0;
508
+ border-bottom: 1px solid #e5eaf0;
509
+ }
510
+
511
+ .document-dialog-tabs button {
512
+ display: inline-flex;
513
+ flex: 0 0 auto;
514
+ align-items: center;
515
+ justify-content: center;
516
+ gap: 6px;
517
+ min-height: 38px;
518
+ padding: 0 12px;
519
+ border: 0;
520
+ border-bottom: 2px solid transparent;
521
+ color: #5c6877;
522
+ background: transparent;
523
+ font-size: 13px;
524
+ font-weight: 800;
525
+ }
526
+
527
+ .document-dialog-tabs button.active {
528
+ border-bottom-color: #1b6b65;
529
+ color: #155a55;
530
+ }
531
+
532
+ .document-dialog-body {
533
+ min-height: 174px;
534
+ padding: 20px;
535
+ background: #f7f9fb;
536
+ }
537
+
538
+ .blank-document-fields {
451
539
  display: grid;
452
- gap: 10px;
453
- padding: 16px 20px 2px;
540
+ gap: 12px;
541
+ }
542
+
543
+ .document-source-input {
544
+ min-height: 46px;
545
+ background: #fff;
546
+ }
547
+
548
+ .document-file-picker {
549
+ display: grid;
550
+ grid-template-columns: auto minmax(0, 1fr);
551
+ align-content: center;
552
+ min-height: 134px;
553
+ padding: 22px;
554
+ background: #fff;
555
+ }
556
+
557
+ .document-file-picker > svg {
558
+ grid-row: 1 / span 2;
559
+ }
560
+
561
+ .document-file-picker small {
562
+ color: #748091;
563
+ }
564
+
565
+ .document-dialog-actions {
566
+ gap: 8px;
567
+ padding-top: 18px;
568
+ }
569
+
570
+ .document-dialog-actions .clear-document-source {
571
+ margin-right: auto;
454
572
  }
455
573
 
456
574
  .source-input,
@@ -572,10 +690,10 @@ p {
572
690
 
573
691
  .workspace {
574
692
  display: grid;
693
+ flex: 1 1 auto;
575
694
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
576
695
  gap: 16px;
577
- min-height: 420px;
578
- height: calc(100vh - 270px);
696
+ min-height: 0;
579
697
  margin-top: 16px;
580
698
  }
581
699
 
@@ -697,6 +815,8 @@ p {
697
815
  }
698
816
 
699
817
  .endpoint-list {
818
+ flex: 1 1 auto;
819
+ min-height: 0;
700
820
  overflow: auto;
701
821
  display: flex;
702
822
  flex-direction: column;
@@ -1399,6 +1519,7 @@ td code {
1399
1519
  place-items: center;
1400
1520
  padding: 20px;
1401
1521
  background: rgba(18, 25, 35, 0.48);
1522
+ animation: backdrop-enter 140ms ease-out;
1402
1523
  }
1403
1524
 
1404
1525
  .import-dialog {
@@ -1930,9 +2051,24 @@ td code {
1930
2051
  }
1931
2052
  }
1932
2053
 
2054
+ @keyframes backdrop-enter {
2055
+ from {
2056
+ opacity: 0;
2057
+ }
2058
+ }
2059
+
2060
+ @keyframes dialog-enter {
2061
+ from {
2062
+ opacity: 0;
2063
+ transform: translateY(8px);
2064
+ }
2065
+ }
2066
+
1933
2067
  @media (max-width: 980px) {
1934
2068
  .app-shell {
2069
+ height: auto;
1935
2070
  padding: 12px;
2071
+ overflow: visible;
1936
2072
  }
1937
2073
 
1938
2074
  .topbar {
@@ -1996,6 +2132,10 @@ td code {
1996
2132
  flex-wrap: wrap;
1997
2133
  }
1998
2134
 
2135
+ .document-dialog-tabs {
2136
+ width: 100%;
2137
+ }
2138
+
1999
2139
  .source-form {
2000
2140
  grid-template-columns: 1fr;
2001
2141
  }
@@ -2017,6 +2157,7 @@ td code {
2017
2157
 
2018
2158
  .workspace {
2019
2159
  grid-template-columns: 1fr;
2160
+ flex: none;
2020
2161
  height: auto;
2021
2162
  }
2022
2163
 
@@ -2085,6 +2226,31 @@ td code {
2085
2226
  flex: 1;
2086
2227
  }
2087
2228
 
2229
+ .document-dialog {
2230
+ max-height: calc(100vh - 20px);
2231
+ }
2232
+
2233
+ .document-dialog-tabs {
2234
+ display: grid;
2235
+ grid-template-columns: repeat(3, minmax(0, 1fr));
2236
+ overflow: visible;
2237
+ padding-inline: 12px;
2238
+ }
2239
+
2240
+ .document-dialog-tabs button {
2241
+ min-width: 0;
2242
+ padding-inline: 6px;
2243
+ }
2244
+
2245
+ .document-dialog-body {
2246
+ min-height: 210px;
2247
+ padding: 16px;
2248
+ }
2249
+
2250
+ .document-dialog-actions .clear-document-source {
2251
+ margin-right: 0;
2252
+ }
2253
+
2088
2254
  .import-dialog-actions .secondary-button {
2089
2255
  width: 100%;
2090
2256
  }
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');