vitepress-openapi 0.1.17 → 0.1.18

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 (30) hide show
  1. package/dist/types/src/client.d.ts +1 -0
  2. package/dist/types/src/components/Common/OACodeValue.vue.d.ts +9 -9
  3. package/dist/types/src/components/Parameter/OAParameterExamples.vue.d.ts +13 -3
  4. package/dist/types/src/components/index.d.ts +6 -1
  5. package/dist/types/src/components/ui/input/Input.vue.d.ts +1 -0
  6. package/dist/types/src/composables/usePlayground.d.ts +1 -0
  7. package/dist/types/src/composables/useTheme.d.ts +4 -0
  8. package/dist/types/src/lib/operation/operationData.d.ts +1 -0
  9. package/dist/{useOpenapi-DkEO8B6A.cjs → useOpenapi-CKx0hILD.cjs} +55 -55
  10. package/dist/{useOpenapi-D3Fw1qI0.js → useOpenapi-DUT_WkQ8.js} +1059 -1053
  11. package/dist/vitepress-openapi.client.cjs.js +142 -142
  12. package/dist/vitepress-openapi.client.es.js +15524 -15434
  13. package/dist/vitepress-openapi.css +1 -1
  14. package/dist/vitepress-openapi.node.cjs.js +1 -1
  15. package/dist/vitepress-openapi.node.es.js +1 -1
  16. package/package.json +1 -1
  17. package/src/client.ts +1 -0
  18. package/src/components/Common/OACodeValue.vue +9 -10
  19. package/src/components/Parameter/OAParameter.vue +3 -1
  20. package/src/components/Parameter/OAParameterExamples.vue +30 -10
  21. package/src/components/Playground/OAPlaygroundParameterInput.vue +1 -0
  22. package/src/components/Playground/OAPlaygroundParameters.vue +20 -3
  23. package/src/components/Playground/OAPlaygroundSecurityInput.vue +2 -1
  24. package/src/components/Security/OASecurityContent.vue +1 -1
  25. package/src/components/index.ts +10 -0
  26. package/src/components/ui/input/Input.vue +27 -0
  27. package/src/components/ui/select-with-custom-option/SelectWithCustomOption.vue +1 -0
  28. package/src/composables/usePlayground.ts +14 -0
  29. package/src/composables/useTheme.ts +12 -0
  30. package/src/lib/operation/operationData.ts +2 -0
@@ -12,6 +12,7 @@ interface VPTheme {
12
12
  extends?: Theme;
13
13
  }
14
14
  export declare const theme: VPTheme;
15
+ export * from './components';
15
16
  export { useOpenapi } from './composables/useOpenapi';
16
17
  export { usePlayground } from './composables/usePlayground';
17
18
  export { DEFAULT_OPERATION_SLOTS };
@@ -5,28 +5,28 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
5
5
  type: (ObjectConstructor | ArrayConstructor | StringConstructor | NumberConstructor | BooleanConstructor)[];
6
6
  required: true;
7
7
  };
8
- parameterName: {
9
- type: StringConstructor;
10
- default: string;
11
- };
12
8
  isEnum: {
13
9
  type: BooleanConstructor;
14
10
  default: boolean;
15
11
  };
12
+ onSet: {
13
+ type: FunctionConstructor;
14
+ default: undefined;
15
+ };
16
16
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
17
17
  value: {
18
18
  type: (ObjectConstructor | ArrayConstructor | StringConstructor | NumberConstructor | BooleanConstructor)[];
19
19
  required: true;
20
20
  };
21
- parameterName: {
22
- type: StringConstructor;
23
- default: string;
24
- };
25
21
  isEnum: {
26
22
  type: BooleanConstructor;
27
23
  default: boolean;
28
24
  };
