vitepress-openapi 0.0.3-alpha.74 → 0.0.3-alpha.76

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 (91) hide show
  1. package/dist/OpenApi-CDzPw3Gb.js +5669 -0
  2. package/dist/OpenApi-JZDy_oqC.cjs +111 -0
  3. package/dist/types/src/components/Context/OAContextAsync.vue.d.ts +4 -4
  4. package/dist/types/src/components/Context/OAContextProvider.vue.d.ts +2 -2
  5. package/dist/types/src/components/Feature/OAInfo.vue.d.ts +2 -2
  6. package/dist/types/src/components/Feature/OAIntroduction.vue.d.ts +2 -2
  7. package/dist/types/src/components/Feature/OAOperation.vue.d.ts +19 -4
  8. package/dist/types/src/components/Feature/OAOperationContent.vue.d.ts +0 -8
  9. package/dist/types/src/components/Feature/OAServers.vue.d.ts +2 -2
  10. package/dist/types/src/components/Feature/OASpec.vue.d.ts +20 -5
  11. package/dist/types/src/components/Feature/OASpecContent.vue.d.ts +0 -11
  12. package/dist/types/src/components/index.d.ts +1 -3
  13. package/dist/types/src/components/ui/button/Button.vue.d.ts +4 -4
  14. package/dist/types/src/components/ui/button/index.d.ts +1 -1
  15. package/dist/types/src/components/ui/checkbox/Checkbox.vue.d.ts +12 -12
  16. package/dist/types/src/components/ui/collapsible/Collapsible.vue.d.ts +2 -2
  17. package/dist/types/src/components/ui/collapsible/CollapsibleContent.vue.d.ts +2 -2
  18. package/dist/types/src/components/ui/collapsible/CollapsibleTrigger.vue.d.ts +2 -2
  19. package/dist/types/src/components/ui/label/Label.vue.d.ts +3 -3
  20. package/dist/types/src/components/ui/select/Select.vue.d.ts +11 -10
  21. package/dist/types/src/components/ui/select/SelectContent.vue.d.ts +21 -10
  22. package/dist/types/src/components/ui/select/SelectGroup.vue.d.ts +3 -3
  23. package/dist/types/src/components/ui/select/SelectItem.vue.d.ts +4 -4
  24. package/dist/types/src/components/ui/select/SelectItemText.vue.d.ts +2 -2
  25. package/dist/types/src/components/ui/select/SelectLabel.vue.d.ts +2 -2
  26. package/dist/types/src/components/ui/select/SelectScrollDownButton.vue.d.ts +3 -3
  27. package/dist/types/src/components/ui/select/SelectScrollUpButton.vue.d.ts +3 -3
  28. package/dist/types/src/components/ui/select/SelectSeparator.vue.d.ts +1 -1
  29. package/dist/types/src/components/ui/select/SelectTrigger.vue.d.ts +4 -3
  30. package/dist/types/src/components/ui/select/SelectValue.vue.d.ts +2 -2
  31. package/dist/types/src/components/ui/tabs/Tabs.vue.d.ts +6 -6
  32. package/dist/types/src/components/ui/tabs/TabsContent.vue.d.ts +4 -4
  33. package/dist/types/src/components/ui/tabs/TabsList.vue.d.ts +3 -3
  34. package/dist/types/src/components/ui/tabs/TabsTrigger.vue.d.ts +4 -4
  35. package/dist/types/src/composables/useOpenapi.d.ts +2 -2
  36. package/dist/types/src/composables/useShiki.d.ts +1 -0
  37. package/dist/types/src/composables/useTheme.d.ts +2 -0
  38. package/dist/types/src/lib/parser/parseOpenapi.d.ts +4 -4
  39. package/dist/vitepress-openapi.client.cjs.js +135 -151
  40. package/dist/vitepress-openapi.client.es.js +17591 -18299
  41. package/dist/vitepress-openapi.css +1 -1
  42. package/dist/vitepress-openapi.node.cjs.js +1 -1
  43. package/dist/vitepress-openapi.node.es.js +1 -1
  44. package/package.json +7 -5
  45. package/src/components/Common/Highlight/OAShiki.vue +1 -1
  46. package/src/components/Context/OAContextAsync.vue +2 -3
  47. package/src/components/Context/OAContextProvider.vue +1 -1
  48. package/src/components/Feature/OAInfo.vue +1 -1
  49. package/src/components/Feature/OAIntroduction.vue +1 -1
  50. package/src/components/Feature/OAOperation.vue +13 -3
  51. package/src/components/Feature/OAOperationContent.vue +0 -4
  52. package/src/components/Feature/OAServers.vue +1 -1
  53. package/src/components/Feature/OASpec.vue +12 -3
  54. package/src/components/Feature/OASpecContent.vue +0 -5
  55. package/src/components/Playground/OAPlaygroundParameterInput.vue +2 -2
  56. package/src/components/Playground/OAPlaygroundParameters.vue +4 -4
  57. package/src/components/Response/OAResponses.vue +2 -2
  58. package/src/components/Sample/OACodeSamples.vue +4 -1
  59. package/src/components/index.ts +0 -4
  60. package/src/components/ui/button/Button.vue +2 -2
  61. package/src/components/ui/checkbox/Checkbox.vue +2 -2
  62. package/src/components/ui/collapsible/Collapsible.vue +2 -2
  63. package/src/components/ui/collapsible/CollapsibleContent.vue +2 -2
  64. package/src/components/ui/collapsible/CollapsibleTrigger.vue +2 -2
  65. package/src/components/ui/label/Label.vue +2 -2
  66. package/src/components/ui/select/Select.vue +2 -2
  67. package/src/components/ui/select/SelectContent.vue +3 -3
  68. package/src/components/ui/select/SelectGroup.vue +2 -2
  69. package/src/components/ui/select/SelectItem.vue +2 -2
  70. package/src/components/ui/select/SelectItemText.vue +2 -2
  71. package/src/components/ui/select/SelectLabel.vue +2 -2
  72. package/src/components/ui/select/SelectScrollDownButton.vue +2 -2
  73. package/src/components/ui/select/SelectScrollUpButton.vue +2 -2
  74. package/src/components/ui/select/SelectSeparator.vue +2 -2
  75. package/src/components/ui/select/SelectTrigger.vue +2 -2
  76. package/src/components/ui/select/SelectValue.vue +2 -2
  77. package/src/components/ui/select-with-custom-option/SelectWithCustomOption.vue +1 -1
  78. package/src/components/ui/tabs/Tabs.vue +2 -2
  79. package/src/components/ui/tabs/TabsContent.vue +2 -2
  80. package/src/components/ui/tabs/TabsList.vue +2 -2
  81. package/src/components/ui/tabs/TabsTrigger.vue +2 -2
  82. package/src/composables/useOpenapi.ts +3 -3
  83. package/src/composables/useShiki.ts +6 -2
  84. package/src/composables/useTheme.ts +9 -1
  85. package/src/lib/parser/parseOpenapi.ts +43 -19
  86. package/dist/OpenApi-B8nR467A.cjs +0 -95
  87. package/dist/OpenApi-snG2qo-c.js +0 -4847
  88. package/dist/types/src/components/Feature/OARemoteOperation.vue.d.ts +0 -32
  89. package/dist/types/src/components/Feature/OARemoteSpec.vue.d.ts +0 -24
  90. package/src/components/Feature/OARemoteOperation.vue +0 -41
  91. package/src/components/Feature/OARemoteSpec.vue +0 -36
