@scalar/api-reference 1.3.0 → 1.5.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +12 -18
  3. package/dist/browser/standalone.js +7 -7
  4. package/dist/components/ApiReference.vue.d.ts +5 -1
  5. package/dist/components/ApiReference.vue.d.ts.map +1 -1
  6. package/dist/components/ApiReferenceBase.vue.d.ts +1 -3
  7. package/dist/components/ApiReferenceBase.vue.d.ts.map +1 -1
  8. package/dist/components/ApiReferenceLayout.vue.d.ts +307 -85
  9. package/dist/components/ApiReferenceLayout.vue.d.ts.map +1 -1
  10. package/dist/components/ClassicHeader.vue.d.ts +10 -0
  11. package/dist/components/ClassicHeader.vue.d.ts.map +1 -0
  12. package/dist/components/Content/Content.vue.d.ts +2 -0
  13. package/dist/components/Content/Content.vue.d.ts.map +1 -1
  14. package/dist/components/DarkModeIconToggle.vue.d.ts +3 -0
  15. package/dist/components/DarkModeIconToggle.vue.d.ts.map +1 -0
  16. package/dist/components/DarkModeToggle.vue.d.ts.map +1 -1
  17. package/dist/components/GettingStarted.vue.d.ts +27 -0
  18. package/dist/components/GettingStarted.vue.d.ts.map +1 -0
  19. package/dist/components/Icon/icons/index.d.ts +1 -1
  20. package/dist/components/Icon/icons/index.d.ts.map +1 -1
  21. package/dist/components/IntersectionObserver.vue.d.ts.map +1 -1
  22. package/dist/components/Layouts/ClassicLayout.vue.d.ts +18 -0
  23. package/dist/components/Layouts/ClassicLayout.vue.d.ts.map +1 -0
  24. package/dist/components/Layouts/ModernLayout.vue.d.ts +18 -0
  25. package/dist/components/Layouts/ModernLayout.vue.d.ts.map +1 -0
  26. package/dist/components/Layouts/index.d.ts +7 -0
  27. package/dist/components/Layouts/index.d.ts.map +1 -0
  28. package/dist/components/Sidebar.vue.d.ts.map +1 -1
  29. package/dist/helpers/hasModels.d.ts +1 -1
  30. package/dist/helpers/hasModels.d.ts.map +1 -1
  31. package/dist/helpers/index.d.ts +2 -1
  32. package/dist/helpers/index.d.ts.map +1 -1
  33. package/dist/helpers/showItemInClient.d.ts +3 -0
  34. package/dist/helpers/showItemInClient.d.ts.map +1 -0
  35. package/dist/hooks/index.d.ts +1 -0
  36. package/dist/hooks/index.d.ts.map +1 -1
  37. package/dist/hooks/useDarkModeState.d.ts.map +1 -1
  38. package/dist/hooks/useNavigation.d.ts +28 -0
  39. package/dist/hooks/useNavigation.d.ts.map +1 -0
  40. package/dist/index-06c444c3.js +879 -0
  41. package/dist/{index-efc6f45c.js → index-1820592b.js} +20637 -20580
  42. package/dist/index.js +8 -8
  43. package/dist/stores/template.d.ts +0 -9
  44. package/dist/stores/template.d.ts.map +1 -1
  45. package/dist/types.d.ts +14 -11
  46. package/dist/types.d.ts.map +1 -1
  47. package/package.json +7 -7
  48. package/dist/index-e8f29118.js +0 -1006
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClassicLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/ClassicLayout.vue.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;;AA4HjE,wBAAwG;AAGxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { type ReferenceProps, type ReferenceSlots } from '../../types';
2
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<ReferenceProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ReferenceProps>>>, {}, {}>, Readonly<ReferenceSlots>>;
3
+ export default _default;
4
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
5
+ type __VLS_TypePropsToRuntimeProps<T> = {
6
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
7
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
8
+ } : {
9
+ type: import('vue').PropType<T[K]>;
10
+ required: true;
11
+ };
12
+ };
13
+ type __VLS_WithTemplateSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
18
+ //# sourceMappingURL=ModernLayout.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModernLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/ModernLayout.vue.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;;AAqLtE,wBAAwG;AAGxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type ReferenceLayoutType, type ReferenceProps } from 'src/types';
2
+ import { type Component, type DeepReadonly } from 'vue';
3
+ declare const layouts: DeepReadonly<{
4
+ [x in ReferenceLayoutType]: Component<ReferenceProps>;
5
+ }>;
6
+ export default layouts;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Layouts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAA;AACzE,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,KAAK,CAAA;AAKvD,QAAA,MAAM,OAAO,EAAE,YAAY,CAAC;KACzB,CAAC,IAAI,mBAAmB,GAAG,SAAS,CAAC,cAAc,CAAC;CACtD,CAGA,CAAA;AAED,eAAe,OAAO,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.vue.d.ts","sourceRoot":"","sources":["../../src/components/Sidebar.vue.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,IAAI,EAA6B,MAAM,UAAU,CAAA;;;;;;;;;AA4Z/D,wBAAwG;AAGxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,G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C,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { type Spec } from '../types';
2
- export declare const hasModels: (spec: Spec) => boolean;
2
+ export declare const hasModels: (spec?: Spec) => boolean;
3
3
  //# sourceMappingURL=hasModels.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hasModels.d.ts","sourceRoot":"","sources":["../../src/helpers/hasModels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,UAAU,CAAA;AAEpC,eAAO,MAAM,SAAS,SAAU,IAAI,YAMnC,CAAA"}
