@kubb/plugin-oas 3.0.0-alpha.10 → 3.0.0-alpha.12

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 (43) hide show
  1. package/dist/{chunk-M347763D.js → chunk-2X5GZFQP.js} +14 -46
  2. package/dist/chunk-2X5GZFQP.js.map +1 -0
  3. package/dist/{chunk-IAUV3UKH.cjs → chunk-47SNBYWH.cjs} +102 -121
  4. package/dist/chunk-47SNBYWH.cjs.map +1 -0
  5. package/dist/{chunk-SZDO532A.js → chunk-4VKHSKYX.js} +7 -12
  6. package/dist/{chunk-SZDO532A.js.map → chunk-4VKHSKYX.js.map} +1 -1
  7. package/dist/{chunk-N7EEVJA6.js → chunk-4WUMV7QX.js} +9 -12
  8. package/dist/chunk-4WUMV7QX.js.map +1 -0
  9. package/dist/chunk-6AVEWDKE.cjs +8 -0
  10. package/dist/chunk-6AVEWDKE.cjs.map +1 -0
  11. package/dist/chunk-S6RFFHLW.cjs +38 -0
  12. package/dist/chunk-S6RFFHLW.cjs.map +1 -0
  13. package/dist/chunk-WN5S6RCU.js +6 -0
  14. package/dist/chunk-WN5S6RCU.js.map +1 -0
  15. package/dist/{chunk-NU4F7G47.cjs → chunk-XQPCA75E.cjs} +21 -20
  16. package/dist/chunk-XQPCA75E.cjs.map +1 -0
  17. package/dist/components.cjs +21 -12
  18. package/dist/components.cjs.map +1 -1
  19. package/dist/components.js +4 -12
  20. package/dist/components.js.map +1 -1
  21. package/dist/hooks.cjs +30 -34
  22. package/dist/hooks.cjs.map +1 -1
  23. package/dist/hooks.js +10 -22
  24. package/dist/hooks.js.map +1 -1
  25. package/dist/index.cjs +92 -90
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.js +12 -32
  28. package/dist/index.js.map +1 -1
  29. package/dist/utils.cjs +39 -31
  30. package/dist/utils.cjs.map +1 -1
  31. package/dist/utils.js +9 -24
  32. package/dist/utils.js.map +1 -1
  33. package/package.json +9 -9
  34. package/dist/chunk-75BIOXB7.cjs +0 -7
  35. package/dist/chunk-75BIOXB7.cjs.map +0 -1
  36. package/dist/chunk-IAUV3UKH.cjs.map +0 -1
  37. package/dist/chunk-M347763D.js.map +0 -1
  38. package/dist/chunk-N7EEVJA6.js.map +0 -1
  39. package/dist/chunk-NU4F7G47.cjs.map +0 -1
  40. package/dist/chunk-O76YQFZB.cjs +0 -35
  41. package/dist/chunk-O76YQFZB.cjs.map +0 -1
  42. package/dist/chunk-SQ64ESS4.js +0 -7
  43. package/dist/chunk-SQ64ESS4.js.map +0 -1
@@ -1,15 +1,14 @@
1
- import {
2
- __commonJS,
3
- __toESM,
4
- getSchemaFactory,
5
- getSchemas,
6
- init_esm_shims
7
- } from "./chunk-SZDO532A.js";
1
+ import { __commonJS, init_esm_shims, __toESM, getSchemaFactory, getSchemas } from './chunk-4VKHSKYX.js';
2
+ import { BaseGenerator } from '@kubb/core';
3
+ import transformers, { pascalCase } from '@kubb/core/transformers';
4
+ import { getUniqueName } from '@kubb/core/utils';
5
+ import { isReference } from '@kubb/oas';
6
+ import { uniqueWith, isDeepEqual, isNumber } from 'remeda';
7
+ import { createContext, useApp, File, useFile, useContext } from '@kubb/react';
8
8
 
9
9
  // ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js
