fumadocs-openapi 10.10.2 → 11.0.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 (234) hide show
  1. package/css/generated/shared.css +1 -1151
  2. package/css/preset.css +1 -0
  3. package/dist/.translations/index.d.ts +80 -0
  4. package/dist/.translations/keys.js +80 -0
  5. package/dist/_virtual/_rolldown/runtime.js +1 -10
  6. package/dist/generate-file.d.ts +0 -4
  7. package/dist/generate-file.js +4 -5
  8. package/dist/i18n.d.ts +5 -100
  9. package/dist/i18n.js +8 -108
  10. package/dist/index.d.ts +4 -4
  11. package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.8 → @scalar_openapi-upgrader@0.2.9}/node_modules/@scalar/openapi-upgrader/dist/2.0-to-3.0/upgrade-from-two-to-three.js +1 -1
  12. package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.8 → @scalar_openapi-upgrader@0.2.9}/node_modules/@scalar/openapi-upgrader/dist/3.0-to-3.1/upgrade-from-three-to-three-one.js +1 -1
  13. package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.8 → @scalar_openapi-upgrader@0.2.9}/node_modules/@scalar/openapi-upgrader/dist/3.1-to-3.2/upgrade-from-three-one-to-three-two.js +1 -1
  14. package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.8 → @scalar_openapi-upgrader@0.2.9}/node_modules/@scalar/openapi-upgrader/dist/helpers/traverse.js +1 -1
  15. package/dist/node_modules/.pnpm/{@scalar_openapi-upgrader@0.2.8 → @scalar_openapi-upgrader@0.2.9}/node_modules/@scalar/openapi-upgrader/dist/upgrade.js +1 -1
  16. package/dist/playground/auth.js +4 -4
  17. package/dist/playground/client.d.ts +12 -21
  18. package/dist/playground/client.js +80 -59
  19. package/dist/playground/components/oauth-dialog.js +33 -33
  20. package/dist/playground/components/result-display.d.ts +1 -2
  21. package/dist/playground/components/result-display.js +7 -8
  22. package/dist/playground/components/server-select.js +11 -11
  23. package/dist/playground/status-info.js +29 -37
  24. package/dist/requests/generators/csharp.js +3 -3
  25. package/dist/requests/generators/curl.js +2 -2
  26. package/dist/requests/generators/go.js +2 -2
  27. package/dist/requests/generators/index.d.ts +28 -41
  28. package/dist/requests/generators/index.js +18 -35
  29. package/dist/requests/generators/java.js +2 -2
  30. package/dist/requests/generators/javascript.js +2 -2
  31. package/dist/requests/generators/python.js +2 -2
  32. package/dist/scalar/client.js +3 -2
  33. package/dist/scalar/index.d.ts +2 -2
  34. package/dist/scalar/index.js +10 -9
  35. package/dist/server/index.d.ts +23 -27
  36. package/dist/server/index.js +42 -38
  37. package/dist/server/proxy.d.ts +0 -6
  38. package/dist/server/proxy.js +2 -4
  39. package/dist/{_openapi/types.d.ts → types/openapi.d.ts} +127 -136
  40. package/dist/types.d.ts +14 -18
  41. package/dist/ui/base.d.ts +15 -162
  42. package/dist/ui/base.js +148 -107
  43. package/dist/ui/components/codeblock.js +6 -14
  44. package/dist/ui/components/heading.js +8 -4
  45. package/dist/ui/components/markdown.js +12 -0
  46. package/dist/ui/contexts/api.js +8 -26
  47. package/dist/ui/index.d.ts +204 -7
  48. package/dist/ui/index.js +10 -15
  49. package/dist/ui/operation/context.js +48 -0
  50. package/dist/ui/operation/index.js +168 -126
  51. package/dist/ui/operation/request-tabs.d.ts +10 -5
  52. package/dist/ui/operation/request-tabs.js +35 -22
  53. package/dist/ui/operation/response-tabs.d.ts +5 -2
  54. package/dist/ui/operation/response-tabs.js +22 -15
  55. package/dist/ui/operation/usage-tabs.js +144 -0
  56. package/dist/utils/document/dereference.d.ts +1 -1
  57. package/dist/utils/document/dereference.js +5 -8
  58. package/dist/utils/document/load.js +17 -0
  59. package/dist/utils/get-example-requests.d.ts +13 -0
  60. package/dist/{ui/operation → utils}/get-example-requests.js +31 -20
  61. package/dist/utils/pages/builder.d.ts +38 -10
  62. package/dist/utils/pages/builder.js +12 -10
  63. package/dist/utils/pages/preset-auto.d.ts +1 -2
  64. package/dist/utils/pages/preset-auto.js +15 -15
  65. package/dist/utils/pages/to-static-data.js +5 -4
  66. package/dist/utils/pages/to-text.d.ts +1 -0
  67. package/dist/utils/pages/to-text.js +21 -11
  68. package/dist/utils/remove-undefined.js +14 -9
  69. package/dist/utils/schema.d.ts +2 -0
  70. package/dist/utils/{schema/index.js → schema.js} +3 -30
  71. package/dist/{ui/client → utils}/storage-key.js +3 -3
  72. package/package.json +16 -29
  73. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/bundle.js +0 -239
  74. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/dereference.js +0 -187
  75. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/index.js +0 -136
  76. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/normalize-args.js +0 -41
  77. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/options.js +0 -124
  78. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parse.js +0 -109
  79. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/binary.js +0 -30
  80. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/json.js +0 -46
  81. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/text.js +0 -36
  82. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/parsers/yaml.js +0 -49
  83. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/pointer.js +0 -242
  84. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/ref.js +0 -247
  85. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/refs.js +0 -210
  86. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolve-external.js +0 -100
  87. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/file.js +0 -41
  88. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/resolvers/http.js +0 -112
  89. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/convert-path-to-posix.js +0 -8
  90. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/errors.js +0 -146
  91. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/is-windows.js +0 -5
  92. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/maybe.js +0 -18
  93. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/next.js +0 -11
  94. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/plugins.js +0 -99
  95. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/schema-resources.js +0 -30
  96. package/dist/node_modules/.pnpm/@apidevtools_json-schema-ref-parser@15.3.5_@types_json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/url.js +0 -315
  97. package/dist/node_modules/.pnpm/@fastify_deepmerge@3.2.1/node_modules/@fastify/deepmerge/index.js +0 -108
  98. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/2020.js +0 -110
  99. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js +0 -138
  100. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js +0 -674
  101. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js +0 -141
  102. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js +0 -102
  103. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js +0 -223
  104. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js +0 -28
  105. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js +0 -18
  106. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js +0 -133
  107. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js +0 -61
  108. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js +0 -146
  109. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js +0 -23
  110. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js +0 -48
  111. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js +0 -172
  112. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js +0 -31
  113. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js +0 -433
  114. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js +0 -113
  115. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js +0 -72
  116. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js +0 -583
  117. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.js +0 -18
  118. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +0 -42
  119. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.js +0 -50
  120. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.js +0 -20
  121. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.js +0 -51
  122. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.js +0 -16
  123. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.js +0 -36
  124. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.js +0 -19
  125. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.js +0 -85
  126. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.js +0 -59
  127. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js +0 -12
  128. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js +0 -25
  129. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js +0 -12
  130. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js +0 -16
  131. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +0 -57
  132. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +0 -96
  133. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js +0 -29
  134. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +0 -16
  135. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js +0 -89
  136. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +0 -87
  137. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +0 -16
  138. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js +0 -62
  139. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js +0 -60
  140. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js +0 -59
  141. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js +0 -34
  142. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js +0 -31
  143. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +0 -51
  144. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +0 -61
  145. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +0 -17
  146. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js +0 -52
  147. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +0 -41
  148. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +0 -17
  149. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js +0 -130
  150. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js +0 -14
  151. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js +0 -22
  152. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js +0 -112
  153. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js +0 -101
  154. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js +0 -14
  155. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft2020.js +0 -35
  156. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +0 -46
  157. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +0 -45
  158. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/index.js +0 -22
  159. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +0 -20
  160. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +0 -15
  161. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js +0 -92
  162. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js +0 -10
  163. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js +0 -23
  164. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/next.js +0 -19
  165. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js +0 -13
  166. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +0 -46
  167. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +0 -59
  168. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js +0 -27
  169. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +0 -17
  170. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js +0 -49
  171. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js +0 -48
  172. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js +0 -18
  173. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js +0 -28
  174. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js +0 -33
  175. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +0 -47
  176. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +0 -28
  177. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +0 -27
  178. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js +0 -38
  179. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js +0 -72
  180. package/dist/node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +0 -70
  181. package/dist/node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js +0 -33
  182. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/index.js +0 -236
  183. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/schemes.js +0 -187
  184. package/dist/node_modules/.pnpm/fast-uri@3.1.0/node_modules/fast-uri/lib/utils.js +0 -282
  185. package/dist/node_modules/.pnpm/json-schema-traverse@1.0.0/node_modules/json-schema-traverse/index.js +0 -78
  186. package/dist/playground/components/inputs.js +0 -419
  187. package/dist/playground/components/spinner.js +0 -15
  188. package/dist/playground/schema.d.ts +0 -15
  189. package/dist/playground/schema.js +0 -144
  190. package/dist/ui/api-page.d.ts +0 -31
  191. package/dist/ui/api-page.js +0 -59
  192. package/dist/ui/client/boundary.d.ts +0 -11
  193. package/dist/ui/client/boundary.js +0 -17
  194. package/dist/ui/client/boundary.lazy.js +0 -19
  195. package/dist/ui/client/full.js +0 -13
  196. package/dist/ui/client/i18n.js +0 -16
  197. package/dist/ui/client/index.d.ts +0 -42
  198. package/dist/ui/client/index.js +0 -7
  199. package/dist/ui/components/accordion.js +0 -67
  200. package/dist/ui/components/codeblock.d.ts +0 -14
  201. package/dist/ui/components/dialog.js +0 -56
  202. package/dist/ui/components/input.js +0 -17
  203. package/dist/ui/components/select-tab.js +0 -56
  204. package/dist/ui/components/select.js +0 -71
  205. package/dist/ui/contexts/api.d.ts +0 -29
  206. package/dist/ui/create-client.d.ts +0 -26
  207. package/dist/ui/create-client.js +0 -125
  208. package/dist/ui/operation/client.js +0 -78
  209. package/dist/ui/operation/get-example-requests.d.ts +0 -11
  210. package/dist/ui/operation/usage-tabs/client.d.ts +0 -14
  211. package/dist/ui/operation/usage-tabs/client.js +0 -91
  212. package/dist/ui/operation/usage-tabs/index.js +0 -54
  213. package/dist/ui/schema/client.d.ts +0 -18
  214. package/dist/ui/schema/client.js +0 -409
  215. package/dist/ui/schema/index.d.ts +0 -61
  216. package/dist/ui/schema/index.js +0 -256
  217. package/dist/utils/auto-anchor.client.js +0 -20
  218. package/dist/utils/auto-anchor.js +0 -17
  219. package/dist/utils/deep-equal.js +0 -21
  220. package/dist/utils/document/process.d.ts +0 -6
  221. package/dist/utils/document/process.js +0 -18
  222. package/dist/utils/id-to-title.js +0 -12
  223. package/dist/utils/is-plain-object.js +0 -8
  224. package/dist/utils/merge-refs.js +0 -11
  225. package/dist/utils/schema/dereference.js +0 -45
  226. package/dist/utils/schema/index.d.ts +0 -18
  227. package/dist/utils/schema/merge.js +0 -156
  228. package/dist/utils/schema/pick.js +0 -44
  229. package/dist/utils/schema/ref.js +0 -35
  230. package/dist/utils/schema/resolve-ref.js +0 -11
  231. package/dist/utils/schema/sample.js +0 -442
  232. package/dist/utils/schema/to-string.d.ts +0 -1
  233. package/dist/utils/schema/to-string.js +0 -53
  234. package/dist/utils/url.js +0 -39