1
+ {"version":3,"file":"hasModels.d.ts","sourceRoot":"","sources":["../../src/helpers/hasModels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,UAAU,CAAA;AAEpC,eAAO,MAAM,SAAS,UAAW,IAAI,YAUpC,CAAA"}
@@ -15,13 +15,14 @@ export * from './getVariableNames';
15
15
  export * from './hasModels';
16
16
  export * from './hasSecuritySchemes';
17
17
  export * from './isJsonString';
18
+ export * from './isValidUrl';
18
19
  export * from './json2xml';
19
20
  export * from './mapFromObject';
20
21
  export * from './objectMerge';
21
22
  export * from './prettyPrintJson';
22
23
  export * from './replaceVariables';
23
24
  export * from './scrollToId';
25
+ export * from './showItemInClient';
24
26
  export * from './splitMarkdownInSections';
25
27
  export * from './transformToJson';
26
- export * from './isValidUrl';
27
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAA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AoB,CAAA;AAClC,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { TransformedOperation } from '../types';
2
+ export declare function showItemInClient(operation: TransformedOperation): void;
3
+ //# sourceMappingURL=showItemInClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"showItemInClient.d.ts","sourceRoot":"","sources":["../../src/helpers/showItemInClient.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AASpD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,oBAAoB,QAW/D"}
@@ -1,4 +1,5 @@
1
1
  export * from './useDarkModeState';
2
+ export * from './useNavigation';
2
3
  export * from './useOperation';
3
4
  export * from './useParser';
4
5
  export * from './useRefOnMount';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,WAAW,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDarkModeState.d.ts","sourceRoot":"","sources":["../../src/hooks/useDarkModeState.ts"],"names":[],"mappings":"AAKA,wGAAwG;AACxG,wBAAgB,gBAAgB;;;EA0C/B"}
1
+ {"version":3,"file":"useDarkModeState.d.ts","sourceRoot":"","sources":["../../src/hooks/useDarkModeState.ts"],"names":[],"mappings":"AAKA,wGAAwG;AACxG,wBAAgB,gBAAgB;;;EAoD/B"}
@@ -0,0 +1,28 @@
1
+ import type { Spec } from '../types';
2
+ export type SidebarEntry = {
3
+ id: string;
4
+ title: string;
5
+ type: 'Page' | 'Folder';
6
+ children?: SidebarEntry[];
7
+ select?: () => void;
8
+ httpVerb?: string;
9
+ show: boolean;
10
+ };
11
+ type SidebarIdVisibility = Record<string, boolean>;
12
+ declare function setItemIdVisibility(id: string, visible: boolean): void;
13
+ type CollapsedSidebarItems = Record<string, boolean>;
14
+ declare function toggleCollapsedSidebarItem(key: string): void;
15
+ declare function setCollapsedSidebarItem(key: string, value: boolean): void;
16
+ export declare function useNavigation(options?: {
17
+ parsedSpec: Spec;
18
+ }): {
19
+ items: import("vue").ComputedRef<SidebarEntry[]>;
20
+ activeItemId: import("vue").ComputedRef<string | null>;
21
+ sidebarIdVisibility: SidebarIdVisibility;
22
+ setItemIdVisibility: typeof setItemIdVisibility;
23
+ collapsedSidebarItems: CollapsedSidebarItems;
24
+ toggleCollapsedSidebarItem: typeof toggleCollapsedSidebarItem;
25
+ setCollapsedSidebarItem: typeof setCollapsedSidebarItem;
26
+ };
27
+ export {};
28
+ //# sourceMappingURL=useNavigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useNavigation.d.ts","sourceRoot":"","sources":["../../src/hooks/useNavigation.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,IAAI,EAA6B,MAAM,UAAU,CAAA;AAE/D,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAA;IACvB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,OAAO,CAAA;CACd,CAAA;AAMD,KAAK,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAIlD,iBAAS,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,QAExD;AAKD,KAAK,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAIpD,iBAAS,0BAA0B,CAAC,GAAG,EAAE,MAAM,QAE9C;AAED,iBAAS,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,QAE3D;AAqHD,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE;IAAE,UAAU,EAAE,IAAI,CAAA;CAAE;;;;;;;;EAiD3D"}