@@ -1,5 +1,5 @@
1
- import type { SelectValueProps } from 'radix-vue';
2
- import { SelectValue } from 'radix-vue';
1
+ import type { SelectValueProps } from 'reka-ui';
2
+ import { SelectValue } from 'reka-ui';
3
3
  declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
4
4
  declare var __VLS_6: {};
5
5
  type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
@@ -1,6 +1,6 @@
1
- import type { TabsRootProps } from 'radix-vue';
1
+ import type { TabsRootProps } from 'reka-ui';
2
2
  import type { ComputedRef } from 'vue';
3
- import { TabsRoot } from 'radix-vue';
3
+ import { TabsRoot } from 'reka-ui';
4
4
  type __VLS_Props = TabsRootProps;
5
5
  declare const forwarded: ComputedRef<TabsRootProps>;
6
6
  declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
@@ -12,14 +12,14 @@ declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
12
12
  TabsRoot: typeof TabsRoot;
13
13
  forwarded: typeof forwarded;
14
14
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
- "update:modelValue": (payload: import("node_modules/radix-vue/dist/shared/types").StringOrNumber) => any;
15
+ "update:modelValue": (payload: string | number) => any;
16
16
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
- "onUpdate:modelValue"?: ((payload: import("node_modules/radix-vue/dist/shared/types").StringOrNumber) => any) | undefined;
17
+ "onUpdate:modelValue"?: ((payload: string | number) => any) | undefined;
18
18
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
19
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
- "update:modelValue": (payload: import("node_modules/radix-vue/dist/shared/types").StringOrNumber) => any;
20
+ "update:modelValue": (payload: string | number) => any;
21
21
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
22
- "onUpdate:modelValue"?: ((payload: import("node_modules/radix-vue/dist/shared/types").StringOrNumber) => any) | undefined;
22
+ "onUpdate:modelValue"?: ((payload: string | number) => any) | undefined;
23
23
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
24
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
25
25
  export default _default;
