@scalar/api-reference 1.35.7 → 1.36.0
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/CHANGELOG.md +23 -0
- package/dist/browser/standalone.js +7953 -7994
- package/dist/browser/webpack-stats.json +1 -1
- package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
- package/dist/components/ApiReferenceLayout.vue.js +1 -1
- package/dist/components/ApiReferenceLayout.vue2.js +148 -150
- package/dist/components/Content/Content.vue.d.ts.map +1 -1
- package/dist/components/Content/Content.vue.js +44 -51
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts +2 -1
- package/dist/components/Content/Models/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ClassicLayout.vue.js +2 -2
- package/dist/components/Content/Models/ClassicLayout.vue2.js +31 -33
- package/dist/components/Content/Models/Models.vue.d.ts +2 -2
- package/dist/components/Content/Models/Models.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/Models.vue.js +24 -23
- package/dist/components/Content/Models/ModernLayout.vue.d.ts +1 -0
- package/dist/components/Content/Models/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Models/ModernLayout.vue.js +2 -2
- package/dist/components/Content/Models/ModernLayout.vue2.js +40 -41
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts +1 -2
- package/dist/components/Content/Operations/TraversedEntry.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntry.vue.js +24 -24
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.d.ts.map +1 -1
- package/dist/components/Content/Operations/TraversedEntryContainer.vue.js +1 -1
- package/dist/components/Content/Operations/get-current-index.d.ts +1 -1
- package/dist/components/Content/Operations/get-current-index.d.ts.map +1 -1
- package/dist/components/Content/Operations/get-current-index.js +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/SchemaObjectProperties.vue.js +35 -45
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts +1 -1
- package/dist/components/Content/Schema/SchemaProperty.vue.d.ts.map +1 -1
- package/dist/components/Content/Schema/helpers/sort-property-names.d.ts +16 -0
- package/dist/components/Content/Schema/helpers/sort-property-names.d.ts.map +1 -0
- package/dist/components/Content/Schema/helpers/sort-property-names.js +36 -0
- package/dist/components/Content/Tags/ClassicLayout.vue.d.ts +1 -1
- package/dist/components/Content/Tags/ClassicLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/ClassicLayout.vue.js +2 -2
- package/dist/components/Content/Tags/ClassicLayout.vue2.js +1 -1
- package/dist/components/Content/Tags/ModernLayout.vue.d.ts +1 -1
- package/dist/components/Content/Tags/ModernLayout.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/ModernLayout.vue.js +2 -2
- package/dist/components/Content/Tags/ModernLayout.vue2.js +2 -2
- package/dist/components/Content/Tags/Tag.vue.d.ts +1 -1
- package/dist/components/Content/Tags/Tag.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/TagSection.vue.d.ts +1 -1
- package/dist/components/Content/Tags/TagSection.vue.d.ts.map +1 -1
- package/dist/components/Content/Tags/TagSection.vue.js +4 -4
- package/dist/components/MobileHeader.vue.js +2 -2
- package/dist/components/MobileHeader.vue2.js +1 -1
- package/dist/components/OperationsList/OperationsList.vue.d.ts +1 -1
- package/dist/components/OperationsList/OperationsList.vue.d.ts.map +1 -1
- package/dist/components/OperationsList/OperationsList.vue.js +1 -1
- package/dist/components/OperationsList/OperationsList.vue2.js +9 -11
- package/dist/components/OperationsList/OperationsListItem.vue.d.ts +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.d.ts.map +1 -1
- package/dist/components/OperationsList/OperationsListItem.vue.js +2 -2
- package/dist/components/OperationsList/OperationsListItem.vue2.js +24 -27
- package/dist/components/Section/Section.vue.d.ts.map +1 -1
- package/dist/components/Section/Section.vue.js +2 -2
- package/dist/components/Section/Section.vue2.js +12 -13
- package/dist/components/Section/SectionAccordion.vue.d.ts.map +1 -1
- package/dist/components/Section/SectionAccordion.vue.js +1 -1
- package/dist/components/Section/SectionAccordion.vue2.js +36 -37
- package/dist/components/ShowMoreButton.vue.js +2 -2
- package/dist/components/ShowMoreButton.vue2.js +3 -3
- package/dist/features/Operation/Operation.vue.d.ts.map +1 -1
- package/dist/features/Operation/Operation.vue.js +32 -22
- package/dist/features/Operation/components/RequestBody.vue.d.ts.map +1 -1
- package/dist/features/Operation/components/RequestBody.vue.js +1 -1
- package/dist/features/Operation/components/RequestBody.vue2.js +59 -47
- package/dist/features/Operation/helpers/get-first-server.d.ts +9 -0
- package/dist/features/Operation/helpers/get-first-server.d.ts.map +1 -0
- package/dist/features/Operation/helpers/get-first-server.js +20 -0
- package/dist/features/Search/components/SearchButton.vue.d.ts +2 -0
- package/dist/features/Search/components/SearchButton.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchButton.vue.js +19 -17
- package/dist/features/Search/components/SearchModal.vue.d.ts +2 -1
- package/dist/features/Search/components/SearchModal.vue.d.ts.map +1 -1
- package/dist/features/Search/components/SearchModal.vue.js +2 -2
- package/dist/features/Search/components/SearchModal.vue2.js +74 -75
- package/dist/features/Search/helpers/create-search-index.d.ts +2 -2
- package/dist/features/Search/helpers/create-search-index.d.ts.map +1 -1
- package/dist/features/Search/helpers/create-search-index.js +68 -66
- package/dist/features/Search/hooks/useSearchIndex.d.ts +3 -2
- package/dist/features/Search/hooks/useSearchIndex.d.ts.map +1 -1
- package/dist/features/Search/hooks/useSearchIndex.js +13 -13
- package/dist/features/Search/types.d.ts +1 -1
- package/dist/features/Search/types.d.ts.map +1 -1
- package/dist/features/api-client-modal/useApiClient.d.ts +20 -20
- package/dist/helpers/test-utils.d.ts +367 -5
- package/dist/helpers/test-utils.d.ts.map +1 -1
- package/dist/hooks/useNavState.d.ts +1 -15
- package/dist/hooks/useNavState.d.ts.map +1 -1
- package/dist/hooks/useNavState.js +29 -53
- package/dist/index.d.ts +5 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -20
- package/dist/style.css +1 -1
- package/dist/{features/sidebar/components/Sidebar.vue.d.ts → v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts} +1 -1
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue.js +7 -0
- package/dist/{features/sidebar/components/Sidebar.vue2.js → v2/blocks/scalar-sidebar-block/components/SidebarBlock.vue2.js} +15 -15
- package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarElement.vue.d.ts +1 -1
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarElement.vue.js +7 -0
- package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarElement.vue2.js +41 -43
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarGroup.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarGroup.vue.js +7 -0
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarHttpBadge.vue.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-sidebar-block/components/SidebarHttpBadge.vue.js +7 -0
- package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarHttpBadge.vue2.js +1 -1
- package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts +385 -0
- package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-sidebar-block/helpers/create-sidebar.js +35 -0
- package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts +189 -0
- package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-sidebar-block/helpers/generate-reverse-index.js +9 -0
- package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/hooks/useSidebar.d.ts +4 -8
- package/dist/v2/blocks/scalar-sidebar-block/hooks/useSidebar.d.ts.map +1 -0
- package/dist/v2/blocks/scalar-sidebar-block/hooks/useSidebar.js +18 -0
- package/dist/v2/blocks/scalar-sidebar-block/index.d.ts +4 -0
- package/dist/v2/blocks/scalar-sidebar-block/index.d.ts.map +1 -0
- package/dist/v2/helpers/map-configuration.d.ts.map +1 -1
- package/package.json +9 -9
- package/dist/features/sidebar/components/Sidebar.vue.d.ts.map +0 -1
- package/dist/features/sidebar/components/Sidebar.vue.js +0 -7
- package/dist/features/sidebar/components/SidebarElement.vue.d.ts.map +0 -1
- package/dist/features/sidebar/components/SidebarElement.vue.js +0 -7
- package/dist/features/sidebar/components/SidebarGroup.vue.d.ts.map +0 -1
- package/dist/features/sidebar/components/SidebarGroup.vue.js +0 -7
- package/dist/features/sidebar/components/SidebarHttpBadge.vue.d.ts.map +0 -1
- package/dist/features/sidebar/components/SidebarHttpBadge.vue.js +0 -7
- package/dist/features/sidebar/helpers/create-sidebar.d.ts +0 -28
- package/dist/features/sidebar/helpers/create-sidebar.d.ts.map +0 -1
- package/dist/features/sidebar/helpers/create-sidebar.js +0 -32
- package/dist/features/sidebar/hooks/useSidebar.d.ts.map +0 -1
- package/dist/features/sidebar/hooks/useSidebar.js +0 -18
- package/dist/features/sidebar/index.d.ts +0 -4
- package/dist/features/sidebar/index.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/get-tag.d.ts +0 -6
- package/dist/features/traverse-schema/helpers/get-tag.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/get-tag.js +0 -7
- package/dist/features/traverse-schema/helpers/traverse-description.d.ts +0 -11
- package/dist/features/traverse-schema/helpers/traverse-description.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/traverse-description.js +0 -32
- package/dist/features/traverse-schema/helpers/traverse-document.d.ts +0 -16
- package/dist/features/traverse-schema/helpers/traverse-document.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/traverse-document.js +0 -33
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts +0 -18
- package/dist/features/traverse-schema/helpers/traverse-paths.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/traverse-paths.js +0 -30
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts +0 -8
- package/dist/features/traverse-schema/helpers/traverse-schemas.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/traverse-schemas.js +0 -21
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts +0 -11
- package/dist/features/traverse-schema/helpers/traverse-tags.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/traverse-tags.js +0 -43
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts +0 -10
- package/dist/features/traverse-schema/helpers/traverse-webhooks.d.ts.map +0 -1
- package/dist/features/traverse-schema/helpers/traverse-webhooks.js +0 -24
- package/dist/features/traverse-schema/index.d.ts +0 -5
- package/dist/features/traverse-schema/index.d.ts.map +0 -1
- package/dist/features/traverse-schema/types.d.ts +0 -55
- package/dist/features/traverse-schema/types.d.ts.map +0 -1
- package/dist/libs/markdown.js +0 -18
- /package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarGroup.vue.d.ts +0 -0
- /package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarGroup.vue2.js +0 -0
- /package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarHttpBadge.vue.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-configuration.d.ts","sourceRoot":"","sources":["../../../src/v2/helpers/map-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAG9D;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,OAAO,CAAC,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"map-configuration.d.ts","sourceRoot":"","sources":["../../../src/v2/helpers/map-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAG9D;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,OAAO,CAAC,yBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAiD0g3C,CAAC;;;gBAAyH,CAAC;;;;;mBAAsS,CAAC;uBAAyC,CAAC;;;gBAA1N,CAAC;;;;kBAA4W,CAAC;;;CADpr4C,CAAA"}
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"vue",
|
|
21
21
|
"vue3"
|
|
22
22
|
],
|
|
23
|
-
"version": "1.
|
|
23
|
+
"version": "1.36.0",
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": ">=20"
|
|
26
26
|
},
|
|
@@ -56,15 +56,15 @@
|
|
|
56
56
|
"type-fest": "^4.41.0",
|
|
57
57
|
"vue": "^3.5.17",
|
|
58
58
|
"zod": "3.24.1",
|
|
59
|
-
"@scalar/
|
|
59
|
+
"@scalar/api-client": "2.5.35",
|
|
60
|
+
"@scalar/components": "0.14.36",
|
|
60
61
|
"@scalar/helpers": "0.0.11",
|
|
62
|
+
"@scalar/code-highlight": "0.2.0",
|
|
61
63
|
"@scalar/icons": "0.4.7",
|
|
62
|
-
"@scalar/
|
|
63
|
-
"@scalar/oas-utils": "0.4.30",
|
|
64
|
-
"@scalar/components": "0.14.35",
|
|
65
|
-
"@scalar/json-magic": "0.5.0",
|
|
64
|
+
"@scalar/json-magic": "0.5.1",
|
|
66
65
|
"@scalar/object-utils": "1.2.7",
|
|
67
|
-
"@scalar/
|
|
66
|
+
"@scalar/oas-utils": "0.4.31",
|
|
67
|
+
"@scalar/openapi-parser": "0.21.1",
|
|
68
68
|
"@scalar/openapi-types": "0.3.7",
|
|
69
69
|
"@scalar/openapi-upgrader": "0.1.0",
|
|
70
70
|
"@scalar/snippetz": "0.4.10",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@scalar/types": "0.2.16",
|
|
73
73
|
"@scalar/use-hooks": "0.2.5",
|
|
74
74
|
"@scalar/use-toasts": "0.8.0",
|
|
75
|
-
"@scalar/workspace-store": "0.15.
|
|
75
|
+
"@scalar/workspace-store": "0.15.8"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@hono/node-server": "^1.11.0",
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
"vite-plugin-banner": "^0.7.1",
|
|
93
93
|
"vite-plugin-css-injected-by-js": "^3.4.0",
|
|
94
94
|
"vitest": "3.2.4",
|
|
95
|
-
"@scalar/build-tooling": "0.2.7",
|
|
96
95
|
"@scalar/core": "0.3.17",
|
|
96
|
+
"@scalar/build-tooling": "0.2.7",
|
|
97
97
|
"@scalar/galaxy": "0.5.8",
|
|
98
98
|
"@scalar/react-renderer": "0.2.1"
|
|
99
99
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/sidebar/components/Sidebar.vue"],"names":[],"mappings":"AAgRA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;AAmSF,QAAA,IAAI,OAAO,IAAU,EAAE,QAAQ,IAAY,CAAE;AAC7C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GACpD;IAAE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AA8BtD,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarElement.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/sidebar/components/SidebarElement.vue"],"names":[],"mappings":"AAwYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAMhE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,cAAc,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAC;AAkSF,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AA8BtD,QAAA,MAAM,eAAe;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarGroup.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/sidebar/components/SidebarGroup.vue"],"names":[],"mappings":"AA8CA,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAC;AAkCF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAmB/C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarHttpBadge.vue.d.ts","sourceRoot":"","sources":["../../../../src/features/sidebar/components/SidebarHttpBadge.vue"],"names":[],"mappings":"AA2CA,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAC;AA8CF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAoB/C,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
-
import { type Ref } from 'vue';
|
|
3
|
-
import type { TraverseSpecOptions } from '../../../features/traverse-schema';
|
|
4
|
-
/** Track which sidebar items are opened */
|
|
5
|
-
type CollapsedSidebarItems = Record<string, boolean>;
|
|
6
|
-
/** Sidebar initialization options */
|
|
7
|
-
export type SidebarOptions = TraverseSpecOptions;
|
|
8
|
-
/**
|
|
9
|
-
* Creating sidebar with only one traversal of the spec
|
|
10
|
-
*
|
|
11
|
-
* TODO:
|
|
12
|
-
* - add the search index creation as well
|
|
13
|
-
* - update docs
|
|
14
|
-
* - tagged models
|
|
15
|
-
*/
|
|
16
|
-
export declare const createSidebar: (dereferencedDocument: Ref<OpenAPIV3_1.Document>, options: SidebarOptions) => {
|
|
17
|
-
collapsedSidebarItems: CollapsedSidebarItems;
|
|
18
|
-
isSidebarOpen: Ref<boolean, boolean>;
|
|
19
|
-
items: import("vue").ComputedRef<{
|
|
20
|
-
entries: import("../../../features/traverse-schema").TraversedEntry[];
|
|
21
|
-
titles: Map<string, string>;
|
|
22
|
-
}>;
|
|
23
|
-
scrollToOperation: (operationId: string, focus?: boolean) => void;
|
|
24
|
-
setCollapsedSidebarItem: (key: string, value: boolean) => boolean;
|
|
25
|
-
toggleCollapsedSidebarItem: (key: string) => boolean;
|
|
26
|
-
};
|
|
27
|
-
export {};
|
|
28
|
-
//# sourceMappingURL=create-sidebar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-sidebar.d.ts","sourceRoot":"","sources":["../../../../src/features/sidebar/helpers/create-sidebar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAGxD,OAAO,EAAE,KAAK,GAAG,EAA2B,MAAM,KAAK,CAAA;AAEvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAIrE,2CAA2C;AAC3C,KAAK,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEpD,qCAAqC;AACrC,MAAM,MAAM,cAAc,GAAG,mBAAmB,CAAA;AAEhD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GAAI,sBAAsB,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,SAAS,cAAc;;;;;;;qCAa5D,MAAM,UAAU,OAAO;mCARzB,MAAM,SAAS,OAAO;sCADnB,MAAM;CAgDhD,CAAA"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { reactive as b, ref as p, computed as S } from "vue";
|
|
2
|
-
import { scrollToId as l } from "@scalar/helpers/dom/scroll-to-id";
|
|
3
|
-
import { traverseDocument as g } from "../../traverse-schema/helpers/traverse-document.js";
|
|
4
|
-
import { lazyBus as v } from "../../../components/Lazy/lazyBus.js";
|
|
5
|
-
const h = (i, o) => {
|
|
6
|
-
const r = b({}), a = p(!1), n = (e) => r[e] = !r[e], c = (e, t) => r[e] = t, m = (e, t) => {
|
|
7
|
-
const s = o.getSectionId(e);
|
|
8
|
-
if (s && s !== e)
|
|
9
|
-
if (r[s])
|
|
10
|
-
l(e, t);
|
|
11
|
-
else {
|
|
12
|
-
const f = v.on((u) => {
|
|
13
|
-
u.loaded === e && (l(e, t), f());
|
|
14
|
-
});
|
|
15
|
-
c(s, !0);
|
|
16
|
-
}
|
|
17
|
-
}, d = S(() => {
|
|
18
|
-
const e = g(i.value, o);
|
|
19
|
-
return o.config.value.defaultOpenAllTags && e.entries.forEach((t) => c(t.id, !0)), e;
|
|
20
|
-
});
|
|
21
|
-
return {
|
|
22
|
-
collapsedSidebarItems: r,
|
|
23
|
-
isSidebarOpen: a,
|
|
24
|
-
items: d,
|
|
25
|
-
scrollToOperation: m,
|
|
26
|
-
setCollapsedSidebarItem: c,
|
|
27
|
-
toggleCollapsedSidebarItem: n
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
export {
|
|
31
|
-
h as createSidebar
|
|
32
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSidebar.d.ts","sourceRoot":"","sources":["../../../../src/features/sidebar/hooks/useSidebar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAmB,MAAM,KAAK,CAAA;AAElE,OAAO,EAAE,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,2CAA2C,CAAA;AAG9F,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAA;AAE/C;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,YAAY,CAAC,OAAO,CAAY,CAAA;AAE7D,KAAK,UAAU,GAAG;IAChB,IAAI,OAAO,CAAA;IACX,CAAC,OAAO,EAAE,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAA;CACvE,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,UAuBxB,CAAA"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { provide as t, inject as n } from "vue";
|
|
2
|
-
import { createSidebar as s } from "../helpers/create-sidebar.js";
|
|
3
|
-
const i = Symbol(), l = (e, r) => {
|
|
4
|
-
if (e && r) {
|
|
5
|
-
const a = s(e, r);
|
|
6
|
-
return t(i, a), a;
|
|
7
|
-
}
|
|
8
|
-
const o = n(i);
|
|
9
|
-
if (!o)
|
|
10
|
-
throw new Error(
|
|
11
|
-
"useSidebar() was called without a collection and no sidebar instance was found. Make sure to call useSidebar(collection) in a parent component first."
|
|
12
|
-
);
|
|
13
|
-
return o;
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
i as SIDEBAR_SYMBOL,
|
|
17
|
-
l as useSidebar
|
|
18
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/sidebar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAE7D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAA"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { TagsMap } from '../../../features/traverse-schema/types';
|
|
2
|
-
type TagMapValue = NonNullable<TagsMap extends Map<string, infer V> ? V : never>;
|
|
3
|
-
/** Grabs the tag from the dict or creates one if it doesn't exist */
|
|
4
|
-
export declare const getTag: (tagsMap: TagsMap, name: string) => TagMapValue;
|
|
5
|
-
export {};
|
|
6
|
-
//# sourceMappingURL=get-tag.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-tag.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/get-tag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAA;AAE/D,KAAK,WAAW,GAAG,WAAW,CAAC,OAAO,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAA;AAEhF,qEAAqE;AACrE,eAAO,MAAM,MAAM,GAAI,SAAS,OAAO,EAAE,MAAM,MAAM,KAAG,WAWvD,CAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { TraversedDescription } from '../../../features/traverse-schema/types';
|
|
2
|
-
import type { Heading } from '@scalar/types/legacy';
|
|
3
|
-
export declare const DEFAULT_INTRODUCTION_SLUG = "introduction";
|
|
4
|
-
/**
|
|
5
|
-
* Creates sidebar entries from markdown headings in the OpenAPI description.
|
|
6
|
-
* Only includes the top two levels of headings for a clean hierarchy.
|
|
7
|
-
*/
|
|
8
|
-
export declare const traverseDescription: (description: string | undefined,
|
|
9
|
-
/** Map of titles for the mobile header */
|
|
10
|
-
titlesMap: Map<string, string>, getHeadingId: (heading: Heading) => string) => TraversedDescription[];
|
|
11
|
-
//# sourceMappingURL=traverse-description.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"traverse-description.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-description.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAA;AAE5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAEnD,eAAO,MAAM,yBAAyB,iBAAiB,CAAA;AAEvD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAC9B,aAAa,MAAM,GAAG,SAAS;AAC/B,0CAA0C;AAC1C,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,cAAc,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,KACzC,oBAAoB,EAmDtB,CAAA"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { getHeadingsFromMarkdown as h, getLowestHeadingLevel as d } from "../../../libs/markdown.js";
|
|
2
|
-
const a = "introduction", g = (n, i, l) => {
|
|
3
|
-
if (!n?.trim())
|
|
4
|
-
return [];
|
|
5
|
-
const c = h(n), o = d(c), r = [];
|
|
6
|
-
let s = null;
|
|
7
|
-
if (n && !n.trim().startsWith("#")) {
|
|
8
|
-
const e = {
|
|
9
|
-
depth: 1,
|
|
10
|
-
value: "Introduction",
|
|
11
|
-
slug: a
|
|
12
|
-
}, t = l(e), u = e.value;
|
|
13
|
-
r.push({
|
|
14
|
-
id: t,
|
|
15
|
-
title: u
|
|
16
|
-
}), i.set(t, u);
|
|
17
|
-
}
|
|
18
|
-
for (const e of c) {
|
|
19
|
-
if (e.depth !== o && e.depth !== o + 1)
|
|
20
|
-
continue;
|
|
21
|
-
const t = {
|
|
22
|
-
id: l(e),
|
|
23
|
-
title: e.value
|
|
24
|
-
};
|
|
25
|
-
i.set(t.id, t.title), e.depth === o ? (t.children = [], r.push(t), s = t) : s && s.children?.push(t);
|
|
26
|
-
}
|
|
27
|
-
return r;
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
a as DEFAULT_INTRODUCTION_SLUG,
|
|
31
|
-
g as traverseDescription
|
|
32
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
-
import type { TraverseSpecOptions, TraversedEntry } from '../../../features/traverse-schema/types';
|
|
3
|
-
/**
|
|
4
|
-
* Travers the OpenAPI Document and ensure we only do it once
|
|
5
|
-
*
|
|
6
|
-
* We are generating the following:
|
|
7
|
-
* - the sidebar
|
|
8
|
-
* - the search index (todo)
|
|
9
|
-
*
|
|
10
|
-
* Currently its called by createSidebar, but we can move this into the de-reference process as a plugin for even more gains
|
|
11
|
-
*/
|
|
12
|
-
export declare const traverseDocument: (document: OpenAPIV3_1.Document, { config, getHeadingId, getOperationId, getWebhookId, getModelId, getTagId }: TraverseSpecOptions) => {
|
|
13
|
-
entries: TraversedEntry[];
|
|
14
|
-
titles: Map<string, string>;
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=traverse-document.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"traverse-document.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAOxD,OAAO,KAAK,EAAW,mBAAmB,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAEpG;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAC3B,UAAU,WAAW,CAAC,QAAQ,EAC9B,8EAA8E,mBAAmB;;;CA8ClG,CAAA"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { traverseDescription as c } from "./traverse-description.js";
|
|
2
|
-
import { traversePaths as f } from "./traverse-paths.js";
|
|
3
|
-
import { traverseSchemas as g } from "./traverse-schemas.js";
|
|
4
|
-
import { traverseTags as S } from "./traverse-tags.js";
|
|
5
|
-
import { traverseWebhooks as u } from "./traverse-webhooks.js";
|
|
6
|
-
const w = (e, { config: a, getHeadingId: h, getOperationId: l, getWebhookId: i, getModelId: n, getTagId: m }) => {
|
|
7
|
-
const r = /* @__PURE__ */ new Map(), t = new Map(
|
|
8
|
-
e.tags?.map((s) => [s.name ?? "Untitled Tag", { tag: s, entries: [] }]) ?? []
|
|
9
|
-
);
|
|
10
|
-
f(e, t, r, l);
|
|
11
|
-
const o = c(e.info?.description, r, h), p = u(e, t, r, i), v = S(e, t, r, {
|
|
12
|
-
getTagId: m,
|
|
13
|
-
tagsSorter: a.value.tagsSorter,
|
|
14
|
-
operationsSorter: a.value.operationsSorter
|
|
15
|
-
});
|
|
16
|
-
if (o.push(...v), p.length && o.push({
|
|
17
|
-
id: i(),
|
|
18
|
-
isWebhooks: !0,
|
|
19
|
-
title: "Webhooks",
|
|
20
|
-
children: p
|
|
21
|
-
}), !a.value.hideModels && e.components?.schemas) {
|
|
22
|
-
const s = g(e, t, r, n);
|
|
23
|
-
s.length && o.push({
|
|
24
|
-
id: n(),
|
|
25
|
-
title: "Models",
|
|
26
|
-
children: s
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
return { entries: o, titles: r };
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
w as traverseDocument
|
|
33
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
-
import type { TraversedEntry } from '../../../features/traverse-schema/types';
|
|
3
|
-
import type { UseNavState } from '../../../hooks/useNavState.js';
|
|
4
|
-
import type { TagObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
5
|
-
/**
|
|
6
|
-
* Traverse the paths of the spec and build a map of tags and operations
|
|
7
|
-
*
|
|
8
|
-
* Default tag is to match what we have now we can improve later
|
|
9
|
-
*/
|
|
10
|
-
export declare const traversePaths: (content: OpenAPIV3_1.Document,
|
|
11
|
-
/** Map of tags and their entries */
|
|
12
|
-
tagsMap: Map<string, {
|
|
13
|
-
tag: TagObject;
|
|
14
|
-
entries: TraversedEntry[];
|
|
15
|
-
}>,
|
|
16
|
-
/** Map of titles for the mobile header */
|
|
17
|
-
titlesMap: Map<string, string>, getOperationId: UseNavState["getOperationId"]) => void;
|
|
18
|
-
//# sourceMappingURL=traverse-paths.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"traverse-paths.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-paths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,kCAAkC,CAAA;AAC1F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEtD,OAAO,KAAK,EAAmB,SAAS,EAAE,MAAM,8DAA8D,CAAA;AAyB9G;;;;GAIG;AACH,eAAO,MAAM,aAAa,GACxB,SAAS,WAAW,CAAC,QAAQ;AAC7B,oCAAoC;AACpC,SAAS,GAAG,CAAC,MAAM,EAAE;IAAE,GAAG,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC;AACnE,0CAA0C;AAC1C,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,gBAAgB,WAAW,CAAC,gBAAgB,CAAC,SA+B9C,CAAA"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { httpMethods as m } from "@scalar/helpers/http/http-methods";
|
|
2
|
-
import { getTag as l } from "./get-tag.js";
|
|
3
|
-
const E = (s, t, r = "Unknown", c, f, h) => {
|
|
4
|
-
const i = h({ ...s, method: t, path: r }, c), e = s.summary?.trim() ? s.summary : r;
|
|
5
|
-
return f.set(i, e), {
|
|
6
|
-
id: i,
|
|
7
|
-
title: e,
|
|
8
|
-
path: r,
|
|
9
|
-
method: t,
|
|
10
|
-
operation: s
|
|
11
|
-
};
|
|
12
|
-
}, a = (s, t, r, c) => {
|
|
13
|
-
Object.entries(s.paths ?? {}).forEach(([f, h]) => {
|
|
14
|
-
Object.entries(h ?? {}).forEach(([e, n]) => {
|
|
15
|
-
if (!(n["x-internal"] || n["x-scalar-ignore"] || !m.has(e)))
|
|
16
|
-
if (n.tags?.length)
|
|
17
|
-
n.tags.forEach((u) => {
|
|
18
|
-
const { tag: g } = l(t, u);
|
|
19
|
-
t.get(u)?.entries.push(E(n, e, f, g, r, c));
|
|
20
|
-
});
|
|
21
|
-
else {
|
|
22
|
-
const { tag: u } = l(t, "default");
|
|
23
|
-
t.get("default")?.entries.push(E(n, e, f, u, r, c));
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
export {
|
|
29
|
-
a as traversePaths
|
|
30
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { TagsMap, TraversedSchema } from '../../../features/traverse-schema/types';
|
|
2
|
-
import type { UseNavState } from '../../../hooks/useNavState.js';
|
|
3
|
-
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
4
|
-
/** Traverse components.schemas to create entries for models */
|
|
5
|
-
export declare const traverseSchemas: (content: OpenAPIV3_1.Document, tagsMap: TagsMap,
|
|
6
|
-
/** Map of titles for the mobile header */
|
|
7
|
-
titlesMap: Map<string, string>, getModelId: UseNavState["getModelId"]) => TraversedSchema[];
|
|
8
|
-
//# sourceMappingURL=traverse-schemas.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"traverse-schemas.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-schemas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAChF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AA2BxD,+DAA+D;AAC/D,eAAO,MAAM,eAAe,GAC1B,SAAS,WAAW,CAAC,QAAQ,EAC7B,SAAS,OAAO;AAChB,0CAA0C;AAC1C,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,YAAY,WAAW,CAAC,YAAY,CAAC,KACpC,eAAe,EAyBjB,CAAA"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { getTag as f } from "./get-tag.js";
|
|
2
|
-
const g = (e, s = "Unkown", r, c, n) => {
|
|
3
|
-
const o = c({ name: s }, n), t = "title" in e && typeof e.title == "string" ? e.title : s;
|
|
4
|
-
return r.set(o, t), {
|
|
5
|
-
id: o,
|
|
6
|
-
title: t,
|
|
7
|
-
name: s,
|
|
8
|
-
schema: e
|
|
9
|
-
};
|
|
10
|
-
}, l = (e, s, r, c) => {
|
|
11
|
-
const n = e.components?.schemas ?? {}, o = [];
|
|
12
|
-
for (const t in n)
|
|
13
|
-
n[t]["x-internal"] || n[t]["x-scalar-ignore"] || !Object.hasOwn(n, t) || (n[t]["x-tags"]?.length ? n[t]["x-tags"].forEach((i) => {
|
|
14
|
-
const { tag: a } = f(s, i);
|
|
15
|
-
s.get(i)?.entries.push(g(n[t], t, r, c, a));
|
|
16
|
-
}) : o.push(g(n[t], t, r, c)));
|
|
17
|
-
return o;
|
|
18
|
-
};
|
|
19
|
-
export {
|
|
20
|
-
l as traverseSchemas
|
|
21
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
-
import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
3
|
-
import type { TagsMap, TraversedEntry } from '../../../features/traverse-schema/types';
|
|
4
|
-
import type { UseNavState } from '../../../hooks/useNavState.js';
|
|
5
|
-
type Options = Pick<UseNavState, 'getTagId'> & Pick<ApiReferenceConfiguration, 'tagsSorter' | 'operationsSorter'>;
|
|
6
|
-
/** Traverses our tags map creates entries, also handles sorting and tagGroups */
|
|
7
|
-
export declare const traverseTags: (content: OpenAPIV3_1.Document, tagsMap: TagsMap,
|
|
8
|
-
/** Map of titles for the mobile title */
|
|
9
|
-
titlesMap: Map<string, string>, { getTagId, tagsSorter, operationsSorter }: Options) => TraversedEntry[];
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=traverse-tags.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"traverse-tags.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-tags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAG5E,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAgB,MAAM,kCAAkC,CAAA;AAC7F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAItD,KAAK,OAAO,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,GAAG,IAAI,CAAC,yBAAyB,EAAE,YAAY,GAAG,kBAAkB,CAAC,CAAA;AAkGjH,iFAAiF;AACjF,eAAO,MAAM,YAAY,GACvB,SAAS,WAAW,CAAC,QAAQ,EAC7B,SAAS,OAAO;AAChB,yCAAyC;AACzC,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,4CAA4C,OAAO,KAClD,cAAc,EAyBhB,CAAA"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { getTag as f } from "./get-tag.js";
|
|
2
|
-
const u = (n, o, m, c, s = !1) => {
|
|
3
|
-
const i = m(n), d = n["x-displayName"] || n.name || "Untitled Tag";
|
|
4
|
-
return o.set(i, d), {
|
|
5
|
-
id: i,
|
|
6
|
-
title: d,
|
|
7
|
-
tag: n,
|
|
8
|
-
children: c,
|
|
9
|
-
isGroup: s
|
|
10
|
-
};
|
|
11
|
-
}, p = (n, o, m, { getTagId: c, tagsSorter: s, operationsSorter: i }) => {
|
|
12
|
-
const d = n.includes("default"), l = d ? n.filter((a) => a !== "default") : n;
|
|
13
|
-
return s === "alpha" ? l.sort((a, r) => {
|
|
14
|
-
const h = f(o, a).tag["x-displayName"] || a || "Untitle Tag", t = f(o, r).tag["x-displayName"] || r || "Untitled Tag";
|
|
15
|
-
return h.localeCompare(t);
|
|
16
|
-
}) : typeof s == "function" && l.sort((a, r) => s(f(o, a).tag, f(o, r).tag)), d && l.push("default"), l.flatMap((a) => {
|
|
17
|
-
const { tag: r, entries: h } = f(o, a);
|
|
18
|
-
return r["x-internal"] || r["x-scalar-ignore"] ? [] : (i === "alpha" ? h.sort((t, e) => "method" in t && "method" in e ? t.title.localeCompare(e.title) : 0) : i === "method" ? h.sort((t, e) => "method" in t && "method" in e ? t.method.localeCompare(e.method) : 0) : typeof i == "function" && h.sort((t, e) => {
|
|
19
|
-
if (!("method" in t) || !("method" in e))
|
|
20
|
-
return 0;
|
|
21
|
-
const x = "path" in t ? t.path : t.name, y = "path" in e ? e.path : e.name, g = "operation" in t ? t.operation : t.webhook, T = "operation" in e ? e.operation : e.webhook;
|
|
22
|
-
return i(
|
|
23
|
-
{ method: t.method, httpVerb: t.method, path: x, operation: g },
|
|
24
|
-
{ method: e.method, httpVerb: e.method, path: y, operation: T }
|
|
25
|
-
);
|
|
26
|
-
}), h.length ? u(r, m, c, h) : []);
|
|
27
|
-
});
|
|
28
|
-
}, k = (n, o, m, { getTagId: c, tagsSorter: s, operationsSorter: i }) => {
|
|
29
|
-
if (n["x-tagGroups"])
|
|
30
|
-
return n["x-tagGroups"].flatMap((r) => {
|
|
31
|
-
const h = p(r.tags ?? [], o, m, {
|
|
32
|
-
getTagId: c,
|
|
33
|
-
tagsSorter: s,
|
|
34
|
-
operationsSorter: i
|
|
35
|
-
});
|
|
36
|
-
return h.length ? u(r, m, c, h, !0) : [];
|
|
37
|
-
});
|
|
38
|
-
const d = Array.from(o.keys()), l = p(d, o, m, { getTagId: c, tagsSorter: s, operationsSorter: i });
|
|
39
|
-
return l.length === 1 && l[0].title === "default" ? l[0].children ?? [] : l;
|
|
40
|
-
};
|
|
41
|
-
export {
|
|
42
|
-
k as traverseTags
|
|
43
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
2
|
-
import type { TagsMap, TraversedWebhook } from '../../../features/traverse-schema/types';
|
|
3
|
-
import type { UseNavState } from '../../../hooks/useNavState.js';
|
|
4
|
-
/** When traversing webhooks, we pass in the tags in from operations to save on memory */
|
|
5
|
-
export declare const traverseWebhooks: (content: OpenAPIV3_1.Document,
|
|
6
|
-
/** The tag map from from traversing paths */
|
|
7
|
-
tagsMap: TagsMap,
|
|
8
|
-
/** Map of titles for the mobile title */
|
|
9
|
-
titlesMap: Map<string, string>, getWebhookId: UseNavState["getWebhookId"]) => TraversedWebhook[];
|
|
10
|
-
//# sourceMappingURL=traverse-webhooks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"traverse-webhooks.d.ts","sourceRoot":"","sources":["../../../../src/features/traverse-schema/helpers/traverse-webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AA0BtD,yFAAyF;AACzF,eAAO,MAAM,gBAAgB,GAC3B,SAAS,WAAW,CAAC,QAAQ;AAC7B,6CAA6C;AAC7C,SAAS,OAAO;AAChB,yCAAyC;AACzC,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,cAAc,WAAW,CAAC,cAAc,CAAC,KACxC,gBAAgB,EA4BlB,CAAA"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { getTag as i } from "./get-tag.js";
|
|
2
|
-
const E = (e, r, t = "Unknown", n, c, h) => {
|
|
3
|
-
const g = e.summary || t, o = c({ name: t, method: r }, h);
|
|
4
|
-
return n.set(o, g), {
|
|
5
|
-
id: o,
|
|
6
|
-
title: g,
|
|
7
|
-
name: t,
|
|
8
|
-
webhook: e,
|
|
9
|
-
method: r
|
|
10
|
-
};
|
|
11
|
-
}, l = (e, r, t, n) => {
|
|
12
|
-
const c = [];
|
|
13
|
-
return Object.entries(e.webhooks ?? {}).forEach(([h, g]) => {
|
|
14
|
-
Object.entries(g ?? {}).forEach(([u, s]) => {
|
|
15
|
-
s["x-internal"] || s["x-scalar-ignore"] || (s.tags?.length ? s.tags.forEach((f) => {
|
|
16
|
-
const { tag: b } = i(r, f);
|
|
17
|
-
r.get(f)?.entries.push(E(s, u, h, t, n, b));
|
|
18
|
-
}) : c.push(E(s, u, h, t, n)));
|
|
19
|
-
});
|
|
20
|
-
}), c;
|
|
21
|
-
};
|
|
22
|
-
export {
|
|
23
|
-
l as traverseWebhooks
|
|
24
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export type { TraverseSpecOptions, TraversedOperation, TraversedEntry, TraversedDescription, TraversedTag, TraversedWebhook, TagsMap, } from './types';
|
|
2
|
-
export { traverseDocument } from './helpers/traverse-document.js';
|
|
3
|
-
export { traverseTags } from './helpers/traverse-tags.js';
|
|
4
|
-
export { DEFAULT_INTRODUCTION_SLUG } from './helpers/traverse-description.js';
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/traverse-schema/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,gBAAgB,EAChB,OAAO,GACR,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { ApiReferenceConfiguration } from '@scalar/types/api-reference';
|
|
2
|
-
import type { UseNavState } from '../../hooks/useNavState.js';
|
|
3
|
-
import type { OpenAPIV3_1 } from '@scalar/openapi-types';
|
|
4
|
-
import type { OperationObject, TagObject, SchemaObject } from '@scalar/workspace-store/schemas/v3.1/strict/openapi-document';
|
|
5
|
-
import type { Ref } from 'vue';
|
|
6
|
-
/** Map of tagNames and their entries */
|
|
7
|
-
export type TagsMap = Map<string, {
|
|
8
|
-
tag: TagObject;
|
|
9
|
-
entries: TraversedEntry[];
|
|
10
|
-
}>;
|
|
11
|
-
/** Description entry returned from traversing the document */
|
|
12
|
-
export type TraversedDescription = {
|
|
13
|
-
id: string;
|
|
14
|
-
title: string;
|
|
15
|
-
children?: TraversedDescription[];
|
|
16
|
-
};
|
|
17
|
-
/** Operation entry returned from traversing the document */
|
|
18
|
-
export type TraversedOperation = {
|
|
19
|
-
id: string;
|
|
20
|
-
title: string;
|
|
21
|
-
method: OpenAPIV3_1.HttpMethods;
|
|
22
|
-
path: string;
|
|
23
|
-
operation: OperationObject;
|
|
24
|
-
};
|
|
25
|
-
/** Model entry returned from traversing the document */
|
|
26
|
-
export type TraversedSchema = {
|
|
27
|
-
id: string;
|
|
28
|
-
title: string;
|
|
29
|
-
name: string;
|
|
30
|
-
schema: SchemaObject;
|
|
31
|
-
};
|
|
32
|
-
/** Tag entry returned from traversing the document, includes tagGroups */
|
|
33
|
-
export type TraversedTag = {
|
|
34
|
-
id: string;
|
|
35
|
-
title: string;
|
|
36
|
-
children: TraversedEntry[];
|
|
37
|
-
tag: TagObject;
|
|
38
|
-
isGroup: boolean;
|
|
39
|
-
isWebhooks?: boolean;
|
|
40
|
-
};
|
|
41
|
-
/** Webhook entry returned from traversing the document, basically the same as an operaation but with name instead of path */
|
|
42
|
-
export type TraversedWebhook = {
|
|
43
|
-
id: string;
|
|
44
|
-
title: string;
|
|
45
|
-
method: OpenAPIV3_1.HttpMethods;
|
|
46
|
-
name: string;
|
|
47
|
-
webhook: OperationObject;
|
|
48
|
-
};
|
|
49
|
-
/** Entries returned from traversing the document */
|
|
50
|
-
export type TraversedEntry = TraversedDescription | TraversedOperation | TraversedSchema | TraversedTag | TraversedWebhook;
|
|
51
|
-
/** Options for traversing the spec */
|
|
52
|
-
export type TraverseSpecOptions = {
|
|
53
|
-
config: Ref<ApiReferenceConfiguration>;
|
|
54
|
-
} & Pick<UseNavState, 'getHeadingId' | 'getModelId' | 'getOperationId' | 'getSectionId' | 'getTagId' | 'getWebhookId'>;
|
|
55
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/features/traverse-schema/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EACV,eAAe,EACf,SAAS,EACT,YAAY,EACb,MAAM,8DAA8D,CAAA;AACrE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,wCAAwC;AACxC,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,EAAE;IAAE,GAAG,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC,CAAA;AAEhF,8DAA8D;AAC9D,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,oBAAoB,EAAE,CAAA;CAClC,CAAA;AAED,4DAA4D;AAC5D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,WAAW,CAAC,WAAW,CAAA;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,eAAe,CAAA;CAC3B,CAAA;AAED,wDAAwD;AACxD,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,YAAY,CAAA;CACrB,CAAA;AAED,0EAA0E;AAC1E,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,GAAG,EAAE,SAAS,CAAA;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED,6HAA6H;AAC7H,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,WAAW,CAAC,WAAW,CAAA;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,eAAe,CAAA;CACzB,CAAA;AAED,oDAAoD;AACpD,MAAM,MAAM,cAAc,GACtB,oBAAoB,GACpB,kBAAkB,GAClB,eAAe,GACf,YAAY,GACZ,gBAAgB,CAAA;AAEpB,sCAAsC;AACtC,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,GAAG,CAAC,yBAAyB,CAAC,CAAA;CACvC,GAAG,IAAI,CAAC,WAAW,EAAE,cAAc,GAAG,YAAY,GAAG,gBAAgB,GAAG,cAAc,GAAG,UAAU,GAAG,cAAc,CAAC,CAAA"}
|
package/dist/libs/markdown.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { getHeadings as r } from "@scalar/code-highlight/markdown";
|
|
2
|
-
import o from "github-slugger";
|
|
3
|
-
const s = (n, e) => n.map((t) => ({
|
|
4
|
-
...t,
|
|
5
|
-
slug: e.slug(t.value)
|
|
6
|
-
}));
|
|
7
|
-
function i(n) {
|
|
8
|
-
const e = new o(), t = r(n);
|
|
9
|
-
return s(t, e);
|
|
10
|
-
}
|
|
11
|
-
const l = (n) => {
|
|
12
|
-
const e = Math.min(...n.map((t) => t.depth));
|
|
13
|
-
return e >= 1 && e <= 6 ? e : 1;
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
i as getHeadingsFromMarkdown,
|
|
17
|
-
l as getLowestHeadingLevel
|
|
18
|
-
};
|
/package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarGroup.vue.d.ts
RENAMED
|
File without changes
|
/package/dist/{features/sidebar → v2/blocks/scalar-sidebar-block}/components/SidebarGroup.vue2.js
RENAMED
|
File without changes
|
|
File without changes
|