fumadocs-openapi 10.10.3 → 11.0.1

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 -1159
  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 -410
  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,20 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../../../_virtual/_rolldown/runtime.js";
2
- //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json
3
- var require_content = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
- module.exports = {
5
- "$schema": "https://json-schema.org/draft/2020-12/schema",
6
- "$id": "https://json-schema.org/draft/2020-12/meta/content",
7
- "$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/content": true },
8
- "$dynamicAnchor": "meta",
9
- "title": "Content vocabulary meta-schema",
10
- "type": ["object", "boolean"],
11
- "properties": {
12
- "contentEncoding": { "type": "string" },
13
- "contentMediaType": { "type": "string" },
14
- "contentSchema": { "$dynamicRef": "#meta" }
15
- }
16
- };
17
- }));
18
- //#endregion
19
- export default require_content();
20
- export { require_content };
@@ -1,51 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../../../_virtual/_rolldown/runtime.js";
2
- //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json
3
- var require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
- module.exports = {
5
- "$schema": "https://json-schema.org/draft/2020-12/schema",
6
- "$id": "https://json-schema.org/draft/2020-12/meta/core",
7
- "$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/core": true },
8
- "$dynamicAnchor": "meta",
9
- "title": "Core vocabulary meta-schema",
10
- "type": ["object", "boolean"],
11
- "properties": {
12
- "$id": {
13
- "$ref": "#/$defs/uriReferenceString",
14
- "$comment": "Non-empty fragments not allowed.",
15
- "pattern": "^[^#]*#?$"
16
- },
17
- "$schema": { "$ref": "#/$defs/uriString" },
18
- "$ref": { "$ref": "#/$defs/uriReferenceString" },
19
- "$anchor": { "$ref": "#/$defs/anchorString" },
20
- "$dynamicRef": { "$ref": "#/$defs/uriReferenceString" },
21
- "$dynamicAnchor": { "$ref": "#/$defs/anchorString" },
22
- "$vocabulary": {
23
- "type": "object",
24
- "propertyNames": { "$ref": "#/$defs/uriString" },
25
- "additionalProperties": { "type": "boolean" }
26
- },
27
- "$comment": { "type": "string" },
28
- "$defs": {
29
- "type": "object",
30
- "additionalProperties": { "$dynamicRef": "#meta" }
31
- }
32
- },
33
- "$defs": {
34
- "anchorString": {
35
- "type": "string",
36
- "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$"
37
- },
38
- "uriString": {
39
- "type": "string",
40
- "format": "uri"
41
- },
42
- "uriReferenceString": {
43
- "type": "string",
44
- "format": "uri-reference"
45
- }
46
- }
47
- };
48
- }));
49
- //#endregion
50
- export default require_core();
51
- export { require_core };
@@ -1,16 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../../../_virtual/_rolldown/runtime.js";
2
- //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json
3
- var require_format_annotation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
- module.exports = {
5
- "$schema": "https://json-schema.org/draft/2020-12/schema",
6
- "$id": "https://json-schema.org/draft/2020-12/meta/format-annotation",
7
- "$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/format-annotation": true },
8
- "$dynamicAnchor": "meta",
9
- "title": "Format vocabulary meta-schema for annotation results",
10
- "type": ["object", "boolean"],
11
- "properties": { "format": { "type": "string" } }
12
- };
13
- }));
14
- //#endregion
15
- export default require_format_annotation();
16
- export { require_format_annotation };
@@ -1,36 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../../../_virtual/_rolldown/runtime.js";
2
- //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json
3
- var require_meta_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
- module.exports = {
5
- "$schema": "https://json-schema.org/draft/2020-12/schema",
6
- "$id": "https://json-schema.org/draft/2020-12/meta/meta-data",
7
- "$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/meta-data": true },
8
- "$dynamicAnchor": "meta",
9
- "title": "Meta-data vocabulary meta-schema",
10
- "type": ["object", "boolean"],
11
- "properties": {
12
- "title": { "type": "string" },
13
- "description": { "type": "string" },
14
- "default": true,
15
- "deprecated": {
16
- "type": "boolean",
17
- "default": false
18
- },
19
- "readOnly": {
20
- "type": "boolean",
21
- "default": false
22
- },
23
- "writeOnly": {
24
- "type": "boolean",
25
- "default": false
26
- },
27
- "examples": {
28
- "type": "array",
29
- "items": true
30
- }
31
- }
32
- };
33
- }));
34
- //#endregion
35
- export default require_meta_data();
36
- export { require_meta_data };
@@ -1,19 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../../../_virtual/_rolldown/runtime.js";
2
- //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json
3
- var require_unevaluated = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
- module.exports = {
5
- "$schema": "https://json-schema.org/draft/2020-12/schema",
6
- "$id": "https://json-schema.org/draft/2020-12/meta/unevaluated",
7
- "$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/unevaluated": true },
8
- "$dynamicAnchor": "meta",
9
- "title": "Unevaluated applicator vocabulary meta-schema",
10
- "type": ["object", "boolean"],
11
- "properties": {
12
- "unevaluatedItems": { "$dynamicRef": "#meta" },
13
- "unevaluatedProperties": { "$dynamicRef": "#meta" }
14
- }
15
- };
16
- }));
17
- //#endregion
18
- export default require_unevaluated();
19
- export { require_unevaluated };
@@ -1,85 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../../../_virtual/_rolldown/runtime.js";
2
- //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json
3
- var require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
- module.exports = {
5
- "$schema": "https://json-schema.org/draft/2020-12/schema",
6
- "$id": "https://json-schema.org/draft/2020-12/meta/validation",
7
- "$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/validation": true },
8
- "$dynamicAnchor": "meta",
9
- "title": "Validation vocabulary meta-schema",
10
- "type": ["object", "boolean"],
11
- "properties": {
12
- "type": { "anyOf": [{ "$ref": "#/$defs/simpleTypes" }, {
13
- "type": "array",
14
- "items": { "$ref": "#/$defs/simpleTypes" },
15
- "minItems": 1,
16
- "uniqueItems": true
17
- }] },
18
- "const": true,
19
- "enum": {
20
- "type": "array",
21
- "items": true
22
- },
23
- "multipleOf": {
24
- "type": "number",
25
- "exclusiveMinimum": 0
26
- },
27
- "maximum": { "type": "number" },
28
- "exclusiveMaximum": { "type": "number" },
29
- "minimum": { "type": "number" },
30
- "exclusiveMinimum": { "type": "number" },
31
- "maxLength": { "$ref": "#/$defs/nonNegativeInteger" },
32
- "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
33
- "pattern": {
34
- "type": "string",
35
- "format": "regex"
36
- },
37
- "maxItems": { "$ref": "#/$defs/nonNegativeInteger" },
38
- "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
39
- "uniqueItems": {
40
- "type": "boolean",
41
- "default": false
42
- },
43
- "maxContains": { "$ref": "#/$defs/nonNegativeInteger" },
44
- "minContains": {
45
- "$ref": "#/$defs/nonNegativeInteger",
46
- "default": 1
47
- },
48
- "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" },
49
- "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" },
50
- "required": { "$ref": "#/$defs/stringArray" },
51
- "dependentRequired": {
52
- "type": "object",
53
- "additionalProperties": { "$ref": "#/$defs/stringArray" }
54
- }
55
- },
56
- "$defs": {
57
- "nonNegativeInteger": {
58
- "type": "integer",
59
- "minimum": 0
60
- },
61
- "nonNegativeIntegerDefault0": {
62
- "$ref": "#/$defs/nonNegativeInteger",
63
- "default": 0
64
- },
65
- "simpleTypes": { "enum": [
66
- "array",
67
- "boolean",
68
- "integer",
69
- "null",
70
- "number",
71
- "object",
72
- "string"
73
- ] },
74
- "stringArray": {
75
- "type": "array",
76
- "items": { "type": "string" },
77
- "uniqueItems": true,
78
- "default": []
79
- }
80
- }
81
- };
82
- }));
83
- //#endregion
84
- export default require_validation();
85
- export { require_validation };
@@ -1,59 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
- //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json
3
- var require_schema = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
- module.exports = {
5
- "$schema": "https://json-schema.org/draft/2020-12/schema",
6
- "$id": "https://json-schema.org/draft/2020-12/schema",
7
- "$vocabulary": {
8
- "https://json-schema.org/draft/2020-12/vocab/core": true,
9
- "https://json-schema.org/draft/2020-12/vocab/applicator": true,
10
- "https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
11
- "https://json-schema.org/draft/2020-12/vocab/validation": true,
12
- "https://json-schema.org/draft/2020-12/vocab/meta-data": true,
13
- "https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
14
- "https://json-schema.org/draft/2020-12/vocab/content": true
15
- },
16
- "$dynamicAnchor": "meta",
17
- "title": "Core and Validation specifications meta-schema",
18
- "allOf": [
19
- { "$ref": "meta/core" },
20
- { "$ref": "meta/applicator" },
21
- { "$ref": "meta/unevaluated" },
22
- { "$ref": "meta/validation" },
23
- { "$ref": "meta/meta-data" },
24
- { "$ref": "meta/format-annotation" },
25
- { "$ref": "meta/content" }
26
- ],
27
- "type": ["object", "boolean"],
28
- "$comment": "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",
29
- "properties": {
30
- "definitions": {
31
- "$comment": "\"definitions\" has been replaced by \"$defs\".",
32
- "type": "object",
33
- "additionalProperties": { "$dynamicRef": "#meta" },
34
- "deprecated": true,
35
- "default": {}
36
- },
37
- "dependencies": {
38
- "$comment": "\"dependencies\" has been split and replaced by \"dependentSchemas\" and \"dependentRequired\" in order to serve their differing semantics.",
39
- "type": "object",
40
- "additionalProperties": { "anyOf": [{ "$dynamicRef": "#meta" }, { "$ref": "meta/validation#/$defs/stringArray" }] },
41
- "deprecated": true,
42
- "default": {}
43
- },
44
- "$recursiveAnchor": {
45
- "$comment": "\"$recursiveAnchor\" has been replaced by \"$dynamicAnchor\".",
46
- "$ref": "meta/core#/$defs/anchorString",
47
- "deprecated": true
48
- },
49
- "$recursiveRef": {
50
- "$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".",
51
- "$ref": "meta/core#/$defs/uriReferenceString",
52
- "deprecated": true
53
- }
54
- }
55
- };
56
- }));
57
- //#endregion
58
- export default require_schema();
59
- export { require_schema };
@@ -1,12 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../_virtual/_rolldown/runtime.js";
2
- import { require_fast_deep_equal } from "../../../../../fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js";
3
- //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js
4
- var require_equal = /* @__PURE__ */ __commonJSMin(((exports) => {
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const equal = require_fast_deep_equal();
7
- equal.code = "require(\"ajv/dist/runtime/equal\").default";
8
- exports.default = equal;
9
- }));
10
- //#endregion
11
- export default require_equal();
12
- export { require_equal };
@@ -1,25 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../_virtual/_rolldown/runtime.js";
2
- //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js
3
- var require_ucs2length = /* @__PURE__ */ __commonJSMin(((exports) => {
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- function ucs2length(str) {
6
- const len = str.length;
7
- let length = 0;
8
- let pos = 0;
9
- let value;
10
- while (pos < len) {
11
- length++;
12
- value = str.charCodeAt(pos++);
13
- if (value >= 55296 && value <= 56319 && pos < len) {
14
- value = str.charCodeAt(pos);
15
- if ((value & 64512) === 56320) pos++;
16
- }
17
- }
18
- return length;
19
- }
20
- exports.default = ucs2length;
21
- ucs2length.code = "require(\"ajv/dist/runtime/ucs2length\").default";
22
- }));
23
- //#endregion
24
- export default require_ucs2length();
25
- export { require_ucs2length };
@@ -1,12 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../_virtual/_rolldown/runtime.js";
2
- import { require_fast_uri } from "../../../../../fast-uri@3.1.0/node_modules/fast-uri/index.js";
3
- //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js
4
- var require_uri = /* @__PURE__ */ __commonJSMin(((exports) => {
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const uri = require_fast_uri();
7
- uri.code = "require(\"ajv/dist/runtime/uri\").default";
8
- exports.default = uri;
9
- }));
10
- //#endregion
11
- export default require_uri();
12
- export { require_uri };
@@ -1,16 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../_virtual/_rolldown/runtime.js";
2
- //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js
3
- var require_validation_error = /* @__PURE__ */ __commonJSMin(((exports) => {
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- var ValidationError = class extends Error {
6
- constructor(errors) {
7
- super("validation failed");
8
- this.errors = errors;
9
- this.ajv = this.validation = true;
10
- }
11
- };
12
- exports.default = ValidationError;
13
- }));
14
- //#endregion
15
- export default require_validation_error();
16
- export { require_validation_error };
@@ -1,57 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
- import { require_codegen } from "../../compile/codegen/index.js";
3
- import { require_util } from "../../compile/util.js";
4
- //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
5
- var require_additionalItems = /* @__PURE__ */ __commonJSMin(((exports) => {
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.validateAdditionalItems = void 0;
8
- const codegen_1 = require_codegen();
9
- const util_1 = require_util();
10
- const def = {
11
- keyword: "additionalItems",
12
- type: "array",
13
- schemaType: ["boolean", "object"],
14
- before: "uniqueItems",
15
- error: {
16
- message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
17
- params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
18
- },
19
- code(cxt) {
20
- const { parentSchema, it } = cxt;
21
- const { items } = parentSchema;
22
- if (!Array.isArray(items)) {
23
- (0, util_1.checkStrictMode)(it, "\"additionalItems\" is ignored when \"items\" is not an array of schemas");
24
- return;
25
- }
26
- validateAdditionalItems(cxt, items);
27
- }
28
- };
29
- function validateAdditionalItems(cxt, items) {
30
- const { gen, schema, data, keyword, it } = cxt;
31
- it.items = true;
32
- const len = gen.const("len", (0, codegen_1._)`${data}.length`);
33
- if (schema === false) {
34
- cxt.setParams({ len: items.length });
35
- cxt.pass((0, codegen_1._)`${len} <= ${items.length}`);
36
- } else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
37
- const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items.length}`);
38
- gen.if((0, codegen_1.not)(valid), () => validateItems(valid));
39
- cxt.ok(valid);
40
- }
41
- function validateItems(valid) {
42
- gen.forRange("i", items.length, len, (i) => {
43
- cxt.subschema({
44
- keyword,
45
- dataProp: i,
46
- dataPropType: util_1.Type.Num
47
- }, valid);
48
- if (!it.allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());
49
- });
50
- }
51
- }
52
- exports.validateAdditionalItems = validateAdditionalItems;
53
- exports.default = def;
54
- }));
55
- //#endregion
56
- export default require_additionalItems();
57
- export { require_additionalItems };
@@ -1,96 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
- import { require_codegen } from "../../compile/codegen/index.js";
3
- import { require_util } from "../../compile/util.js";
4
- import { require_names } from "../../compile/names.js";
5
- import { require_code } from "../code.js";
6
- //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
7
- var require_additionalProperties = /* @__PURE__ */ __commonJSMin(((exports) => {
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- const code_1 = require_code();
10
- const codegen_1 = require_codegen();
11
- const names_1 = require_names();
12
- const util_1 = require_util();
13
- exports.default = {
14
- keyword: "additionalProperties",
15
- type: ["object"],
16
- schemaType: ["boolean", "object"],
17
- allowUndefined: true,
18
- trackErrors: true,
19
- error: {
20
- message: "must NOT have additional properties",
21
- params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}`
22
- },
23
- code(cxt) {
24
- const { gen, schema, parentSchema, data, errsCount, it } = cxt;
25
- /* istanbul ignore if */
26
- if (!errsCount) throw new Error("ajv implementation error");
27
- const { allErrors, opts } = it;
28
- it.props = true;
29
- if (opts.removeAdditional !== "all" && (0, util_1.alwaysValidSchema)(it, schema)) return;
30
- const props = (0, code_1.allSchemaProperties)(parentSchema.properties);
31
- const patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties);
32
- checkAdditionalProperties();
33
- cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
34
- function checkAdditionalProperties() {
35
- gen.forIn("key", data, (key) => {
36
- if (!props.length && !patProps.length) additionalPropertyCode(key);
37
- else gen.if(isAdditional(key), () => additionalPropertyCode(key));
38
- });
39
- }
40
- function isAdditional(key) {
41
- let definedProp;
42
- if (props.length > 8) {
43
- const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, "properties");
44
- definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key);
45
- } else if (props.length) definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._)`${key} === ${p}`));
46
- else definedProp = codegen_1.nil;
47
- if (patProps.length) definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p)}.test(${key})`));
48
- return (0, codegen_1.not)(definedProp);
49
- }
50
- function deleteAdditional(key) {
51
- gen.code((0, codegen_1._)`delete ${data}[${key}]`);
52
- }
53
- function additionalPropertyCode(key) {
54
- if (opts.removeAdditional === "all" || opts.removeAdditional && schema === false) {
55
- deleteAdditional(key);
56
- return;
57
- }
58
- if (schema === false) {
59
- cxt.setParams({ additionalProperty: key });
60
- cxt.error();
61
- if (!allErrors) gen.break();
62
- return;
63
- }
64
- if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
65
- const valid = gen.name("valid");
66
- if (opts.removeAdditional === "failing") {
67
- applyAdditionalSchema(key, valid, false);
68
- gen.if((0, codegen_1.not)(valid), () => {
69
- cxt.reset();
70
- deleteAdditional(key);
71
- });
72
- } else {
73
- applyAdditionalSchema(key, valid);
74
- if (!allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());
75
- }
76
- }
77
- }
78
- function applyAdditionalSchema(key, valid, errors) {
79
- const subschema = {
80
- keyword: "additionalProperties",
81
- dataProp: key,
82
- dataPropType: util_1.Type.Str
83
- };
84
- if (errors === false) Object.assign(subschema, {
85
- compositeRule: true,
86
- createErrors: false,
87
- allErrors: false
88
- });
89
- cxt.subschema(subschema, valid);
90
- }
91
- }
92
- };
93
- }));
94
- //#endregion
95
- export default require_additionalProperties();
96
- export { require_additionalProperties };
@@ -1,29 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
- import { require_util } from "../../compile/util.js";
3
- //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js
4
- var require_allOf = /* @__PURE__ */ __commonJSMin(((exports) => {
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const util_1 = require_util();
7
- exports.default = {
8
- keyword: "allOf",
9
- schemaType: "array",
10
- code(cxt) {
11
- const { gen, schema, it } = cxt;
12
- /* istanbul ignore if */
13
- if (!Array.isArray(schema)) throw new Error("ajv implementation error");
14
- const valid = gen.name("valid");
15
- schema.forEach((sch, i) => {
16
- if ((0, util_1.alwaysValidSchema)(it, sch)) return;
17
- const schCxt = cxt.subschema({
18
- keyword: "allOf",
19
- schemaProp: i
20
- }, valid);
21
- cxt.ok(valid);
22
- cxt.mergeEvaluated(schCxt);
23
- });
24
- }
25
- };
26
- }));
27
- //#endregion
28
- export default require_allOf();
29
- export { require_allOf };
@@ -1,16 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
- import { require_code } from "../code.js";
3
- //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js
4
- var require_anyOf = /* @__PURE__ */ __commonJSMin(((exports) => {
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.default = {
7
- keyword: "anyOf",
8
- schemaType: "array",
9
- trackErrors: true,
10
- code: require_code().validateUnion,
11
- error: { message: "must match a schema in anyOf" }
12
- };
13
- }));
14
- //#endregion
15
- export default require_anyOf();
16
- export { require_anyOf };
@@ -1,89 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../../../_virtual/_rolldown/runtime.js";
2
- import { require_codegen } from "../../compile/codegen/index.js";
3
- import { require_util } from "../../compile/util.js";
4
- //#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js
5
- var require_contains = /* @__PURE__ */ __commonJSMin(((exports) => {
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- const codegen_1 = require_codegen();
8
- const util_1 = require_util();
9
- exports.default = {
10
- keyword: "contains",
11
- type: "array",
12
- schemaType: ["object", "boolean"],
13
- before: "uniqueItems",
14
- trackErrors: true,
15
- error: {
16
- message: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`,
17
- params: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}`
18
- },
19
- code(cxt) {
20
- const { gen, schema, parentSchema, data, it } = cxt;
21
- let min;
22
- let max;
23
- const { minContains, maxContains } = parentSchema;
24
- if (it.opts.next) {
25
- min = minContains === void 0 ? 1 : minContains;
26
- max = maxContains;
27
- } else min = 1;
28
- const len = gen.const("len", (0, codegen_1._)`${data}.length`);
29
- cxt.setParams({
30
- min,
31
- max
32
- });
33
- if (max === void 0 && min === 0) {
34
- (0, util_1.checkStrictMode)(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`);
35
- return;
36
- }
37
- if (max !== void 0 && min > max) {
38
- (0, util_1.checkStrictMode)(it, `"minContains" > "maxContains" is always invalid`);
39
- cxt.fail();
40
- return;
41
- }
42
- if ((0, util_1.alwaysValidSchema)(it, schema)) {
43
- let cond = (0, codegen_1._)`${len} >= ${min}`;
44
- if (max !== void 0) cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`;
45
- cxt.pass(cond);
46
- return;
47
- }
48
- it.items = true;
49
- const valid = gen.name("valid");
50
- if (max === void 0 && min === 1) validateItems(valid, () => gen.if(valid, () => gen.break()));
51
- else if (min === 0) {
52
- gen.let(valid, true);
53
- if (max !== void 0) gen.if((0, codegen_1._)`${data}.length > 0`, validateItemsWithCount);
54
- } else {
55
- gen.let(valid, false);
56
- validateItemsWithCount();
57
- }
58
- cxt.result(valid, () => cxt.reset());
59
- function validateItemsWithCount() {
60
- const schValid = gen.name("_valid");
61
- const count = gen.let("count", 0);
62
- validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));
63
- }
64
- function validateItems(_valid, block) {
65
- gen.forRange("i", 0, len, (i) => {
66
- cxt.subschema({
67
- keyword: "contains",
68
- dataProp: i,
69
- dataPropType: util_1.Type.Num,
70
- compositeRule: true
71
- }, _valid);
72
- block();
73
- });
74
- }
75
- function checkLimits(count) {
76
- gen.code((0, codegen_1._)`${count}++`);
77
- if (max === void 0) gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true).break());
78
- else {
79
- gen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid, false).break());
80
- if (min === 1) gen.assign(valid, true);
81
- else gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true));
82
- }
83
- }
84
- }
85
- };
86
- }));
87
- //#endregion
88
- export default require_contains();
89
- export { require_contains };