@@ -1,99 +0,0 @@
1
- //#region ../../node_modules/.pnpm/@apidevtools+json-schema-ref-parser@15.3.5_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/plugins.js
2
- /**
3
- * Returns the given plugins as an array, rather than an object map.
4
- * All other methods in this module expect an array of plugins rather than an object map.
5
- *
6
- * @returns
7
- */
8
- function all(plugins) {
9
- return Object.keys(plugins || {}).filter((key) => {
10
- return typeof plugins[key] === "object";
11
- }).map((key) => {
12
- plugins[key].name = key;
13
- return plugins[key];
14
- });
15
- }
16
- /**
17
- * Filters the given plugins, returning only the ones return `true` for the given method.
18
- */
19
- function filter(plugins, method, file, callback, $refs) {
20
- return plugins.filter((plugin) => {
21
- return !!getResult(plugin, method, file, callback, $refs);
22
- });
23
- }
24
- /**
25
- * Sorts the given plugins, in place, by their `order` property.
26
- */
27
- function sort(plugins) {
28
- for (const plugin of plugins) plugin.order = plugin.order || Number.MAX_SAFE_INTEGER;
29
- return plugins.sort((a, b) => {
30
- return a.order - b.order;
31
- });
32
- }
33
- /**
34
- * Runs the specified method of the given plugins, in order, until one of them returns a successful result.
35
- * Each method can return a synchronous value, a Promise, or call an error-first callback.
36
- * If the promise resolves successfully, or the callback is called without an error, then the result
37
- * is immediately returned and no further plugins are called.
38
- * If the promise rejects, or the callback is called with an error, then the next plugin is called.
39
- * If ALL plugins fail, then the last error is thrown.
40
- */
41
- async function run(plugins, method, file, $refs) {
42
- let plugin;
43
- let lastError;
44
- let index = 0;
45
- return new Promise((resolve, reject) => {
46
- runNextPlugin();
47
- function runNextPlugin() {
48
- plugin = plugins[index++];
49
- if (!plugin) return reject(lastError);
50
- try {
51
- const result = getResult(plugin, method, file, callback, $refs);
52
- if (result && typeof result.then === "function") result.then(onSuccess, onError);
53
- else if (result !== void 0) onSuccess(result);
54
- else if (index === plugins.length) throw new Error("No promise has been returned or callback has been called.");
55
- } catch (e) {
56
- onError(e);
57
- }
58
- }
59
- function callback(err, result) {
60
- if (err) onError(err);
61
- else onSuccess(result);
62
- }
63
- function onSuccess(result) {
64
- resolve({
65
- plugin,
66
- result
67
- });
68
- }
69
- function onError(error) {
70
- lastError = {
71
- plugin,
72
- error
73
- };
74
- runNextPlugin();
75
- }
76
- });
77
- }
78
- /**
79
- * Returns the value of the given property.
80
- * If the property is a function, then the result of the function is returned.
81
- * If the value is a RegExp, then it will be tested against the file URL.
82
- * If the value is an array, then it will be compared against the file extension.
83
- */
84
- function getResult(obj, prop, file, callback, $refs) {
85
- const value = obj[prop];
86
- if (typeof value === "function") return value.apply(obj, [
87
- file,
88
- callback,
89
- $refs
90
- ]);
91
- if (!callback) {
92
- if (value instanceof RegExp) return value.test(file.url);
93
- else if (typeof value === "string") return value === file.extension;
94
- else if (Array.isArray(value)) return value.indexOf(file.extension) !== -1;
95
- }
96
- return value;
97
- }
98
- //#endregion
99
- export { all, filter, run, sort };
@@ -1,30 +0,0 @@
1
- import { resolve } from "./url.js";
2
- //#region ../../node_modules/.pnpm/@apidevtools+json-schema-ref-parser@15.3.5_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/schema-resources.js
3
- function getSchemaBasePath(basePath, value) {
4
- const schemaId = getSchemaId(value);
5
- return schemaId ? resolve(basePath, schemaId) : basePath;
6
- }
7
- function usesDynamicIdScope(value) {
8
- if (!value || typeof value !== "object" || ArrayBuffer.isView(value)) return false;
9
- const schema = value.$schema;
10
- if (typeof schema === "string" && (schema.includes("draft/2019-09/") || schema.includes("draft/2020-12/") || schema.includes("oas/3.1/"))) return true;
11
- const openapi = value.openapi;
12
- return typeof openapi === "string" && /^3\.1(?:\.|$)/.test(openapi);
13
- }
14
- function registerSchemaResources($refs, basePath, value, pathType, dynamicIdScope = false) {
15
- if (!dynamicIdScope) return;
16
- const seen = /* @__PURE__ */ new Set();
17
- const visit = (node, scopeBase) => {
18
- if (!node || typeof node !== "object" || ArrayBuffer.isView(node) || seen.has(node)) return;
19
- seen.add(node);
20
- const nextScopeBase = getSchemaBasePath(scopeBase, node);
21
- if (nextScopeBase !== scopeBase) $refs._addAlias(nextScopeBase, node, pathType, dynamicIdScope);
22
- for (const key of Object.keys(node)) visit(node[key], nextScopeBase);
23
- };
24
- visit(value, basePath);
25
- }
26
- function getSchemaId(value) {
27
- if (value && typeof value === "object" && "$id" in value && typeof value.$id === "string" && value.$id.length > 0) return value.$id;
28
- }
29
- //#endregion
30
- export { getSchemaBasePath, registerSchemaResources, usesDynamicIdScope };
@@ -1,315 +0,0 @@
1
- import convertPathToPosix from "./convert-path-to-posix.js";
2
- import { isWindows } from "./is-windows.js";
3
- //#region ../../node_modules/.pnpm/@apidevtools+json-schema-ref-parser@15.3.5_@types+json-schema@7.0.15/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/url.js
4
- const forwardSlashPattern = /\//g;
5
- const protocolPattern = /^(\w{2,}):\/\//i;
6
- const jsonPointerSlash = /~1/g;
7
- const jsonPointerTilde = /~0/g;
8
- const isAbsoluteWin32Path = /^[a-zA-Z]:[\\/]/;
9
- const urlEncodePatterns = [[/\?/g, "%3F"], [/#/g, "%23"]];
10
- const urlDecodePatterns = [
11
- /%23/g,
12
- "#",
13
- /%24/g,
14
- "$",
15
- /%26/g,
16
- "&",
17
- /%2C/g,
18
- ",",
19
- /%40/g,
20
- "@"
21
- ];
22
- const parse = (u) => new URL(u);
23
- /**
24
- * Returns resolved target URL relative to a base URL in a manner similar to that of a Web browser resolving an anchor tag HREF.
25
- *
26
- * @returns
27
- */
28
- function resolve(from, to) {
29
- const fromUrl = new URL(convertPathToPosix(from), "https://aaa.nonexistanturl.com");
30
- const resolvedUrl = new URL(convertPathToPosix(to), fromUrl);
31
- const endSpaces = to.match(/(\s*)$/)?.[1] || "";
32
- if (resolvedUrl.hostname === "aaa.nonexistanturl.com") {
33
- const { pathname, search, hash } = resolvedUrl;
34
- return pathname + search + decodeURIComponent(hash) + endSpaces;
35
- }
36
- const resolved = resolvedUrl.toString() + endSpaces;
37
- if (resolved.includes("#")) {
38
- const [base, hash] = resolved.split("#", 2);
39
- return base + "#" + decodeURIComponent(hash || "");
40
- }
41
- return resolved;
42
- }
43
- /**
44
- * Returns the current working directory (in Node) or the current page URL (in browsers).
45
- *
46
- * @returns
47
- */
48
- function cwd() {
49
- if (typeof window !== "undefined" && window.location && window.location.href) {
50
- const href = window.location.href;
51
- if (!href || !href.startsWith("http")) try {
52
- new URL(href);
53
- return href;
54
- } catch {
55
- return "/";
56
- }
57
- return href;
58
- }
59
- if (typeof process !== "undefined" && process.cwd) {
60
- const path = process.cwd();
61
- const lastChar = path.slice(-1);
62
- if (lastChar === "/" || lastChar === "\\") return path;
63
- else return path + "/";
64
- }
65
- return "/";
66
- }
67
- /**
68
- * Returns the protocol of the given URL, or `undefined` if it has no protocol.
69
- *
70
- * @param path
71
- * @returns
72
- */
73
- function getProtocol(path) {
74
- const match = protocolPattern.exec(path || "");
75
- if (match) return match[1].toLowerCase();
76
- }
77
- /**
78
- * Returns the lowercased file extension of the given URL,
79
- * or an empty string if it has no extension.
80
- *
81
- * @param path
82
- * @returns
83
- */
84
- function getExtension(path) {
85
- const lastDot = path.lastIndexOf(".");
86
- if (lastDot >= 0) return stripQuery(path.substring(lastDot).toLowerCase());
87
- return "";
88
- }
89
- /**
90
- * Removes the query, if any, from the given path.
91
- *
92
- * @param path
93
- * @returns
94
- */
95
- function stripQuery(path) {
96
- const queryIndex = path.indexOf("?");
97
- if (queryIndex >= 0) path = path.substring(0, queryIndex);
98
- return path;
99
- }
100
- /**
101
- * Returns the hash (URL fragment), of the given path.
102
- * If there is no hash, then the root hash ("#") is returned.
103
- *
104
- * @param path
105
- * @returns
106
- */
107
- function getHash(path) {
108
- if (!path) return "#";
109
- const hashIndex = path.indexOf("#");
110
- if (hashIndex >= 0) return path.substring(hashIndex);
111
- return "#";
112
- }
113
- /**
114
- * Removes the hash (URL fragment), if any, from the given path.
115
- *
116
- * @param path
117
- * @returns
118
- */
119
- function stripHash(path) {
120
- if (!path) return "";
121
- const hashIndex = path.indexOf("#");
122
- if (hashIndex >= 0) path = path.substring(0, hashIndex);
123
- return path;
124
- }
125
- /**
126
- * Determines whether the given path is an HTTP(S) URL.
127
- *
128
- * @param path
129
- * @returns
130
- */
131
- function isHttp(path) {
132
- const protocol = getProtocol(path);
133
- if (protocol === "http" || protocol === "https") return true;
134
- else if (protocol === void 0) return typeof window !== "undefined";
135
- else return false;
136
- }
137
- /**
138
- * Determines whether the given url is an unsafe or internal url.
139
- *
140
- * @param path - The URL or path to check
141
- * @returns true if the URL is unsafe/internal, false otherwise
142
- */
143
- function isUnsafeUrl(path) {
144
- if (!path || typeof path !== "string") return true;
145
- const normalizedPath = path.trim().toLowerCase();
146
- if (!normalizedPath) return true;
147
- if (normalizedPath.startsWith("javascript:") || normalizedPath.startsWith("vbscript:") || normalizedPath.startsWith("data:")) return true;
148
- if (normalizedPath.startsWith("file:")) return true;
149
- if (typeof window !== "undefined" && window.location && window.location.href) return false;
150
- const localPatterns = [
151
- "localhost",
152
- "127.0.0.1",
153
- "::1",
154
- "10.",
155
- "172.16.",
156
- "172.17.",
157
- "172.18.",
158
- "172.19.",
159
- "172.20.",
160
- "172.21.",
161
- "172.22.",
162
- "172.23.",
163
- "172.24.",
164
- "172.25.",
165
- "172.26.",
166
- "172.27.",
167
- "172.28.",
168
- "172.29.",
169
- "172.30.",
170
- "172.31.",
171
- "192.168.",
172
- "169.254.",
173
- ".local",
174
- ".internal",
175
- ".intranet",
176
- ".corp",
177
- ".home",
178
- ".lan"
179
- ];
180
- try {
181
- const url = new URL(normalizedPath.startsWith("//") ? "http:" + normalizedPath : normalizedPath);
182
- const hostname = url.hostname.toLowerCase();
183
- for (const pattern of localPatterns) if (hostname === pattern || hostname.startsWith(pattern) || hostname.endsWith(pattern)) return true;
184
- if (isPrivateIP(hostname)) return true;
185
- const port = url.port;
186
- if (port && isInternalPort(parseInt(port))) return true;
187
- } catch {
188
- if (normalizedPath.startsWith("/") && !normalizedPath.startsWith("//")) return false;
189
- for (const pattern of localPatterns) if (normalizedPath.includes(pattern)) return true;
190
- }
191
- return false;
192
- }
193
- /**
194
- * Helper function to check if an IP address is in a private range
195
- */
196
- function isPrivateIP(ip) {
197
- const match = ip.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);
198
- if (!match) return false;
199
- const [, a, b, c, d] = match.map(Number);
200
- if (a > 255 || b > 255 || c > 255 || d > 255) return false;
201
- return a === 10 || a === 127 || a === 172 && b >= 16 && b <= 31 || a === 192 && b === 168 || a === 169 && b === 254;
202
- }
203
- /**
204
- * Helper function to check if a port is typically used for internal services
205
- */
206
- function isInternalPort(port) {
207
- return [
208
- 22,
209
- 23,
210
- 25,
211
- 53,
212
- 135,
213
- 139,
214
- 445,
215
- 993,
216
- 995,
217
- 1433,
218
- 1521,
219
- 3306,
220
- 3389,
221
- 5432,
222
- 5900,
223
- 6379,
224
- 8080,
225
- 8443,
226
- 9200,
227
- 27017
228
- ].includes(port);
229
- }
230
- /**
231
- * Determines whether the given path is a filesystem path.
232
- * This includes "file://" URLs.
233
- *
234
- * @param path
235
- * @returns
236
- */
237
- function isFileSystemPath(path) {
238
- if (typeof window !== "undefined" || typeof process !== "undefined" && process.browser) return false;
239
- const protocol = getProtocol(path);
240
- return protocol === void 0 || protocol === "file";
241
- }
242
- /**
243
- * Converts a filesystem path to a properly-encoded URL.
244
- *
245
- * This is intended to handle situations where JSON Schema $Ref Parser is called
246
- * with a filesystem path that contains characters which are not allowed in URLs.
247
- *
248
- * @example
249
- * The following filesystem paths would be converted to the following URLs:
250
- *
251
- * <"!@#$%^&*+=?'>.json ==> %3C%22!@%23$%25%5E&*+=%3F\'%3E.json
252
- * C:\\My Documents\\File (1).json ==> C:/My%20Documents/File%20(1).json
253
- * file://Project #42/file.json ==> file://Project%20%2342/file.json
254
- *
255
- * @param path
256
- * @returns
257
- */
258
- function fromFileSystemPath(path) {
259
- if (isWindows()) {
260
- const projectDir = cwd();
261
- const upperPath = path.toUpperCase();
262
- const posixUpper = convertPathToPosix(projectDir).toUpperCase();
263
- const hasProjectDir = upperPath.includes(posixUpper);
264
- const hasProjectUri = upperPath.includes(posixUpper);
265
- const isAbsolutePath = isAbsoluteWin32Path.test(path) || path.startsWith("http://") || path.startsWith("https://") || path.startsWith("file://");
266
- if (!(hasProjectDir || hasProjectUri || isAbsolutePath) && !projectDir.startsWith("http")) {
267
- const join = (a, b) => {
268
- if (a.endsWith("/") || a.endsWith("\\")) return a + b;
269
- else return a + "/" + b;
270
- };
271
- path = join(projectDir, path);
272
- }
273
- path = convertPathToPosix(path);
274
- }
275
- path = encodeURI(path);
276
- for (const pattern of urlEncodePatterns) path = path.replace(pattern[0], pattern[1]);
277
- return path;
278
- }
279
- /**
280
- * Converts a URL to a local filesystem path.
281
- */
282
- function toFileSystemPath(path, keepFileProtocol) {
283
- path = path.replace(/%(?![0-9A-Fa-f]{2})/g, "%25");
284
- path = decodeURI(path);
285
- for (let i = 0; i < urlDecodePatterns.length; i += 2) path = path.replace(urlDecodePatterns[i], urlDecodePatterns[i + 1]);
286
- let isFileUrl = path.toLowerCase().startsWith("file://");
287
- if (isFileUrl) {
288
- path = path.replace(/^file:\/\//, "").replace(/^\//, "");
289
- if (isWindows() && path[1] === "/") path = `${path[0]}:${path.substring(1)}`;
290
- if (keepFileProtocol) path = "file:///" + path;
291
- else {
292
- isFileUrl = false;
293
- path = isWindows() ? path : "/" + path;
294
- }
295
- }
296
- if (isWindows() && !isFileUrl) {
297
- path = path.replace(forwardSlashPattern, "\\");
298
- if (path.match(/^[a-z]:\\/i)) path = path[0].toUpperCase() + path.substring(1);
299
- }
300
- return path;
301
- }
302
- /**
303
- * Converts a $ref pointer to a valid JSON Path.
304
- *
305
- * @param pointer
306
- * @returns
307
- */
308
- function safePointerToPath(pointer) {
309
- if (pointer.length <= 1 || pointer[0] !== "#" || pointer[1] !== "/") return [];
310
- return pointer.slice(2).split("/").map((value) => {
311
- return value.replace(jsonPointerSlash, "/").replace(jsonPointerTilde, "~");
312
- });
313
- }
314
- //#endregion
315
- export { cwd, fromFileSystemPath, getExtension, getHash, isFileSystemPath, isHttp, isUnsafeUrl, parse, resolve, safePointerToPath, stripHash, toFileSystemPath };
@@ -1,108 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../_virtual/_rolldown/runtime.js";
2
- //#region ../../node_modules/.pnpm/@fastify+deepmerge@3.2.1/node_modules/@fastify/deepmerge/index.js
3
- var require_deepmerge = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
- const JSON_PROTO = Object.getPrototypeOf({});
5
- function defaultIsMergeableObjectFactory() {
6
- return function defaultIsMergeableObject(value) {
7
- return typeof value === "object" && value !== null && !(value instanceof RegExp) && !(value instanceof Date);
8
- };
9
- }
10
- function deepmergeConstructor(options) {
11
- function isNotPrototypeKey(value) {
12
- return value !== "constructor" && value !== "prototype" && value !== "__proto__";
13
- }
14
- function cloneArray(value) {
15
- let i = 0;
16
- const il = value.length;
17
- const result = new Array(il);
18
- for (; i < il; ++i) result[i] = clone(value[i]);
19
- return result;
20
- }
21
- function cloneObject(target) {
22
- const result = {};
23
- if (cloneProtoObject && Object.getPrototypeOf(target) !== JSON_PROTO) return cloneProtoObject(target);
24
- const targetKeys = getKeys(target);
25
- let i, il, key;
26
- for (i = 0, il = targetKeys.length; i < il; ++i) isNotPrototypeKey(key = targetKeys[i]) && (result[key] = clone(target[key]));
27
- return result;
28
- }
29
- function concatArrays(target, source) {
30
- const tl = target.length;
31
- const sl = source.length;
32
- let i = 0;
33
- const result = new Array(tl + sl);
34
- for (; i < tl; ++i) result[i] = clone(target[i]);
35
- for (i = 0; i < sl; ++i) result[i + tl] = clone(source[i]);
36
- return result;
37
- }
38
- const propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
39
- function getSymbolsAndKeys(value) {
40
- const result = Object.keys(value);
41
- const keys = Object.getOwnPropertySymbols(value);
42
- for (let i = 0, il = keys.length; i < il; ++i) propertyIsEnumerable.call(value, keys[i]) && result.push(keys[i]);
43
- return result;
44
- }
45
- const getKeys = options?.symbols ? getSymbolsAndKeys : Object.keys;
46
- const cloneProtoObject = typeof options?.cloneProtoObject === "function" ? options.cloneProtoObject : void 0;
47
- const isMergeableObject = typeof options?.isMergeableObject === "function" ? options.isMergeableObject : defaultIsMergeableObjectFactory();
48
- const onlyDefinedProperties = options?.onlyDefinedProperties === true;
49
- function isPrimitive(value) {
50
- return typeof value !== "object" || value === null;
51
- }
52
- const mergeArray = options && typeof options.mergeArray === "function" ? options.mergeArray({
53
- clone,
54
- deepmerge: _deepmerge,
55
- getKeys,
56
- isMergeableObject
57
- }) : concatArrays;
58
- function clone(entry) {
59
- return isMergeableObject(entry) ? Array.isArray(entry) ? cloneArray(entry) : cloneObject(entry) : entry;
60
- }
61
- function mergeObject(target, source) {
62
- const result = {};
63
- const targetKeys = getKeys(target);
64
- const sourceKeys = getKeys(source);
65
- let i, il, key;
66
- for (i = 0, il = targetKeys.length; i < il; ++i) isNotPrototypeKey(key = targetKeys[i]) && sourceKeys.indexOf(key) === -1 && (result[key] = clone(target[key]));
67
- for (i = 0, il = sourceKeys.length; i < il; ++i) {
68
- if (!isNotPrototypeKey(key = sourceKeys[i])) continue;
69
- if (key in target) {
70
- if (targetKeys.indexOf(key) !== -1) if (cloneProtoObject && isMergeableObject(source[key]) && Object.getPrototypeOf(source[key]) !== JSON_PROTO) result[key] = cloneProtoObject(source[key]);
71
- else result[key] = _deepmerge(target[key], source[key]);
72
- } else {
73
- if (onlyDefinedProperties && typeof source[key] === "undefined") continue;
74
- result[key] = clone(source[key]);
75
- }
76
- }
77
- return result;
78
- }
79
- function _deepmerge(target, source) {
80
- if (onlyDefinedProperties && typeof source === "undefined") return clone(target);
81
- const sourceIsArray = Array.isArray(source);
82
- const targetIsArray = Array.isArray(target);
83
- if (isPrimitive(source)) return source;
84
- else if (!isMergeableObject(target)) return clone(source);
85
- else if (sourceIsArray && targetIsArray) return mergeArray(target, source);
86
- else if (sourceIsArray !== targetIsArray) return clone(source);
87
- else return mergeObject(target, source);
88
- }
89
- function _deepmergeAll() {
90
- switch (arguments.length) {
91
- case 0: return {};
92
- case 1: return clone(arguments[0]);
93
- case 2: return _deepmerge(arguments[0], arguments[1]);
94
- }
95
- let result;
96
- for (let i = 0, il = arguments.length; i < il; ++i) result = _deepmerge(result, arguments[i]);
97
- return result;
98
- }
99
- return options?.all ? _deepmergeAll : _deepmerge;
100
- }
101
- module.exports = deepmergeConstructor;
102
- module.exports.default = deepmergeConstructor;
103
- module.exports.deepmerge = deepmergeConstructor;
104
- Object.defineProperty(module.exports, "isMergeableObject", { get: defaultIsMergeableObjectFactory });
105
- }));
106
- //#endregion
107
- export default require_deepmerge();
108
- export { require_deepmerge };
@@ -1,110 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../_virtual/_rolldown/runtime.js";
2
- import { require_codegen } from "./compile/codegen/index.js";
3
- import { require_validate } from "./compile/validate/index.js";
4
- import { require_validation_error } from "./runtime/validation_error.js";
5
- import { require_ref_error } from "./compile/ref_error.js";
6
- import { require_core } from "./core.js";
7
- import { require_draft2020 } from "./vocabularies/draft2020.js";
8
- import { require_discriminator } from "./vocabularies/discriminator/index.js";
9
- import { require_json_schema_2020_12 } from "./refs/json-schema-2020-12/index.js";
10
- //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/2020.js
11
- var require__2020 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2020 = void 0;
14
- const core_1 = require_core();
15
- const draft2020_1 = require_draft2020();
16
- const discriminator_1 = require_discriminator();
17
- const json_schema_2020_12_1 = require_json_schema_2020_12();
18
- const META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema";
19
- var Ajv2020 = class extends core_1.default {
20
- constructor(opts = {}) {
21
- super({
22
- ...opts,
23
- dynamicRef: true,
24
- next: true,
25
- unevaluated: true
26
- });
27
- }
28
- _addVocabularies() {
29
- super._addVocabularies();
30
- draft2020_1.default.forEach((v) => this.addVocabulary(v));
31
- if (this.opts.discriminator) this.addKeyword(discriminator_1.default);
32
- }
33
- _addDefaultMetaSchema() {
34
- super._addDefaultMetaSchema();
35
- const { $data, meta } = this.opts;
36
- if (!meta) return;
37
- json_schema_2020_12_1.default.call(this, $data);
38
- this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
39
- }
40
- defaultMeta() {
41
- return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
42
- }
43
- };
44
- exports.Ajv2020 = Ajv2020;
45
- module.exports = exports = Ajv2020;
46
- module.exports.Ajv2020 = Ajv2020;
47
- Object.defineProperty(exports, "__esModule", { value: true });
48
- exports.default = Ajv2020;
49
- var validate_1 = require_validate();
50
- Object.defineProperty(exports, "KeywordCxt", {
51
- enumerable: true,
52
- get: function() {
53
- return validate_1.KeywordCxt;
54
- }
55
- });
56
- var codegen_1 = require_codegen();
57
- Object.defineProperty(exports, "_", {
58
- enumerable: true,
59
- get: function() {
60
- return codegen_1._;
61
- }
62
- });
63
- Object.defineProperty(exports, "str", {
64
- enumerable: true,
65
- get: function() {
66
- return codegen_1.str;
67
- }
68
- });
69
- Object.defineProperty(exports, "stringify", {
70
- enumerable: true,
71
- get: function() {
72
- return codegen_1.stringify;
73
- }
74
- });
75
- Object.defineProperty(exports, "nil", {
76
- enumerable: true,
77
- get: function() {
78
- return codegen_1.nil;
79
- }
80
- });
81
- Object.defineProperty(exports, "Name", {
82
- enumerable: true,
83
- get: function() {
84
- return codegen_1.Name;
85
- }
86
- });
87
- Object.defineProperty(exports, "CodeGen", {
88
- enumerable: true,
89
- get: function() {
90
- return codegen_1.CodeGen;
91
- }
92
- });
93
- var validation_error_1 = require_validation_error();
94
- Object.defineProperty(exports, "ValidationError", {
95
- enumerable: true,
96
- get: function() {
97
- return validation_error_1.default;
98
- }
99
- });
100
- var ref_error_1 = require_ref_error();
101
- Object.defineProperty(exports, "MissingRefError", {
102
- enumerable: true,
103
- get: function() {
104
- return ref_error_1.default;
105
- }
106
- });
107
- }));
108
- //#endregion
109
- export default require__2020();
110
- export { require__2020 };