10
10
  var require_react_production_min = __commonJS({
11
11
  "../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js"(exports) {
12
- "use strict";
13
12
  init_esm_shims();
14
13
  var l = Symbol.for("react.element");
15
14
  var n = Symbol.for("react.portal");
@@ -283,11 +282,9 @@ var require_react_production_min = __commonJS({
283
282
  // ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js
284
283
  var require_react_development = __commonJS({
285
284
  "../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js"(exports, module) {
286
- "use strict";
287
285
  init_esm_shims();
288
286
  if (process.env.NODE_ENV !== "production") {
289
287
  (function() {
290
- "use strict";
291
288
  if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
292
289
  __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
293
290
  }
@@ -2158,7 +2155,6 @@ var require_react_development = __commonJS({
2158
2155
  // ../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js
2159
2156
  var require_react = __commonJS({
2160
2157
  "../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"(exports, module) {
2161
- "use strict";
2162
2158
  init_esm_shims();
2163
2159
  if (process.env.NODE_ENV === "production") {
2164
2160
  module.exports = require_react_production_min();
@@ -2171,7 +2167,6 @@ var require_react = __commonJS({
2171
2167
  // ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js
2172
2168
  var require_react_jsx_runtime_production_min = __commonJS({
2173
2169
  "../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js"(exports) {
2174
- "use strict";
2175
2170
  init_esm_shims();
2176
2171
  var f = require_react();
2177
2172
  var k = Symbol.for("react.element");
@@ -2197,11 +2192,9 @@ var require_react_jsx_runtime_production_min = __commonJS({
2197
2192
  // ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js
2198
2193
  var require_react_jsx_runtime_development = __commonJS({
2199
2194
  "../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
2200
- "use strict";
2201
2195
  init_esm_shims();
2202
2196
  if (process.env.NODE_ENV !== "production") {
2203
2197
  (function() {
2204
- "use strict";
2205
2198
  var React = require_react();
2206
2199
  var REACT_ELEMENT_TYPE = Symbol.for("react.element");
2207
2200
  var REACT_PORTAL_TYPE = Symbol.for("react.portal");
@@ -2874,11 +2867,6 @@ var require_react_jsx_runtime_development = __commonJS({
2874
2867
  }
2875
2868
  function getSourceInfoErrorAddendum(source) {
2876
2869
  {
2877
- if (source !== void 0) {
2878
- var fileName = source.fileName.replace(/^.*[\\\/]/, "");
2879
- var lineNumber = source.lineNumber;
2880
- return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
2881
- }
2882
2870
  return "";
2883
2871
  }
2884
2872
  }
@@ -3004,7 +2992,7 @@ var require_react_jsx_runtime_development = __commonJS({
3004
2992
  if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
3005
2993
  info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
3006
2994
  }
3007
- var sourceInfo = getSourceInfoErrorAddendum(source);
2995
+ var sourceInfo = getSourceInfoErrorAddendum();
3008
2996
  if (sourceInfo) {
3009
2997
  info += sourceInfo;
3010
2998
  } else {
@@ -3091,7 +3079,6 @@ var require_react_jsx_runtime_development = __commonJS({
3091
3079
  // ../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js
3092
3080
  var require_jsx_runtime = __commonJS({
3093
3081
  "../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"(exports, module) {
3094
- "use strict";
3095
3082
  init_esm_shims();
3096
3083
  if (process.env.NODE_ENV === "production") {
3097
3084
  module.exports = require_react_jsx_runtime_production_min();
@@ -3155,11 +3142,6 @@ function isKeyword(meta, keyword) {
3155
3142
 
3156
3143
  // src/SchemaGenerator.ts
3157
3144
  init_esm_shims();
3158
- import { BaseGenerator } from "@kubb/core";
3159
- import transformers, { pascalCase } from "@kubb/core/transformers";
3160
- import { getUniqueName } from "@kubb/core/utils";
3161
- import { isReference } from "@kubb/oas";
3162
- import { isDeepEqual, isNumber, uniqueWith } from "remeda";
3163
3145
  var SchemaGenerator = class _SchemaGenerator extends BaseGenerator {
3164
3146
  // Collect the types of all referenced schemas, so we can export them later
3165
3147
  refs = {};
@@ -3711,8 +3693,6 @@ var SchemaGenerator = class _SchemaGenerator extends BaseGenerator {
3711
3693
  case "idn-hostname":
3712
3694
  baseItems.unshift({ keyword: schemaKeywords.url });
3713
3695
  break;
3714
- default:
3715
- break;
3716
3696
  }
3717
3697
  }
3718
3698
  if ("items" in schema || schema.type === "array") {
@@ -3798,7 +3778,6 @@ var SchemaGenerator = class _SchemaGenerator extends BaseGenerator {
3798
3778
  // src/components/Operation.tsx
3799
3779
  init_esm_shims();
3800
3780
  var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
3801
- import { createContext } from "@kubb/react";
3802
3781
  var OperationContext = createContext({});
3803
3782
  function Operation({ operation, children }) {
3804
3783
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OperationContext.Provider, { value: { operation }, children });
@@ -3807,13 +3786,11 @@ Operation.Context = OperationContext;
3807
3786
 
3808
3787
  // src/hooks/useSchema.ts
3809
3788
  init_esm_shims();
3810
- import { useContext } from "@kubb/react";
3811
3789
 
3812
3790
  // src/components/Schema.tsx
3813
3791
  init_esm_shims();
3814
- import { File, createContext as createContext2, useApp, useFile } from "@kubb/react";
3815
3792
  var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
3816
- var SchemaContext = createContext2({
3793
+ var SchemaContext = createContext({
3817
3794
  name: "unknown",
3818
3795
  tree: []
3819
3796
  });
@@ -3896,26 +3873,14 @@ function useSchema() {
3896
3873
 
3897
3874
  // src/components/Oas.tsx
3898
3875
  init_esm_shims();
3899
- import { createContext as createContext3 } from "@kubb/react";
3900
3876
  var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
3901
- var OasContext = createContext3({});
3877
+ var OasContext = createContext({});
3902
3878
  function Oas({ oas, children, operations, generator }) {
3903
3879
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(OasContext.Provider, { value: { oas, generator, operations }, children });
3904
3880
  }
3905
3881
  Oas.Context = OasContext;
3906
3882
  Oas.Operation = Operation;
3907
3883
  Oas.Schema = Schema;
3908
-
3909
- export {
3910
- schemaKeywords,
3911
- isKeyword,
3912
- SchemaGenerator,
3913
- require_jsx_runtime,
3914
- Operation,
3915
- useSchema,
3916
- Schema,
3917
- Oas
3918
- };
3919
3884
  /*! Bundled license information:
3920
3885
 
3921
3886
  react/cjs/react.production.min.js:
@@ -3962,4 +3927,7 @@ react/cjs/react-jsx-runtime.development.js:
3962
3927
  * LICENSE file in the root directory of this source tree.
3963
3928
  *)
3964
3929
  */
3965
- //# sourceMappingURL=chunk-M347763D.js.map
3930
+
3931
+ export { Oas, Operation, Schema, SchemaGenerator, isKeyword, require_jsx_runtime, schemaKeywords, useSchema };
3932
+ //# sourceMappingURL=chunk-2X5GZFQP.js.map
3933
+ //# sourceMappingURL=chunk-2X5GZFQP.js.map