plugin-build-visualization-block 0.1.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.
- package/client-v2.d.ts +2 -0
- package/client-v2.js +1 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/index.js +10 -0
- package/dist/client-v2/812.25692e474e296143.js +10 -0
- package/dist/client-v2/index.js +10 -0
- package/dist/externalVersion.js +24 -0
- package/dist/index.js +48 -0
- package/dist/locale/en-US.json +45 -0
- package/dist/locale/namespace.js +36 -0
- package/dist/locale/vi-VN.json +46 -0
- package/dist/locale/zh-CN.json +46 -0
- package/dist/node_modules/zod/LICENSE +21 -0
- package/dist/node_modules/zod/index.cjs +1 -0
- package/dist/node_modules/zod/index.d.cts +4 -0
- package/dist/node_modules/zod/index.d.ts +4 -0
- package/dist/node_modules/zod/index.js +4 -0
- package/dist/node_modules/zod/locales/index.cjs +17 -0
- package/dist/node_modules/zod/locales/index.d.cts +1 -0
- package/dist/node_modules/zod/locales/index.d.ts +1 -0
- package/dist/node_modules/zod/locales/index.js +1 -0
- package/dist/node_modules/zod/locales/package.json +6 -0
- package/dist/node_modules/zod/mini/index.cjs +17 -0
- package/dist/node_modules/zod/mini/index.d.cts +1 -0
- package/dist/node_modules/zod/mini/index.d.ts +1 -0
- package/dist/node_modules/zod/mini/index.js +1 -0
- package/dist/node_modules/zod/mini/package.json +6 -0
- package/dist/node_modules/zod/package.json +1 -0
- package/dist/node_modules/zod/src/index.ts +4 -0
- package/dist/node_modules/zod/src/locales/index.ts +1 -0
- package/dist/node_modules/zod/src/mini/index.ts +1 -0
- package/dist/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/dist/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/dist/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/dist/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/dist/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/dist/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/dist/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/dist/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/dist/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/dist/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/dist/node_modules/zod/src/v3/errors.ts +13 -0
- package/dist/node_modules/zod/src/v3/external.ts +6 -0
- package/dist/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/dist/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/dist/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/dist/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/dist/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/dist/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/dist/node_modules/zod/src/v3/index.ts +4 -0
- package/dist/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/dist/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/dist/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/dist/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/dist/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/dist/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/dist/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/dist/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/dist/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/dist/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/dist/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/dist/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/dist/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/dist/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
- package/dist/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/dist/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/dist/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/dist/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/dist/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/dist/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/dist/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/dist/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/dist/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/dist/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/dist/node_modules/zod/src/v3/tests/function.test.ts +261 -0
- package/dist/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/dist/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/dist/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/dist/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/dist/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/dist/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/dist/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/dist/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/dist/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/dist/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
- package/dist/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/dist/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/dist/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/dist/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/dist/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/dist/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/dist/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/dist/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/dist/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/dist/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/dist/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/dist/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/dist/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/dist/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/dist/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/dist/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/dist/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/dist/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/dist/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/dist/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/dist/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/dist/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/dist/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/dist/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/dist/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/dist/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/dist/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/dist/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/dist/node_modules/zod/src/v3/types.ts +5138 -0
- package/dist/node_modules/zod/src/v4/classic/checks.ts +32 -0
- package/dist/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/dist/node_modules/zod/src/v4/classic/compat.ts +70 -0
- package/dist/node_modules/zod/src/v4/classic/errors.ts +82 -0
- package/dist/node_modules/zod/src/v4/classic/external.ts +51 -0
- package/dist/node_modules/zod/src/v4/classic/from-json-schema.ts +643 -0
- package/dist/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/dist/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/dist/node_modules/zod/src/v4/classic/parse.ts +82 -0
- package/dist/node_modules/zod/src/v4/classic/schemas.ts +2409 -0
- package/dist/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/dist/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
- package/dist/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/dist/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
- package/dist/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/dist/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/dist/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/dist/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/dist/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
- package/dist/node_modules/zod/src/v4/classic/tests/catch.test.ts +276 -0
- package/dist/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/dist/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
- package/dist/node_modules/zod/src/v4/classic/tests/codec.test.ts +562 -0
- package/dist/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/dist/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
- package/dist/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/dist/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
- package/dist/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
- package/dist/node_modules/zod/src/v4/classic/tests/default.test.ts +365 -0
- package/dist/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/dist/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/dist/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +661 -0
- package/dist/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/dist/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +595 -0
- package/dist/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/dist/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
- package/dist/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
- package/dist/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/dist/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +734 -0
- package/dist/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
- package/dist/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/dist/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
- package/dist/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
- package/dist/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
- package/dist/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
- package/dist/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
- package/dist/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/dist/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
- package/dist/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
- package/dist/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/dist/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/dist/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
- package/dist/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/dist/node_modules/zod/src/v4/classic/tests/number.test.ts +270 -0
- package/dist/node_modules/zod/src/v4/classic/tests/object.test.ts +640 -0
- package/dist/node_modules/zod/src/v4/classic/tests/optional.test.ts +223 -0
- package/dist/node_modules/zod/src/v4/classic/tests/partial.test.ts +427 -0
- package/dist/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
- package/dist/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
- package/dist/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
- package/dist/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +282 -0
- package/dist/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/dist/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/dist/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/dist/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/dist/node_modules/zod/src/v4/classic/tests/record.test.ts +600 -0
- package/dist/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +582 -0
- package/dist/node_modules/zod/src/v4/classic/tests/refine.test.ts +570 -0
- package/dist/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
- package/dist/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
- package/dist/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
- package/dist/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
- package/dist/node_modules/zod/src/v4/classic/tests/string.test.ts +1175 -0
- package/dist/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
- package/dist/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
- package/dist/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/dist/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2975 -0
- package/dist/node_modules/zod/src/v4/classic/tests/transform.test.ts +361 -0
- package/dist/node_modules/zod/src/v4/classic/tests/tuple.test.ts +183 -0
- package/dist/node_modules/zod/src/v4/classic/tests/union.test.ts +219 -0
- package/dist/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/dist/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/dist/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/dist/node_modules/zod/src/v4/core/api.ts +1798 -0
- package/dist/node_modules/zod/src/v4/core/checks.ts +1293 -0
- package/dist/node_modules/zod/src/v4/core/config.ts +15 -0
- package/dist/node_modules/zod/src/v4/core/core.ts +138 -0
- package/dist/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/dist/node_modules/zod/src/v4/core/errors.ts +448 -0
- package/dist/node_modules/zod/src/v4/core/index.ts +16 -0
- package/dist/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
- package/dist/node_modules/zod/src/v4/core/json-schema-processors.ts +667 -0
- package/dist/node_modules/zod/src/v4/core/json-schema.ts +147 -0
- package/dist/node_modules/zod/src/v4/core/parse.ts +195 -0
- package/dist/node_modules/zod/src/v4/core/regexes.ts +183 -0
- package/dist/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/dist/node_modules/zod/src/v4/core/schemas.ts +4543 -0
- package/dist/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
- package/dist/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/dist/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +83 -0
- package/dist/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +67 -0
- package/dist/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/dist/node_modules/zod/src/v4/core/to-json-schema.ts +613 -0
- package/dist/node_modules/zod/src/v4/core/util.ts +966 -0
- package/dist/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/dist/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/dist/node_modules/zod/src/v4/index.ts +4 -0
- package/dist/node_modules/zod/src/v4/locales/ar.ts +115 -0
- package/dist/node_modules/zod/src/v4/locales/az.ts +111 -0
- package/dist/node_modules/zod/src/v4/locales/be.ts +176 -0
- package/dist/node_modules/zod/src/v4/locales/bg.ts +128 -0
- package/dist/node_modules/zod/src/v4/locales/ca.ts +116 -0
- package/dist/node_modules/zod/src/v4/locales/cs.ts +118 -0
- package/dist/node_modules/zod/src/v4/locales/da.ts +123 -0
- package/dist/node_modules/zod/src/v4/locales/de.ts +116 -0
- package/dist/node_modules/zod/src/v4/locales/en.ts +119 -0
- package/dist/node_modules/zod/src/v4/locales/eo.ts +118 -0
- package/dist/node_modules/zod/src/v4/locales/es.ts +141 -0
- package/dist/node_modules/zod/src/v4/locales/fa.ts +126 -0
- package/dist/node_modules/zod/src/v4/locales/fi.ts +121 -0
- package/dist/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
- package/dist/node_modules/zod/src/v4/locales/fr.ts +116 -0
- package/dist/node_modules/zod/src/v4/locales/he.ts +246 -0
- package/dist/node_modules/zod/src/v4/locales/hu.ts +117 -0
- package/dist/node_modules/zod/src/v4/locales/hy.ts +164 -0
- package/dist/node_modules/zod/src/v4/locales/id.ts +115 -0
- package/dist/node_modules/zod/src/v4/locales/index.ts +49 -0
- package/dist/node_modules/zod/src/v4/locales/is.ts +119 -0
- package/dist/node_modules/zod/src/v4/locales/it.ts +116 -0
- package/dist/node_modules/zod/src/v4/locales/ja.ts +114 -0
- package/dist/node_modules/zod/src/v4/locales/ka.ts +123 -0
- package/dist/node_modules/zod/src/v4/locales/kh.ts +7 -0
- package/dist/node_modules/zod/src/v4/locales/km.ts +119 -0
- package/dist/node_modules/zod/src/v4/locales/ko.ts +121 -0
- package/dist/node_modules/zod/src/v4/locales/lt.ts +239 -0
- package/dist/node_modules/zod/src/v4/locales/mk.ts +118 -0
- package/dist/node_modules/zod/src/v4/locales/ms.ts +115 -0
- package/dist/node_modules/zod/src/v4/locales/nl.ts +121 -0
- package/dist/node_modules/zod/src/v4/locales/no.ts +116 -0
- package/dist/node_modules/zod/src/v4/locales/ota.ts +117 -0
- package/dist/node_modules/zod/src/v4/locales/pl.ts +118 -0
- package/dist/node_modules/zod/src/v4/locales/ps.ts +126 -0
- package/dist/node_modules/zod/src/v4/locales/pt.ts +116 -0
- package/dist/node_modules/zod/src/v4/locales/ru.ts +176 -0
- package/dist/node_modules/zod/src/v4/locales/sl.ts +118 -0
- package/dist/node_modules/zod/src/v4/locales/sv.ts +119 -0
- package/dist/node_modules/zod/src/v4/locales/ta.ts +118 -0
- package/dist/node_modules/zod/src/v4/locales/th.ts +119 -0
- package/dist/node_modules/zod/src/v4/locales/tr.ts +111 -0
- package/dist/node_modules/zod/src/v4/locales/ua.ts +7 -0
- package/dist/node_modules/zod/src/v4/locales/uk.ts +117 -0
- package/dist/node_modules/zod/src/v4/locales/ur.ts +119 -0
- package/dist/node_modules/zod/src/v4/locales/uz.ts +116 -0
- package/dist/node_modules/zod/src/v4/locales/vi.ts +117 -0
- package/dist/node_modules/zod/src/v4/locales/yo.ts +124 -0
- package/dist/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
- package/dist/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
- package/dist/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/dist/node_modules/zod/src/v4/mini/coerce.ts +27 -0
- package/dist/node_modules/zod/src/v4/mini/external.ts +40 -0
- package/dist/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/dist/node_modules/zod/src/v4/mini/iso.ts +66 -0
- package/dist/node_modules/zod/src/v4/mini/parse.ts +14 -0
- package/dist/node_modules/zod/src/v4/mini/schemas.ts +1916 -0
- package/dist/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
- package/dist/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/dist/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
- package/dist/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/dist/node_modules/zod/src/v4/mini/tests/codec.test.ts +529 -0
- package/dist/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/dist/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/dist/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
- package/dist/node_modules/zod/src/v4/mini/tests/index.test.ts +963 -0
- package/dist/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/dist/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
- package/dist/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/dist/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
- package/dist/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/dist/node_modules/zod/src/v4/mini/tests/string.test.ts +347 -0
- package/dist/node_modules/zod/src/v4-mini/index.ts +1 -0
- package/dist/node_modules/zod/v3/ZodError.cjs +138 -0
- package/dist/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/dist/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/dist/node_modules/zod/v3/ZodError.js +133 -0
- package/dist/node_modules/zod/v3/errors.cjs +17 -0
- package/dist/node_modules/zod/v3/errors.d.cts +5 -0
- package/dist/node_modules/zod/v3/errors.d.ts +5 -0
- package/dist/node_modules/zod/v3/errors.js +9 -0
- package/dist/node_modules/zod/v3/external.cjs +22 -0
- package/dist/node_modules/zod/v3/external.d.cts +6 -0
- package/dist/node_modules/zod/v3/external.d.ts +6 -0
- package/dist/node_modules/zod/v3/external.js +6 -0
- package/dist/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/dist/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/dist/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/dist/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/dist/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/dist/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/dist/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/dist/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/dist/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/dist/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/dist/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/dist/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/dist/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/dist/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/dist/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/dist/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/dist/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/dist/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/dist/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/dist/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/dist/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/dist/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/dist/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/dist/node_modules/zod/v3/helpers/util.js +133 -0
- package/dist/node_modules/zod/v3/index.cjs +33 -0
- package/dist/node_modules/zod/v3/index.d.cts +4 -0
- package/dist/node_modules/zod/v3/index.d.ts +4 -0
- package/dist/node_modules/zod/v3/index.js +4 -0
- package/dist/node_modules/zod/v3/locales/en.cjs +112 -0
- package/dist/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/dist/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/dist/node_modules/zod/v3/locales/en.js +109 -0
- package/dist/node_modules/zod/v3/package.json +6 -0
- package/dist/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/dist/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/dist/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/dist/node_modules/zod/v3/standard-schema.js +1 -0
- package/dist/node_modules/zod/v3/types.cjs +3777 -0
- package/dist/node_modules/zod/v3/types.d.cts +1034 -0
- package/dist/node_modules/zod/v3/types.d.ts +1034 -0
- package/dist/node_modules/zod/v3/types.js +3695 -0
- package/dist/node_modules/zod/v4/classic/checks.cjs +33 -0
- package/dist/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/dist/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/dist/node_modules/zod/v4/classic/checks.js +1 -0
- package/dist/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/dist/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/dist/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/dist/node_modules/zod/v4/classic/coerce.js +17 -0
- package/dist/node_modules/zod/v4/classic/compat.cjs +61 -0
- package/dist/node_modules/zod/v4/classic/compat.d.cts +50 -0
- package/dist/node_modules/zod/v4/classic/compat.d.ts +50 -0
- package/dist/node_modules/zod/v4/classic/compat.js +31 -0
- package/dist/node_modules/zod/v4/classic/errors.cjs +74 -0
- package/dist/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/dist/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/dist/node_modules/zod/v4/classic/errors.js +48 -0
- package/dist/node_modules/zod/v4/classic/external.cjs +73 -0
- package/dist/node_modules/zod/v4/classic/external.d.cts +15 -0
- package/dist/node_modules/zod/v4/classic/external.d.ts +15 -0
- package/dist/node_modules/zod/v4/classic/external.js +20 -0
- package/dist/node_modules/zod/v4/classic/from-json-schema.cjs +610 -0
- package/dist/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/dist/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/dist/node_modules/zod/v4/classic/from-json-schema.js +584 -0
- package/dist/node_modules/zod/v4/classic/index.cjs +33 -0
- package/dist/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/dist/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/dist/node_modules/zod/v4/classic/index.js +4 -0
- package/dist/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/dist/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/dist/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/dist/node_modules/zod/v4/classic/iso.js +30 -0
- package/dist/node_modules/zod/v4/classic/package.json +6 -0
- package/dist/node_modules/zod/v4/classic/parse.cjs +41 -0
- package/dist/node_modules/zod/v4/classic/parse.d.cts +31 -0
- package/dist/node_modules/zod/v4/classic/parse.d.ts +31 -0
- package/dist/node_modules/zod/v4/classic/parse.js +15 -0
- package/dist/node_modules/zod/v4/classic/schemas.cjs +1272 -0
- package/dist/node_modules/zod/v4/classic/schemas.d.cts +739 -0
- package/dist/node_modules/zod/v4/classic/schemas.d.ts +739 -0
- package/dist/node_modules/zod/v4/classic/schemas.js +1157 -0
- package/dist/node_modules/zod/v4/core/api.cjs +1222 -0
- package/dist/node_modules/zod/v4/core/api.d.cts +304 -0
- package/dist/node_modules/zod/v4/core/api.d.ts +304 -0
- package/dist/node_modules/zod/v4/core/api.js +1082 -0
- package/dist/node_modules/zod/v4/core/checks.cjs +601 -0
- package/dist/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/dist/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/dist/node_modules/zod/v4/core/checks.js +575 -0
- package/dist/node_modules/zod/v4/core/core.cjs +83 -0
- package/dist/node_modules/zod/v4/core/core.d.cts +70 -0
- package/dist/node_modules/zod/v4/core/core.d.ts +70 -0
- package/dist/node_modules/zod/v4/core/core.js +76 -0
- package/dist/node_modules/zod/v4/core/doc.cjs +39 -0
- package/dist/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/dist/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/dist/node_modules/zod/v4/core/doc.js +35 -0
- package/dist/node_modules/zod/v4/core/errors.cjs +213 -0
- package/dist/node_modules/zod/v4/core/errors.d.cts +220 -0
- package/dist/node_modules/zod/v4/core/errors.d.ts +220 -0
- package/dist/node_modules/zod/v4/core/errors.js +182 -0
- package/dist/node_modules/zod/v4/core/index.cjs +47 -0
- package/dist/node_modules/zod/v4/core/index.d.cts +16 -0
- package/dist/node_modules/zod/v4/core/index.d.ts +16 -0
- package/dist/node_modules/zod/v4/core/index.js +16 -0
- package/dist/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
- package/dist/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/dist/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/dist/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.cjs +648 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +605 -0
- package/dist/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/dist/node_modules/zod/v4/core/json-schema.d.cts +88 -0
- package/dist/node_modules/zod/v4/core/json-schema.d.ts +88 -0
- package/dist/node_modules/zod/v4/core/json-schema.js +1 -0
- package/dist/node_modules/zod/v4/core/package.json +6 -0
- package/dist/node_modules/zod/v4/core/parse.cjs +131 -0
- package/dist/node_modules/zod/v4/core/parse.d.cts +49 -0
- package/dist/node_modules/zod/v4/core/parse.d.ts +49 -0
- package/dist/node_modules/zod/v4/core/parse.js +93 -0
- package/dist/node_modules/zod/v4/core/regexes.cjs +166 -0
- package/dist/node_modules/zod/v4/core/regexes.d.cts +79 -0
- package/dist/node_modules/zod/v4/core/regexes.d.ts +79 -0
- package/dist/node_modules/zod/v4/core/regexes.js +133 -0
- package/dist/node_modules/zod/v4/core/registries.cjs +56 -0
- package/dist/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/dist/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/dist/node_modules/zod/v4/core/registries.js +51 -0
- package/dist/node_modules/zod/v4/core/schemas.cjs +2126 -0
- package/dist/node_modules/zod/v4/core/schemas.d.cts +1146 -0
- package/dist/node_modules/zod/v4/core/schemas.d.ts +1146 -0
- package/dist/node_modules/zod/v4/core/schemas.js +2095 -0
- package/dist/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/dist/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
- package/dist/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
- package/dist/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.cjs +446 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.js +437 -0
- package/dist/node_modules/zod/v4/core/util.cjs +710 -0
- package/dist/node_modules/zod/v4/core/util.d.cts +199 -0
- package/dist/node_modules/zod/v4/core/util.d.ts +199 -0
- package/dist/node_modules/zod/v4/core/util.js +651 -0
- package/dist/node_modules/zod/v4/core/versions.cjs +8 -0
- package/dist/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/dist/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/dist/node_modules/zod/v4/core/versions.js +5 -0
- package/dist/node_modules/zod/v4/index.cjs +22 -0
- package/dist/node_modules/zod/v4/index.d.cts +3 -0
- package/dist/node_modules/zod/v4/index.d.ts +3 -0
- package/dist/node_modules/zod/v4/index.js +3 -0
- package/dist/node_modules/zod/v4/locales/ar.cjs +133 -0
- package/dist/node_modules/zod/v4/locales/ar.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ar.js +106 -0
- package/dist/node_modules/zod/v4/locales/az.cjs +132 -0
- package/dist/node_modules/zod/v4/locales/az.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/az.js +105 -0
- package/dist/node_modules/zod/v4/locales/be.cjs +183 -0
- package/dist/node_modules/zod/v4/locales/be.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/be.js +156 -0
- package/dist/node_modules/zod/v4/locales/bg.cjs +147 -0
- package/dist/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/bg.js +120 -0
- package/dist/node_modules/zod/v4/locales/ca.cjs +134 -0
- package/dist/node_modules/zod/v4/locales/ca.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ca.js +107 -0
- package/dist/node_modules/zod/v4/locales/cs.cjs +138 -0
- package/dist/node_modules/zod/v4/locales/cs.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/cs.js +111 -0
- package/dist/node_modules/zod/v4/locales/da.cjs +142 -0
- package/dist/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/da.js +115 -0
- package/dist/node_modules/zod/v4/locales/de.cjs +135 -0
- package/dist/node_modules/zod/v4/locales/de.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/de.js +108 -0
- package/dist/node_modules/zod/v4/locales/en.cjs +136 -0
- package/dist/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/en.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/en.js +109 -0
- package/dist/node_modules/zod/v4/locales/eo.cjs +136 -0
- package/dist/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/eo.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/eo.js +109 -0
- package/dist/node_modules/zod/v4/locales/es.cjs +159 -0
- package/dist/node_modules/zod/v4/locales/es.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/es.js +132 -0
- package/dist/node_modules/zod/v4/locales/fa.cjs +141 -0
- package/dist/node_modules/zod/v4/locales/fa.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/fa.js +114 -0
- package/dist/node_modules/zod/v4/locales/fi.cjs +139 -0
- package/dist/node_modules/zod/v4/locales/fi.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/fi.js +112 -0
- package/dist/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
- package/dist/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/fr-CA.js +107 -0
- package/dist/node_modules/zod/v4/locales/fr.cjs +135 -0
- package/dist/node_modules/zod/v4/locales/fr.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/fr.js +108 -0
- package/dist/node_modules/zod/v4/locales/he.cjs +241 -0
- package/dist/node_modules/zod/v4/locales/he.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/he.js +214 -0
- package/dist/node_modules/zod/v4/locales/hu.cjs +135 -0
- package/dist/node_modules/zod/v4/locales/hu.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/hu.js +108 -0
- package/dist/node_modules/zod/v4/locales/hy.cjs +174 -0
- package/dist/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/hy.js +147 -0
- package/dist/node_modules/zod/v4/locales/id.cjs +133 -0
- package/dist/node_modules/zod/v4/locales/id.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/id.js +106 -0
- package/dist/node_modules/zod/v4/locales/index.cjs +104 -0
- package/dist/node_modules/zod/v4/locales/index.d.cts +49 -0
- package/dist/node_modules/zod/v4/locales/index.d.ts +49 -0
- package/dist/node_modules/zod/v4/locales/index.js +49 -0
- package/dist/node_modules/zod/v4/locales/is.cjs +136 -0
- package/dist/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/is.js +109 -0
- package/dist/node_modules/zod/v4/locales/it.cjs +135 -0
- package/dist/node_modules/zod/v4/locales/it.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/it.js +108 -0
- package/dist/node_modules/zod/v4/locales/ja.cjs +134 -0
- package/dist/node_modules/zod/v4/locales/ja.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ja.js +107 -0
- package/dist/node_modules/zod/v4/locales/ka.cjs +139 -0
- package/dist/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ka.js +112 -0
- package/dist/node_modules/zod/v4/locales/kh.cjs +12 -0
- package/dist/node_modules/zod/v4/locales/kh.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/kh.d.ts +5 -0
- package/dist/node_modules/zod/v4/locales/kh.js +5 -0
- package/dist/node_modules/zod/v4/locales/km.cjs +137 -0
- package/dist/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/km.js +110 -0
- package/dist/node_modules/zod/v4/locales/ko.cjs +138 -0
- package/dist/node_modules/zod/v4/locales/ko.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ko.js +111 -0
- package/dist/node_modules/zod/v4/locales/lt.cjs +230 -0
- package/dist/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/lt.js +203 -0
- package/dist/node_modules/zod/v4/locales/mk.cjs +136 -0
- package/dist/node_modules/zod/v4/locales/mk.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/mk.js +109 -0
- package/dist/node_modules/zod/v4/locales/ms.cjs +134 -0
- package/dist/node_modules/zod/v4/locales/ms.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ms.js +107 -0
- package/dist/node_modules/zod/v4/locales/nl.cjs +137 -0
- package/dist/node_modules/zod/v4/locales/nl.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/nl.js +110 -0
- package/dist/node_modules/zod/v4/locales/no.cjs +135 -0
- package/dist/node_modules/zod/v4/locales/no.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/no.js +108 -0
- package/dist/node_modules/zod/v4/locales/ota.cjs +136 -0
- package/dist/node_modules/zod/v4/locales/ota.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ota.js +109 -0
- package/dist/node_modules/zod/v4/locales/package.json +6 -0
- package/dist/node_modules/zod/v4/locales/pl.cjs +136 -0
- package/dist/node_modules/zod/v4/locales/pl.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/pl.js +109 -0
- package/dist/node_modules/zod/v4/locales/ps.cjs +141 -0
- package/dist/node_modules/zod/v4/locales/ps.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ps.js +114 -0
- package/dist/node_modules/zod/v4/locales/pt.cjs +135 -0
- package/dist/node_modules/zod/v4/locales/pt.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/pt.js +108 -0
- package/dist/node_modules/zod/v4/locales/ru.cjs +183 -0
- package/dist/node_modules/zod/v4/locales/ru.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ru.js +156 -0
- package/dist/node_modules/zod/v4/locales/sl.cjs +136 -0
- package/dist/node_modules/zod/v4/locales/sl.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/sl.js +109 -0
- package/dist/node_modules/zod/v4/locales/sv.cjs +137 -0
- package/dist/node_modules/zod/v4/locales/sv.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/sv.js +110 -0
- package/dist/node_modules/zod/v4/locales/ta.cjs +137 -0
- package/dist/node_modules/zod/v4/locales/ta.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ta.js +110 -0
- package/dist/node_modules/zod/v4/locales/th.cjs +137 -0
- package/dist/node_modules/zod/v4/locales/th.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/th.js +110 -0
- package/dist/node_modules/zod/v4/locales/tr.cjs +132 -0
- package/dist/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/tr.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/tr.js +105 -0
- package/dist/node_modules/zod/v4/locales/ua.cjs +12 -0
- package/dist/node_modules/zod/v4/locales/ua.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ua.d.ts +5 -0
- package/dist/node_modules/zod/v4/locales/ua.js +5 -0
- package/dist/node_modules/zod/v4/locales/uk.cjs +135 -0
- package/dist/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/uk.js +108 -0
- package/dist/node_modules/zod/v4/locales/ur.cjs +137 -0
- package/dist/node_modules/zod/v4/locales/ur.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ur.js +110 -0
- package/dist/node_modules/zod/v4/locales/uz.cjs +136 -0
- package/dist/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/uz.js +109 -0
- package/dist/node_modules/zod/v4/locales/vi.cjs +135 -0
- package/dist/node_modules/zod/v4/locales/vi.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/vi.js +108 -0
- package/dist/node_modules/zod/v4/locales/yo.cjs +134 -0
- package/dist/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/yo.js +107 -0
- package/dist/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
- package/dist/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/zh-CN.js +109 -0
- package/dist/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
- package/dist/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/zh-TW.js +107 -0
- package/dist/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/dist/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/dist/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/dist/node_modules/zod/v4/mini/checks.js +1 -0
- package/dist/node_modules/zod/v4/mini/coerce.cjs +52 -0
- package/dist/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/dist/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/dist/node_modules/zod/v4/mini/coerce.js +22 -0
- package/dist/node_modules/zod/v4/mini/external.cjs +63 -0
- package/dist/node_modules/zod/v4/mini/external.d.cts +12 -0
- package/dist/node_modules/zod/v4/mini/external.d.ts +12 -0
- package/dist/node_modules/zod/v4/mini/external.js +14 -0
- package/dist/node_modules/zod/v4/mini/index.cjs +32 -0
- package/dist/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/dist/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/dist/node_modules/zod/v4/mini/index.js +3 -0
- package/dist/node_modules/zod/v4/mini/iso.cjs +64 -0
- package/dist/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/dist/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/dist/node_modules/zod/v4/mini/iso.js +34 -0
- package/dist/node_modules/zod/v4/mini/package.json +6 -0
- package/dist/node_modules/zod/v4/mini/parse.cjs +16 -0
- package/dist/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/dist/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/dist/node_modules/zod/v4/mini/parse.js +1 -0
- package/dist/node_modules/zod/v4/mini/schemas.cjs +1046 -0
- package/dist/node_modules/zod/v4/mini/schemas.d.cts +427 -0
- package/dist/node_modules/zod/v4/mini/schemas.d.ts +427 -0
- package/dist/node_modules/zod/v4/mini/schemas.js +925 -0
- package/dist/node_modules/zod/v4/package.json +6 -0
- package/dist/node_modules/zod/v4-mini/index.cjs +17 -0
- package/dist/node_modules/zod/v4-mini/index.d.cts +1 -0
- package/dist/node_modules/zod/v4-mini/index.d.ts +1 -0
- package/dist/node_modules/zod/v4-mini/index.js +1 -0
- package/dist/node_modules/zod/v4-mini/package.json +6 -0
- package/dist/server/actions/build.js +915 -0
- package/dist/server/collections/ai-visualization-build-settings.js +68 -0
- package/dist/server/collections/ai-visualization-builds.js +143 -0
- package/dist/server/index.js +48 -0
- package/dist/server/pipeline/analyzer.js +220 -0
- package/dist/server/pipeline/fallback.js +113 -0
- package/dist/server/pipeline/generator.js +386 -0
- package/dist/server/pipeline/introspector.js +118 -0
- package/dist/server/pipeline/validator.js +323 -0
- package/dist/server/plugin.js +210 -0
- package/dist/server/resource/settings.js +106 -0
- package/dist/server/tools/build-visualization-block.js +130 -0
- package/dist/server/tools/index.js +46 -0
- package/dist/shared/blockSpec.js +76 -0
- package/dist/shared/constants.js +67 -0
- package/package.json +44 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
- package/src/client/BuildForm.tsx +376 -0
- package/src/client/BuildVisualizationBlockInitializer.tsx +81 -0
- package/src/client/PreviewPanel.tsx +136 -0
- package/src/client/SettingsPage.tsx +138 -0
- package/src/client/components/BuildPhaseTag.tsx +62 -0
- package/src/client/components/CollectionMultiSelect.tsx +124 -0
- package/src/client/components/LLMServiceSelect.tsx +108 -0
- package/src/client/components/ModelSelect.tsx +105 -0
- package/src/client/components/index.ts +8 -0
- package/src/client/hooks/useBuildPolling.ts +215 -0
- package/src/client/index.tsx +2 -0
- package/src/client/locale.ts +18 -0
- package/src/client/plugin.tsx +90 -0
- package/src/client-v2/index.tsx +1 -0
- package/src/client-v2/plugin.tsx +24 -0
- package/src/index.ts +2 -0
- package/src/locale/en-US.json +45 -0
- package/src/locale/namespace.ts +6 -0
- package/src/locale/vi-VN.json +46 -0
- package/src/locale/zh-CN.json +46 -0
- package/src/server/__tests__/build-action.test.ts +440 -0
- package/src/server/__tests__/plugin.test.ts +187 -0
- package/src/server/actions/build.ts +1318 -0
- package/src/server/collections/ai-visualization-build-settings.ts +43 -0
- package/src/server/collections/ai-visualization-builds.ts +122 -0
- package/src/server/index.ts +2 -0
- package/src/server/pipeline/__tests__/analyzer.test.ts +226 -0
- package/src/server/pipeline/__tests__/generator.test.ts +576 -0
- package/src/server/pipeline/__tests__/introspector.test.ts +268 -0
- package/src/server/pipeline/__tests__/validator.test.ts +517 -0
- package/src/server/pipeline/analyzer.ts +368 -0
- package/src/server/pipeline/fallback.ts +157 -0
- package/src/server/pipeline/generator.ts +651 -0
- package/src/server/pipeline/introspector.ts +206 -0
- package/src/server/pipeline/validator.ts +609 -0
- package/src/server/plugin.ts +255 -0
- package/src/server/resource/settings.ts +97 -0
- package/src/server/tools/build-visualization-block.ts +173 -0
- package/src/server/tools/index.ts +1 -0
- package/src/shared/blockSpec.ts +214 -0
- package/src/shared/constants.ts +46 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { createForm } from '@formily/core';
|
|
2
|
+
import { Field, FormProvider } from '@formily/react';
|
|
3
|
+
import { useAPIClient } from '@nocobase/client';
|
|
4
|
+
import { Alert, App, Button, Card, Form, Space, Switch } from 'antd';
|
|
5
|
+
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
6
|
+
|
|
7
|
+
import { CollectionMultiSelect, CollectionMultiSelectValue, LLMServiceSelect, ModelSelect } from './components';
|
|
8
|
+
import { useT } from './locale';
|
|
9
|
+
import { SETTINGS_COLLECTION_NAME } from '../shared/constants';
|
|
10
|
+
|
|
11
|
+
interface SettingsValues {
|
|
12
|
+
defaultDataSource?: string | null;
|
|
13
|
+
defaultCollections?: string[];
|
|
14
|
+
defaultLLMService?: string | null;
|
|
15
|
+
defaultModel?: string | null;
|
|
16
|
+
enableAITool?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function normalizeSettings(value: unknown): SettingsValues {
|
|
20
|
+
const source = value && typeof value === 'object' ? (value as Record<string, unknown>) : {};
|
|
21
|
+
return {
|
|
22
|
+
defaultDataSource: typeof source.defaultDataSource === 'string' ? source.defaultDataSource : undefined,
|
|
23
|
+
defaultCollections: Array.isArray(source.defaultCollections)
|
|
24
|
+
? source.defaultCollections.filter((item): item is string => typeof item === 'string')
|
|
25
|
+
: [],
|
|
26
|
+
defaultLLMService: typeof source.defaultLLMService === 'string' ? source.defaultLLMService : undefined,
|
|
27
|
+
defaultModel: typeof source.defaultModel === 'string' ? source.defaultModel : undefined,
|
|
28
|
+
enableAITool: source.enableAITool !== false,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function readStringValue(values: unknown, key: string): string | undefined {
|
|
33
|
+
if (!values || typeof values !== 'object') {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
const value = (values as Record<string, unknown>)[key];
|
|
37
|
+
return typeof value === 'string' && value.trim() ? value.trim() : undefined;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const SettingsPage: React.FC = () => {
|
|
41
|
+
const api = useAPIClient();
|
|
42
|
+
const { message } = App.useApp();
|
|
43
|
+
const t = useT();
|
|
44
|
+
const form = useMemo(() => createForm(), []);
|
|
45
|
+
const [collectionValue, setCollectionValue] = useState<CollectionMultiSelectValue>({ collections: [] });
|
|
46
|
+
const [enableAITool, setEnableAITool] = useState(true);
|
|
47
|
+
const [loading, setLoading] = useState(true);
|
|
48
|
+
const [saving, setSaving] = useState(false);
|
|
49
|
+
const [loadFailed, setLoadFailed] = useState(false);
|
|
50
|
+
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
let active = true;
|
|
53
|
+
|
|
54
|
+
const loadSettings = async () => {
|
|
55
|
+
setLoading(true);
|
|
56
|
+
setLoadFailed(false);
|
|
57
|
+
try {
|
|
58
|
+
const response = await api.resource(SETTINGS_COLLECTION_NAME).publicGet();
|
|
59
|
+
if (!active) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const settings = normalizeSettings((response as { data?: { data?: unknown } }).data?.data);
|
|
63
|
+
setCollectionValue({
|
|
64
|
+
dataSource: settings.defaultDataSource ?? undefined,
|
|
65
|
+
collections: settings.defaultCollections ?? [],
|
|
66
|
+
});
|
|
67
|
+
form.setValues({
|
|
68
|
+
llmService: settings.defaultLLMService,
|
|
69
|
+
model: settings.defaultModel,
|
|
70
|
+
});
|
|
71
|
+
setEnableAITool(settings.enableAITool !== false);
|
|
72
|
+
} catch (error) {
|
|
73
|
+
if (!active) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
console.error('[plugin-build-visualization-block] Failed to load settings:', error);
|
|
77
|
+
setLoadFailed(true);
|
|
78
|
+
} finally {
|
|
79
|
+
if (active) {
|
|
80
|
+
setLoading(false);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
loadSettings();
|
|
86
|
+
return () => {
|
|
87
|
+
active = false;
|
|
88
|
+
};
|
|
89
|
+
}, [api, form]);
|
|
90
|
+
|
|
91
|
+
const handleSave = useCallback(async () => {
|
|
92
|
+
setSaving(true);
|
|
93
|
+
try {
|
|
94
|
+
await api.resource(SETTINGS_COLLECTION_NAME).update({
|
|
95
|
+
filterByTk: 1,
|
|
96
|
+
values: {
|
|
97
|
+
defaultDataSource: collectionValue.dataSource,
|
|
98
|
+
defaultCollections: collectionValue.collections ?? [],
|
|
99
|
+
defaultLLMService: readStringValue(form.values, 'llmService'),
|
|
100
|
+
defaultModel: readStringValue(form.values, 'model'),
|
|
101
|
+
enableAITool,
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
message.success(t('Saved successfully'));
|
|
105
|
+
} finally {
|
|
106
|
+
setSaving(false);
|
|
107
|
+
}
|
|
108
|
+
}, [api, collectionValue, enableAITool, form, message, t]);
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<Card loading={loading}>
|
|
112
|
+
<Space direction="vertical" size="middle" style={{ width: '100%', maxWidth: 720 }}>
|
|
113
|
+
{loadFailed ? <Alert type="error" showIcon message={t('Failed to load the list')} /> : null}
|
|
114
|
+
<Form layout="vertical">
|
|
115
|
+
<Form.Item label={t('Default collections')}>
|
|
116
|
+
<CollectionMultiSelect value={collectionValue} onChange={setCollectionValue} />
|
|
117
|
+
</Form.Item>
|
|
118
|
+
<FormProvider form={form}>
|
|
119
|
+
<Form.Item label={t('Default AI service')}>
|
|
120
|
+
<Field name="llmService" component={[LLMServiceSelect, { style: { width: '100%' } }]} />
|
|
121
|
+
</Form.Item>
|
|
122
|
+
<Form.Item label={t('Default model')}>
|
|
123
|
+
<Field name="model" component={[ModelSelect, { style: { width: '100%' } }]} />
|
|
124
|
+
</Form.Item>
|
|
125
|
+
</FormProvider>
|
|
126
|
+
<Form.Item label={t('Enable AI tool')}>
|
|
127
|
+
<Switch checked={enableAITool} onChange={setEnableAITool} />
|
|
128
|
+
</Form.Item>
|
|
129
|
+
<Button type="primary" loading={saving} onClick={handleSave}>
|
|
130
|
+
{t('Save')}
|
|
131
|
+
</Button>
|
|
132
|
+
</Form>
|
|
133
|
+
</Space>
|
|
134
|
+
</Card>
|
|
135
|
+
);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
export default SettingsPage;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Tag } from 'antd';
|
|
3
|
+
import { useField } from '@formily/react';
|
|
4
|
+
import { isField } from '@formily/core';
|
|
5
|
+
import { BuildPhase } from '../../shared/constants';
|
|
6
|
+
import { useT } from '../locale';
|
|
7
|
+
|
|
8
|
+
/** Ant Design Tag colors for each build phase. */
|
|
9
|
+
const PHASE_COLORS: Record<BuildPhase, string> = {
|
|
10
|
+
idle: 'default',
|
|
11
|
+
queued: 'default',
|
|
12
|
+
analyzing: 'processing',
|
|
13
|
+
generating: 'processing',
|
|
14
|
+
completed: 'success',
|
|
15
|
+
failed: 'error',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** Localization keys for each build phase label. */
|
|
19
|
+
const PHASE_LABELS: Record<BuildPhase, string> = {
|
|
20
|
+
idle: 'Idle',
|
|
21
|
+
queued: 'Queued',
|
|
22
|
+
analyzing: 'Analyzing',
|
|
23
|
+
generating: 'Generating',
|
|
24
|
+
completed: 'Completed',
|
|
25
|
+
failed: 'Failed',
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const PHASES = Object.keys(PHASE_COLORS) as BuildPhase[];
|
|
29
|
+
|
|
30
|
+
function isBuildPhase(value: unknown): value is BuildPhase {
|
|
31
|
+
return typeof value === 'string' && (PHASES as string[]).includes(value);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface BuildPhaseTagProps {
|
|
35
|
+
/**
|
|
36
|
+
* The phase to render. When omitted, the value is read from the surrounding
|
|
37
|
+
* Formily field, allowing the tag to be used as a read-pretty field
|
|
38
|
+
* component as well as a plain presentational tag.
|
|
39
|
+
*/
|
|
40
|
+
value?: BuildPhase;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* A small Ant Design `Tag` that renders a build phase with a phase-specific
|
|
45
|
+
* color and a localized label.
|
|
46
|
+
*/
|
|
47
|
+
export const BuildPhaseTag = (props: BuildPhaseTagProps) => {
|
|
48
|
+
const t = useT();
|
|
49
|
+
const field = useField();
|
|
50
|
+
const fieldValue = isField(field) ? field.value : undefined;
|
|
51
|
+
const phase = props.value ?? fieldValue;
|
|
52
|
+
|
|
53
|
+
if (!isBuildPhase(phase)) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<Tag color={PHASE_COLORS[phase]} aria-label={t(PHASE_LABELS[phase])}>
|
|
59
|
+
{t(PHASE_LABELS[phase])}
|
|
60
|
+
</Tag>
|
|
61
|
+
);
|
|
62
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import React, { useCallback, useMemo } from 'react';
|
|
2
|
+
import { Select, Space, Typography } from 'antd';
|
|
3
|
+
import { useACLRoleContext, useCompile, useDataSourceManager, DEFAULT_DATA_SOURCE_KEY } from '@nocobase/client';
|
|
4
|
+
import { MAX_COLLECTIONS } from '../../shared/constants';
|
|
5
|
+
import { useT } from '../locale';
|
|
6
|
+
|
|
7
|
+
interface SelectOption {
|
|
8
|
+
label: string;
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The combined value managed by {@link CollectionMultiSelect}: the chosen data
|
|
14
|
+
* source key plus the selected collection names within it.
|
|
15
|
+
*/
|
|
16
|
+
export interface CollectionMultiSelectValue {
|
|
17
|
+
dataSource?: string;
|
|
18
|
+
collections?: string[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface CollectionMultiSelectProps {
|
|
22
|
+
/** Current value (supplied by Formily's field decorator or a parent). */
|
|
23
|
+
value?: CollectionMultiSelectValue;
|
|
24
|
+
/** Change handler (supplied by Formily's field decorator or a parent). */
|
|
25
|
+
onChange?: (value: CollectionMultiSelectValue) => void;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Two linked selects: a data source picker (Req 1.1) and a multiple-collection
|
|
31
|
+
* picker scoped to the chosen data source. The collection list is filtered to
|
|
32
|
+
* collections the current user can `list` (Req 1.2, 1.5), and the selection is
|
|
33
|
+
* capped at {@link MAX_COLLECTIONS}. Changing the data source clears the
|
|
34
|
+
* previously selected collections.
|
|
35
|
+
*/
|
|
36
|
+
export const CollectionMultiSelect = (props: CollectionMultiSelectProps) => {
|
|
37
|
+
const { value, onChange, disabled } = props;
|
|
38
|
+
const t = useT();
|
|
39
|
+
const compile = useCompile();
|
|
40
|
+
const dataSourceManager = useDataSourceManager();
|
|
41
|
+
const { parseAction } = useACLRoleContext();
|
|
42
|
+
|
|
43
|
+
const dataSourceKey = value?.dataSource;
|
|
44
|
+
const selectedCollections = value?.collections ?? [];
|
|
45
|
+
|
|
46
|
+
const dataSourceOptions = useMemo<SelectOption[]>(() => {
|
|
47
|
+
const dataSources = dataSourceManager?.getDataSources() ?? [];
|
|
48
|
+
return dataSources.map((dataSource) => ({
|
|
49
|
+
label: compile(dataSource.displayName) || dataSource.key,
|
|
50
|
+
value: dataSource.key,
|
|
51
|
+
}));
|
|
52
|
+
}, [dataSourceManager, compile]);
|
|
53
|
+
|
|
54
|
+
const canList = useCallback(
|
|
55
|
+
(collectionName: string) => Boolean(parseAction(`${collectionName}:list`)),
|
|
56
|
+
[parseAction],
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
const collectionOptions = useMemo<SelectOption[]>(() => {
|
|
60
|
+
if (!dataSourceKey) {
|
|
61
|
+
return [];
|
|
62
|
+
}
|
|
63
|
+
const dataSource = dataSourceManager?.getDataSource(dataSourceKey);
|
|
64
|
+
const collections = dataSource?.collectionManager?.getCollections() ?? [];
|
|
65
|
+
return collections
|
|
66
|
+
.filter((collection) => canList(collection.name))
|
|
67
|
+
.map((collection) => ({
|
|
68
|
+
label: compile(collection.title) || collection.name,
|
|
69
|
+
value: collection.name,
|
|
70
|
+
}));
|
|
71
|
+
}, [dataSourceManager, dataSourceKey, compile, canList]);
|
|
72
|
+
|
|
73
|
+
const handleDataSourceChange = useCallback(
|
|
74
|
+
(nextDataSource: string) => {
|
|
75
|
+
// Switching data source invalidates any previously selected collections.
|
|
76
|
+
onChange?.({ dataSource: nextDataSource, collections: [] });
|
|
77
|
+
},
|
|
78
|
+
[onChange],
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
const handleCollectionsChange = useCallback(
|
|
82
|
+
(nextCollections: string[]) => {
|
|
83
|
+
// Enforce the upper bound (Req 1.3) regardless of how many were picked.
|
|
84
|
+
const capped = nextCollections.slice(0, MAX_COLLECTIONS);
|
|
85
|
+
onChange?.({ dataSource: dataSourceKey, collections: capped });
|
|
86
|
+
},
|
|
87
|
+
[onChange, dataSourceKey],
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
const atLimit = selectedCollections.length >= MAX_COLLECTIONS;
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<Space direction="vertical" style={{ width: '100%' }} size="small">
|
|
94
|
+
<Select<string>
|
|
95
|
+
aria-label={t('Data source')}
|
|
96
|
+
placeholder={t('Data source')}
|
|
97
|
+
style={{ width: '100%' }}
|
|
98
|
+
options={dataSourceOptions}
|
|
99
|
+
value={dataSourceKey ?? (dataSourceOptions.length ? undefined : DEFAULT_DATA_SOURCE_KEY)}
|
|
100
|
+
onChange={handleDataSourceChange}
|
|
101
|
+
disabled={disabled}
|
|
102
|
+
showSearch
|
|
103
|
+
optionFilterProp="label"
|
|
104
|
+
/>
|
|
105
|
+
<Select<string[]>
|
|
106
|
+
aria-label={t('Collections')}
|
|
107
|
+
placeholder={t('Collections')}
|
|
108
|
+
style={{ width: '100%' }}
|
|
109
|
+
mode="multiple"
|
|
110
|
+
options={collectionOptions}
|
|
111
|
+
value={selectedCollections}
|
|
112
|
+
onChange={handleCollectionsChange}
|
|
113
|
+
disabled={disabled || !dataSourceKey}
|
|
114
|
+
showSearch
|
|
115
|
+
optionFilterProp="label"
|
|
116
|
+
/>
|
|
117
|
+
{atLimit ? (
|
|
118
|
+
<Typography.Text type="warning">
|
|
119
|
+
{t('You can select at most {{max}} collections', { max: MAX_COLLECTIONS })}
|
|
120
|
+
</Typography.Text>
|
|
121
|
+
) : null}
|
|
122
|
+
</Space>
|
|
123
|
+
);
|
|
124
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
2
|
+
import { useAPIClient } from '@nocobase/client';
|
|
3
|
+
import { Select, SelectProps } from 'antd';
|
|
4
|
+
import { useField } from '@formily/react';
|
|
5
|
+
import { Field, isField } from '@formily/core';
|
|
6
|
+
import { useT } from '../locale';
|
|
7
|
+
|
|
8
|
+
interface SelectOption {
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Shape of a single LLM service record returned by `ai:listLLMServices`.
|
|
15
|
+
* Only the fields this component relies on are declared; everything else is
|
|
16
|
+
* ignored.
|
|
17
|
+
*/
|
|
18
|
+
interface LLMServiceRecord {
|
|
19
|
+
name?: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Pull the `{ data: { data: [...] } }` list payload out of an API response
|
|
25
|
+
* without resorting to `any`. Unknown shapes degrade to an empty list.
|
|
26
|
+
*/
|
|
27
|
+
function normalizeRecords(response: unknown): LLMServiceRecord[] {
|
|
28
|
+
const data = (response as { data?: { data?: unknown } } | undefined)?.data?.data;
|
|
29
|
+
return Array.isArray(data) ? (data as LLMServiceRecord[]) : [];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type LLMServiceSelectProps = Omit<SelectProps<string>, 'options' | 'loading' | 'value' | 'onChange'>;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Formily-aware Select that loads the available LLM services from the AI
|
|
36
|
+
* plugin (`ai:listLLMServices`). Selecting a service clears the sibling
|
|
37
|
+
* `model` field so a stale model is never submitted with a new service.
|
|
38
|
+
*
|
|
39
|
+
* - Req 4.1: loads services from `api.resource('ai').listLLMServices()`.
|
|
40
|
+
* - Req 4.5: surfaces a load failure as an error state (empty option list +
|
|
41
|
+
* a status message) rather than throwing.
|
|
42
|
+
* - Req 4.6: clears the sibling `model` field on change.
|
|
43
|
+
*/
|
|
44
|
+
export const LLMServiceSelect = (props: LLMServiceSelectProps) => {
|
|
45
|
+
const t = useT();
|
|
46
|
+
const api = useAPIClient();
|
|
47
|
+
const field = useField<Field>();
|
|
48
|
+
const [options, setOptions] = useState<SelectOption[]>([]);
|
|
49
|
+
const [loading, setLoading] = useState(false);
|
|
50
|
+
const [hasError, setHasError] = useState(false);
|
|
51
|
+
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
let active = true;
|
|
54
|
+
const loadServices = async () => {
|
|
55
|
+
setLoading(true);
|
|
56
|
+
setHasError(false);
|
|
57
|
+
try {
|
|
58
|
+
const res: unknown = await api.resource('ai').listLLMServices();
|
|
59
|
+
if (!active) return;
|
|
60
|
+
const next = normalizeRecords(res)
|
|
61
|
+
.filter((item): item is LLMServiceRecord & { name: string } => Boolean(item.name))
|
|
62
|
+
.map<SelectOption>((item) => ({
|
|
63
|
+
label: item.title || item.name,
|
|
64
|
+
value: item.name,
|
|
65
|
+
}));
|
|
66
|
+
setOptions(next);
|
|
67
|
+
} catch (err: unknown) {
|
|
68
|
+
if (!active) return;
|
|
69
|
+
console.error('Failed to load LLM services:', err);
|
|
70
|
+
setOptions([]);
|
|
71
|
+
setHasError(true);
|
|
72
|
+
} finally {
|
|
73
|
+
if (active) setLoading(false);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
loadServices();
|
|
77
|
+
return () => {
|
|
78
|
+
active = false;
|
|
79
|
+
};
|
|
80
|
+
}, [api]);
|
|
81
|
+
|
|
82
|
+
const handleChange = useCallback(
|
|
83
|
+
(value: string) => {
|
|
84
|
+
field.setValue(value);
|
|
85
|
+
// Reset the sibling model field whenever the service changes (Req 4.6).
|
|
86
|
+
const sibling = field.query('.model').take();
|
|
87
|
+
if (isField(sibling)) {
|
|
88
|
+
sibling.setValue(undefined);
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
[field],
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<Select<string>
|
|
96
|
+
{...props}
|
|
97
|
+
options={options}
|
|
98
|
+
loading={loading}
|
|
99
|
+
status={hasError ? 'error' : undefined}
|
|
100
|
+
value={field.value}
|
|
101
|
+
onChange={handleChange}
|
|
102
|
+
notFoundContent={hasError ? t('Failed to load the list') : undefined}
|
|
103
|
+
allowClear
|
|
104
|
+
showSearch
|
|
105
|
+
optionFilterProp="label"
|
|
106
|
+
/>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
2
|
+
import { useAPIClient } from '@nocobase/client';
|
|
3
|
+
import { Select, SelectProps } from 'antd';
|
|
4
|
+
import { useField, useForm, observer } from '@formily/react';
|
|
5
|
+
import { Field } from '@formily/core';
|
|
6
|
+
import { useT } from '../locale';
|
|
7
|
+
|
|
8
|
+
interface SelectOption {
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Shape of a single model record returned by `ai:listModels`. Providers vary
|
|
15
|
+
* on whether they return `id` or `name`, so both are optional and handled.
|
|
16
|
+
*/
|
|
17
|
+
interface ModelRecord {
|
|
18
|
+
id?: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function normalizeRecords(response: unknown): ModelRecord[] {
|
|
23
|
+
const data = (response as { data?: { data?: unknown } } | undefined)?.data?.data;
|
|
24
|
+
return Array.isArray(data) ? (data as ModelRecord[]) : [];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type ModelSelectProps = Omit<SelectProps<string>, 'options' | 'loading' | 'value' | 'onChange' | 'disabled'>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Formily-aware Select that lists the models available for the currently
|
|
31
|
+
* selected LLM service. It observes `form.values.llmService` and:
|
|
32
|
+
*
|
|
33
|
+
* - Req 4.2: loads models via `api.resource('ai').listModels({ llmService })`.
|
|
34
|
+
* - stays disabled until a service is selected.
|
|
35
|
+
* - clears its own value and options when the service changes, so a model
|
|
36
|
+
* from a previous service is never left selected.
|
|
37
|
+
* - Req 4.5: surfaces a load failure as an error state instead of throwing.
|
|
38
|
+
*/
|
|
39
|
+
export const ModelSelect = observer((props: ModelSelectProps) => {
|
|
40
|
+
const t = useT();
|
|
41
|
+
const api = useAPIClient();
|
|
42
|
+
const field = useField<Field>();
|
|
43
|
+
const form = useForm();
|
|
44
|
+
const [options, setOptions] = useState<SelectOption[]>([]);
|
|
45
|
+
const [loading, setLoading] = useState(false);
|
|
46
|
+
const [hasError, setHasError] = useState(false);
|
|
47
|
+
|
|
48
|
+
const llmService = typeof form.values?.llmService === 'string' ? form.values.llmService : undefined;
|
|
49
|
+
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
let active = true;
|
|
52
|
+
if (!llmService) {
|
|
53
|
+
setOptions([]);
|
|
54
|
+
setHasError(false);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const loadModels = async () => {
|
|
58
|
+
setLoading(true);
|
|
59
|
+
setHasError(false);
|
|
60
|
+
try {
|
|
61
|
+
const res: unknown = await api.resource('ai').listModels({ llmService });
|
|
62
|
+
if (!active) return;
|
|
63
|
+
const next = normalizeRecords(res)
|
|
64
|
+
.map((item) => item.id || item.name)
|
|
65
|
+
.filter((value): value is string => Boolean(value))
|
|
66
|
+
.map<SelectOption>((value) => ({ label: value, value }));
|
|
67
|
+
setOptions(next);
|
|
68
|
+
} catch (err: unknown) {
|
|
69
|
+
if (!active) return;
|
|
70
|
+
console.error('Failed to load models:', err);
|
|
71
|
+
setOptions([]);
|
|
72
|
+
setHasError(true);
|
|
73
|
+
} finally {
|
|
74
|
+
if (active) setLoading(false);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
loadModels();
|
|
78
|
+
return () => {
|
|
79
|
+
active = false;
|
|
80
|
+
};
|
|
81
|
+
}, [api, llmService]);
|
|
82
|
+
|
|
83
|
+
const handleChange = useCallback(
|
|
84
|
+
(value: string) => {
|
|
85
|
+
field.setValue(value);
|
|
86
|
+
},
|
|
87
|
+
[field],
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<Select<string>
|
|
92
|
+
{...props}
|
|
93
|
+
options={options}
|
|
94
|
+
loading={loading}
|
|
95
|
+
status={hasError ? 'error' : undefined}
|
|
96
|
+
value={field.value}
|
|
97
|
+
onChange={handleChange}
|
|
98
|
+
disabled={!llmService}
|
|
99
|
+
notFoundContent={hasError ? t('Failed to load the list') : undefined}
|
|
100
|
+
allowClear
|
|
101
|
+
showSearch
|
|
102
|
+
optionFilterProp="label"
|
|
103
|
+
/>
|
|
104
|
+
);
|
|
105
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { LLMServiceSelect } from './LLMServiceSelect';
|
|
2
|
+
export type { LLMServiceSelectProps } from './LLMServiceSelect';
|
|
3
|
+
export { ModelSelect } from './ModelSelect';
|
|
4
|
+
export type { ModelSelectProps } from './ModelSelect';
|
|
5
|
+
export { CollectionMultiSelect } from './CollectionMultiSelect';
|
|
6
|
+
export type { CollectionMultiSelectProps, CollectionMultiSelectValue } from './CollectionMultiSelect';
|
|
7
|
+
export { BuildPhaseTag } from './BuildPhaseTag';
|
|
8
|
+
export type { BuildPhaseTagProps } from './BuildPhaseTag';
|