@nvidia-elements/forms 0.0.0 → 0.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 (36) hide show
  1. package/package.json +6 -3
  2. package/dist/custom-elements-jsx.d.ts +0 -76
  3. package/dist/custom-elements-vue.d.ts +0 -15
  4. package/dist/custom-elements.json +0 -560
  5. package/dist/data.snippets.json +0 -1
  6. package/dist/examples/csv.examples.js +0 -6
  7. package/dist/examples/csv.examples.js.map +0 -1
  8. package/dist/examples/csv.examples.json +0 -17
  9. package/dist/examples/light.examples.js +0 -6
  10. package/dist/examples/light.examples.js.map +0 -1
  11. package/dist/examples/light.examples.json +0 -27
  12. package/dist/examples/simple.examples.js +0 -6
  13. package/dist/examples/simple.examples.js.map +0 -1
  14. package/dist/examples/simple.examples.json +0 -27
  15. package/dist/examples/visualization.examples.js +0 -6
  16. package/dist/examples/visualization.examples.js.map +0 -1
  17. package/dist/examples/visualization.examples.json +0 -25
  18. package/dist/index.d.ts +0 -2
  19. package/dist/index.js +0 -6
  20. package/dist/index.js.map +0 -1
  21. package/dist/internal/errors.d.ts +0 -3
  22. package/dist/internal/errors.js +0 -10
  23. package/dist/internal/errors.js.map +0 -1
  24. package/dist/internal/schema.d.ts +0 -9
  25. package/dist/internal/schema.js +0 -98
  26. package/dist/internal/schema.js.map +0 -1
  27. package/dist/internal/types.d.ts +0 -77
  28. package/dist/internal/utils.d.ts +0 -1
  29. package/dist/internal/utils.js +0 -10
  30. package/dist/internal/utils.js.map +0 -1
  31. package/dist/mixin/index.d.ts +0 -453
  32. package/dist/mixin/index.js +0 -182
  33. package/dist/mixin/index.js.map +0 -1
  34. package/dist/validators/index.d.ts +0 -18
  35. package/dist/validators/index.js +0 -22
  36. package/dist/validators/index.js.map +0 -1
@@ -1,18 +0,0 @@
1
- import { FormControl, ValidatorResult } from '../internal/types.js';
2
- /**
3
- * Given a json schema, check the value against the schema
4
- * JSON Schema follows the OpenAI JSON Schema for structured outputs
5
- * https://platform.openai.com/docs/guides/structured-outputs
6
- *
7
- * - All fields or function parameters must specify required
8
- * - Require additionalProperties: false on all objects
9
- * - Structured Outputs support the following types:
10
- * - String
11
- * - Number
12
- * - Boolean
13
- * - Object
14
- * - Array
15
- * - Enum
16
- */
17
- export declare function valueSchemaValidator(value: unknown, element: FormControl): ValidatorResult;
18
- export declare function requiredValidator(value: unknown, element: FormControl): ValidatorResult;
@@ -1,22 +0,0 @@
1
- import { validateSchema as e } from "../internal/schema.js";
2
- //#region src/validators/index.ts
3
- function t(t, n) {
4
- let r = n.constructor.metadata;
5
- return e(r.valueSchema, t);
6
- }
7
- function n(e, t) {
8
- return t.required && (e == null || e === "") ? {
9
- validity: {
10
- valueMissing: !0,
11
- valid: !1
12
- },
13
- message: "This field is required"
14
- } : {
15
- validity: { valid: !0 },
16
- message: ""
17
- };
18
- }
19
- //#endregion
20
- export { n as requiredValidator, t as valueSchemaValidator };
21
-
22
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/validators/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { validateSchema } from '../internal/schema.js';\nimport type { FormControl, ValidatorResult } from '../internal/types.js';\n\n/**\n * Given a json schema, check the value against the schema\n * JSON Schema follows the OpenAI JSON Schema for structured outputs\n * https://platform.openai.com/docs/guides/structured-outputs\n *\n * - All fields or function parameters must specify required\n * - Require additionalProperties: false on all objects\n * - Structured Outputs support the following types:\n * - String\n * - Number\n * - Boolean\n * - Object\n * - Array\n * - Enum\n */\nexport function valueSchemaValidator(value: unknown, element: FormControl): ValidatorResult {\n const metadata = (element as any).constructor.metadata; // eslint-disable-line @typescript-eslint/no-explicit-any\n return validateSchema(metadata.valueSchema, value);\n}\n\nexport function requiredValidator(value: unknown, element: FormControl): ValidatorResult {\n if (\n (element as unknown as { required: boolean }).required &&\n (value === undefined || value === null || value === '')\n ) {\n return { validity: { valueMissing: true, valid: false }, message: 'This field is required' };\n }\n return { validity: { valid: true }, message: '' };\n}\n"],"mappings":";;AAqBA,SAAgB,EAAqB,GAAgB,GAAuC;CAC1F,IAAM,IAAY,EAAgB,YAAY;AAC9C,QAAO,EAAe,EAAS,aAAa,EAAM;;AAGpD,SAAgB,EAAkB,GAAgB,GAAuC;AAOvF,QALG,EAA6C,aAC7C,KAAiC,QAAQ,MAAU,MAE7C;EAAE,UAAU;GAAE,cAAc;GAAM,OAAO;GAAO;EAAE,SAAS;EAA0B,GAEvF;EAAE,UAAU,EAAE,OAAO,IAAM;EAAE,SAAS;EAAI"}