25
+ onSet: {
26
+ type: FunctionConstructor;
27
+ default: undefined;
28
+ };
29
29
  }>> & Readonly<{}>, {
30
- parameterName: string;
30
+ onSet: Function;
31
31
  isEnum: boolean;
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,13 +1,23 @@
1
- declare const _default: typeof __VLS_export;
2
- export default _default;
3
1
  declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
2
  property: {
5
3
  type: ObjectConstructor;
6
4
  required: true;
7
5
  };
6
+ securitySchemeName: {
7
+ type: StringConstructor;
8
+ default: undefined;
9
+ };
8
10
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
9
11
  property: {
10
12
  type: ObjectConstructor;
11
13
  required: true;
12
14
  };
13
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
15
+ securitySchemeName: {
16
+ type: StringConstructor;
17
+ default: undefined;
18
+ };
19
+ }>> & Readonly<{}>, {
20
+ securitySchemeName: string;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
@@ -1,4 +1,6 @@
1
1
  import OAVueJsonPretty from './Common/Highlight/OAVueJsonPretty.vue';
2
+ import OAFooter from './Common/OAFooter.vue';
3
+ import OAHeaderBadges from './Common/OAHeaderBadges.vue';
2
4
  import OAHeading from './Common/OAHeading.vue';
3
5
  import OAMarkdown from './Common/OAMarkdown.vue';
4
6
  import OAInfo from './Feature/OAInfo.vue';
@@ -10,10 +12,13 @@ import OAOperationLink from './Feature/OAOperationLink.vue';
10
12
  import OAServers from './Feature/OAServers.vue';
11
13
  import OASpec from './Feature/OASpec.vue';
12
14
  import OASpecSkeleton from './Feature/OASpecSkeleton.vue';
15
+ import OAOperationTags from './Operation/OAOperationTags.vue';
13
16
  import OAParameter from './Parameter/OAParameter.vue';
14
17
  import OAParameters from './Parameter/OAParameters.vue';
15
18
  import OAPathEndpoint from './Path/OAPathEndpoint.vue';
16
19
  import OAPlayground from './Playground/OAPlayground.vue';
17
20
  import OARequestBody from './Request/OARequestBody.vue';
18
21
  import OAResponses from './Response/OAResponses.vue';
19
- export { OAHeading, OAInfo, OAIntroduction, OALocaleSelect, OAMarkdown, OAOperation, OAOperationContext, OAOperationLink, OAParameter, OAParameters, OAPathEndpoint, OAPlayground, OARequestBody, OAResponses, OAServers, OASpec, OASpecSkeleton, OAVueJsonPretty, };
22
+ import OACodeSamples from './Sample/OACodeSamples.vue';
23
+ import OASecurity from './Security/OASecurity.vue';
24
+ export { OACodeSamples, OAFooter, OAHeaderBadges, OAHeading, OAInfo, OAIntroduction, OALocaleSelect, OAMarkdown, OAOperation, OAOperationContext, OAOperationLink, OAOperationTags, OAParameter, OAParameters, OAPathEndpoint, OAPlayground, OARequestBody, OAResponses, OASecurity, OAServers, OASpec, OASpecSkeleton, OAVueJsonPretty, };
@@ -4,6 +4,7 @@ type __VLS_Props = {
4
4
  modelValue?: string | number;
5
5
  class?: HTMLAttributes['class'];
6
6
  type?: string;
7
+ clearable?: boolean;
7
8
  };
8
9
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
9
10
  "update:modelValue": (payload: string | number) => any;
@@ -41,5 +41,6 @@ export declare function usePlayground(): {
41
41
  submitRequest: ({ request, method, baseUrl, path, operationId }: SubmitOptions) => Promise<PlaygroundResponse | null>;
42
42
  cleanupImageUrls: () => void;
43
43
  setParameterValue: (parameterName: string, value: any) => void;
44
+ setSecurityValue: (schemeId: string, value: any) => void;
44
45
  hasOperationData: boolean;
45
46
  };
@@ -96,6 +96,7 @@ export interface ServerConfig {
96
96
  }
97
97
  export interface StorageConfig {
98
98
  prefix?: string;
99
+ persistAuth?: boolean;
99
100
  }
100
101
  export interface OperationLinkConfig {
101
102
  linkPrefix?: string;
@@ -159,6 +160,7 @@ type GetServersFunction = ({ method, path, operation }: {
159
160
  export declare const DEFAULT_OPERATION_SLOTS: OperationSlot[];
160
161
  export declare const DEFAULT_BASE_URL = "http://localhost";
161
162
  export declare const DEFAULT_STORAGE_PREFIX = "--oa";
163
+ export declare const DEFAULT_STORAGE_PERSIST_AUTH = true;
162
164
  export declare const availableLanguages: LanguageConfig[];
163
165
  export declare function useTheme(initialConfig?: PartialUseThemeConfig): {
164
166
  isDark: import("@vueuse/core").UseDarkReturn;
@@ -277,6 +279,7 @@ export declare function useTheme(initialConfig?: PartialUseThemeConfig): {
277
279
  } | undefined;
278
280
  storage?: {
279
281
  prefix?: string | undefined;
282
+ persistAuth?: boolean | undefined;
280
283
  } | undefined;
281
284
  markdown?: {
282
285
  operationLink?: false | {
@@ -363,6 +366,7 @@ export declare function useTheme(initialConfig?: PartialUseThemeConfig): {
363
366
  setMarkdownConfig: (config: Partial<UnwrapNestedRefs<MarkdownConfig>>) => void;
364
367
  getOperationLinkConfig: () => OperationLinkConfig | false | undefined;
365
368
  getStoragePrefix: () => string;
369
+ getStoragePersistAuth: () => boolean;
366
370
  setStorageConfig: (config: Partial<StorageConfig>) => void;
367
371
  };
368
372
  export {};
@@ -5,6 +5,7 @@ export interface OperationData {
5
5
  operationId: string;
6
6
  security: {
7
7
  selectedSchemeId: Ref<string>;
8
+ securityValues: Ref<Record<string, any>>;
8
9
  };
9
10
  playground: {
10
11
  request: Ref<OARequest>;