@scalar/api-reference 0.1.24 → 0.1.25
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Content.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Content/Content.vue.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;;;;;;;;;;;;;;;;;;;;AAwOvC,wBAAkD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRefOnMount.d.ts","sourceRoot":"","sources":["../../src/hooks/useRefOnMount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAkB,MAAM,KAAK,CAAA;AAG9C,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,iBAQ/C"}
|
package/dist/index.js
CHANGED
|
@@ -48431,6 +48431,13 @@ ${closingBraceIndent}]`;
|
|
|
48431
48431
|
"data-v-16147dd7"
|
|
48432
48432
|
]
|
|
48433
48433
|
]);
|
|
48434
|
+
function useRefOnMount(setter) {
|
|
48435
|
+
const value = ref$1(null);
|
|
48436
|
+
onMounted(() => {
|
|
48437
|
+
value.value = setter();
|
|
48438
|
+
});
|
|
48439
|
+
return value;
|
|
48440
|
+
}
|
|
48434
48441
|
const _hoisted_1$1 = [
|
|
48435
48442
|
"onClick"
|
|
48436
48443
|
];
|
|
@@ -48457,6 +48464,26 @@ ${closingBraceIndent}]`;
|
|
|
48457
48464
|
setCollapsedSidebarItem2(props.spec.tags[0].name, true);
|
|
48458
48465
|
}
|
|
48459
48466
|
});
|
|
48467
|
+
const fallBackServer = useRefOnMount(() => {
|
|
48468
|
+
return {
|
|
48469
|
+
url: window.location.origin
|
|
48470
|
+
};
|
|
48471
|
+
});
|
|
48472
|
+
const localServers = computed(() => {
|
|
48473
|
+
if (props.spec.servers.length > 0) {
|
|
48474
|
+
return props.spec.servers;
|
|
48475
|
+
} else if (fallBackServer.value) {
|
|
48476
|
+
return [
|
|
48477
|
+
fallBackServer.value
|
|
48478
|
+
];
|
|
48479
|
+
} else {
|
|
48480
|
+
return [
|
|
48481
|
+
{
|
|
48482
|
+
url: ""
|
|
48483
|
+
}
|
|
48484
|
+
];
|
|
48485
|
+
}
|
|
48486
|
+
});
|
|
48460
48487
|
return (_ctx, _cache) => {
|
|
48461
48488
|
return openBlock(), createElementBlock("div", {
|
|
48462
48489
|
ref_key: "referenceEl",
|
|
@@ -48470,7 +48497,7 @@ ${closingBraceIndent}]`;
|
|
|
48470
48497
|
}, [
|
|
48471
48498
|
createVNode$1(unref(Introduction), {
|
|
48472
48499
|
info: _ctx.spec.info,
|
|
48473
|
-
servers:
|
|
48500
|
+
servers: localServers.value
|
|
48474
48501
|
}, null, 8, [
|
|
48475
48502
|
"info",
|
|
48476
48503
|
"servers"
|
|
@@ -48503,12 +48530,11 @@ ${closingBraceIndent}]`;
|
|
|
48503
48530
|
index === 0 || unref(templateState).collapsedSidebarItems[tag.name] ? (openBlock(true), createElementBlock(Fragment$1, {
|
|
48504
48531
|
key: 1
|
|
48505
48532
|
}, renderList(tag.operations, (operation) => {
|
|
48506
|
-
var _a3;
|
|
48507
48533
|
return openBlock(), createBlock(unref(_sfc_main$4), {
|
|
48508
48534
|
key: operation.operationId,
|
|
48509
48535
|
operation,
|
|
48510
48536
|
parentTag: tag,
|
|
48511
|
-
server:
|
|
48537
|
+
server: localServers.value[0]
|
|
48512
48538
|
}, null, 8, [
|
|
48513
48539
|
"operation",
|
|
48514
48540
|
"parentTag",
|
|
@@ -48524,11 +48550,11 @@ ${closingBraceIndent}]`;
|
|
|
48524
48550
|
};
|
|
48525
48551
|
}
|
|
48526
48552
|
});
|
|
48527
|
-
const
|
|
48553
|
+
const Content_vue_vue_type_style_index_0_scoped_198a7b11_lang = "";
|
|
48528
48554
|
Content = _export_sfc(_sfc_main$1, [
|
|
48529
48555
|
[
|
|
48530
48556
|
"__scopeId",
|
|
48531
|
-
"data-v-
|
|
48557
|
+
"data-v-198a7b11"
|
|
48532
48558
|
]
|
|
48533
48559
|
]);
|
|
48534
48560
|
const _hoisted_1 = {
|
package/dist/style.css
CHANGED
|
@@ -1339,7 +1339,7 @@ to {
|
|
|
1339
1339
|
}
|
|
1340
1340
|
}
|
|
1341
1341
|
|
|
1342
|
-
.render-loading[data-v-
|
|
1342
|
+
.render-loading[data-v-198a7b11] {
|
|
1343
1343
|
height: calc(
|
|
1344
1344
|
var(--scalar-api-reference-full-height) -
|
|
1345
1345
|
var(--scalar-api-reference-theme-header-height)
|
|
@@ -1348,7 +1348,7 @@ to {
|
|
|
1348
1348
|
align-items: center;
|
|
1349
1349
|
justify-content: center;
|
|
1350
1350
|
}
|
|
1351
|
-
.show-more[data-v-
|
|
1351
|
+
.show-more[data-v-198a7b11] {
|
|
1352
1352
|
background: var(--theme-background-1);
|
|
1353
1353
|
appearance: none;
|
|
1354
1354
|
border: none;
|
|
@@ -1366,20 +1366,20 @@ to {
|
|
|
1366
1366
|
margin-bottom: 48px;
|
|
1367
1367
|
position: relative;
|
|
1368
1368
|
}
|
|
1369
|
-
.show-more[data-v-
|
|
1369
|
+
.show-more[data-v-198a7b11]:hover {
|
|
1370
1370
|
color: var(--theme-color-2);
|
|
1371
1371
|
cursor: pointer;
|
|
1372
1372
|
}
|
|
1373
|
-
.show-more-icon[data-v-
|
|
1373
|
+
.show-more-icon[data-v-198a7b11] {
|
|
1374
1374
|
width: 14px;
|
|
1375
1375
|
height: 14px;
|
|
1376
1376
|
margin-left: 3px;
|
|
1377
1377
|
}
|
|
1378
|
-
.show-more[data-v-
|
|
1378
|
+
.show-more[data-v-198a7b11]:active {
|
|
1379
1379
|
box-shadow: 0 0 0 1px var(--theme-border-color);
|
|
1380
1380
|
}
|
|
1381
1381
|
@media (max-width: 1165px) {
|
|
1382
|
-
.show-more[data-v-
|
|
1382
|
+
.show-more[data-v-198a7b11] {
|
|
1383
1383
|
margin-top: -24px;
|
|
1384
1384
|
margin-bottom: 24px;
|
|
1385
1385
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scalar/api-reference",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.25",
|
|
4
4
|
"author": "Scalar",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"engines": {
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"unified": "10.1.2",
|
|
44
44
|
"xmldom": "0.6.0",
|
|
45
45
|
"@scalar/api-client": "0.1.17",
|
|
46
|
-
"@scalar/swagger-editor": "0.1.12",
|
|
47
46
|
"@scalar/use-clipboard": "0.1.4",
|
|
47
|
+
"@scalar/swagger-editor": "0.1.12",
|
|
48
48
|
"@scalar/use-tooltip": "0.1.4"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|