@@ -1,15 +1,15 @@
1
- import type { TabsContentProps } from 'radix-vue';
1
+ import type { TabsContentProps } from 'reka-ui';
2
2
  import type { HTMLAttributes } from 'vue';
3
- import { TabsContent } from 'radix-vue';
3
+ import { TabsContent } from 'reka-ui';
4
4
  import { cn } from '../../../lib/utils';
5
5
  type __VLS_Props = TabsContentProps & {
6
6
  class?: HTMLAttributes['class'];
7
7
  };
8
8
  declare const delegatedProps: import("vue").ComputedRef<{
9
- value: import("node_modules/radix-vue/dist/shared/types").StringOrNumber;
9
+ value: string | number;
10
10
  forceMount: boolean;
11
11
  asChild: boolean;
12
- as: import("radix-vue").AsTag | import("vue").Component;
12
+ as: import("reka-ui").AsTag | import("vue").Component;
13
13
  }>;
14
14
  declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
15
15
  declare var __VLS_6: {};
@@ -1,6 +1,6 @@
1
- import type { TabsListProps } from 'radix-vue';
1
+ import type { TabsListProps } from 'reka-ui';
2
2
  import type { HTMLAttributes } from 'vue';
3
- import { TabsList } from 'radix-vue';
3
+ import { TabsList } from 'reka-ui';
4
4
  import { cn } from '../../../lib/utils';
5
5
  type __VLS_Props = TabsListProps & {
6
6
  class?: HTMLAttributes['class'];
@@ -8,7 +8,7 @@ type __VLS_Props = TabsListProps & {
8
8
  declare const delegatedProps: import("vue").ComputedRef<{
9
9
  loop: boolean;
10
10
  asChild: boolean;
11
- as: import("radix-vue").AsTag | import("vue").Component;
11
+ as: import("reka-ui").AsTag | import("vue").Component;
12
12
  }>;
13
13
  declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
14
14
  declare var __VLS_6: {};
@@ -1,7 +1,7 @@
1
- import type { TabsTriggerProps } from 'radix-vue';
1
+ import type { TabsTriggerProps } from 'reka-ui';
2
2
  import type { HTMLAttributes } from 'vue';
3
3
  import type { TabsTriggerVariants } from './index';
4
- import { TabsTrigger } from 'radix-vue';
4
+ import { TabsTrigger } from 'reka-ui';
5
5
  import { cn } from '../../../lib/utils';
6
6
  import { tabsTriggerVariants } from './index';
7
7
  interface Props extends TabsTriggerProps {
@@ -10,10 +10,10 @@ interface Props extends TabsTriggerProps {
10
10
  }
11
11
  declare const forwardedProps: import("vue").ComputedRef<{
12
12
  variant: TabsTriggerVariants["variant"];
13
- value: import("node_modules/radix-vue/dist/shared/types").StringOrNumber;
13
+ value: string | number;
14
14
  disabled: boolean;
15
15
  asChild: boolean;
16
- as: import("radix-vue").AsTag | import("vue").Component;
16
+ as: import("reka-ui").AsTag | import("vue").Component;
17
17
  }>;
18
18
  declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
19
19
  declare var __VLS_6: {};
@@ -2,11 +2,11 @@ import type { OpenAPIDocument } from '../types';
2
2
  import type { PartialUseThemeConfig } from './useTheme';
3
3
  export declare const OPENAPI_LOCAL_KEY: unique symbol;
4
4
  export declare function useOpenapi({ spec, config, }?: {
5
- spec?: OpenAPIDocument;
5
+ spec?: OpenAPIDocument | string;
6
6
  config?: PartialUseThemeConfig;
7
7
  }): {
8
8
  async: ({ spec, }?: {
9
- spec?: OpenAPIDocument;
9
+ spec?: OpenAPIDocument | string;
10
10
  }) => Promise<{
11
11
  spec: OpenAPIDocument;
12
12
  setSpec: (spec: any) => void;
@@ -4,5 +4,6 @@ export declare function useShiki(): {
4
4
  lang: string;
5
5
  theme: string;
6
6
  }) => string;
7
+ init: () => Promise<void>;
7
8
  initShiki: () => Promise<void>;
8
9
  };
@@ -114,6 +114,7 @@ interface LanguageConfig {
114
114
  lang: string;
115
115
  label: string;
116
116
  highlighter: string;
117
+ icon?: string;
117
118
  }
118
119
  export type PartialUseThemeConfig = Partial<UnwrapNestedRefs<UseThemeConfig>>;
119
120
  type GeneratorFunction = (lang: string, request: OARequest) => Promise<string>;
@@ -212,6 +213,7 @@ export declare function useTheme(initialConfig?: PartialUseThemeConfig): {
212
213
  lang: string;
213
214
  label: string;
214
215
  highlighter: string;
216
+ icon?: string | undefined;
215
217
  }[] | undefined;
216
218
  generator?: {} | undefined;
217
219
  defaultHeaders?: {
@@ -1,20 +1,20 @@
1
1
  import type { OpenAPIDocument, ParsedOpenAPI } from '../../types';
2
2
  export declare function parseOpenapi(): {
3
3
  transformSync: ({ spec, defaultTag, defaultTagDescription, }: {
4
- spec: OpenAPIDocument;
4
+ spec: OpenAPIDocument | string;
5
5
  defaultTag?: string;
6
6
  defaultTagDescription?: string;
7
7
  }) => {} & OpenAPIDocument;
8
8
  transformAsync: ({ spec, }: {
9
- spec: ParsedOpenAPI;
9
+ spec: ParsedOpenAPI | string;
10
10
  }) => Promise<ParsedOpenAPI>;
11
11
  parseSync: ({ spec, defaultTag, defaultTagDescription, }: {
12
- spec: OpenAPIDocument;
12
+ spec: OpenAPIDocument | string;
13
13
  defaultTag?: string;
14
14
  defaultTagDescription?: string;
15
15
  }) => ParsedOpenAPI;
16
16
  parseAsync: ({ spec, defaultTag, defaultTagDescription, }: {
17
- spec: OpenAPIDocument;
17
+ spec: OpenAPIDocument | string;
18
18
  defaultTag?: string;
19
19
  defaultTagDescription?: string;
20
20
  }) => Promise<ParsedOpenAPI>;