@nvidia-elements/forms 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +26 -0
  3. package/dist/custom-elements-jsx.d.ts +76 -0
  4. package/dist/custom-elements-vue.d.ts +15 -0
  5. package/dist/custom-elements.json +560 -0
  6. package/dist/data.snippets.json +1 -0
  7. package/dist/examples/csv.examples.js +6 -0
  8. package/dist/examples/csv.examples.js.map +1 -0
  9. package/dist/examples/csv.examples.json +17 -0
  10. package/dist/examples/light.examples.js +6 -0
  11. package/dist/examples/light.examples.js.map +1 -0
  12. package/dist/examples/light.examples.json +27 -0
  13. package/dist/examples/simple.examples.js +6 -0
  14. package/dist/examples/simple.examples.js.map +1 -0
  15. package/dist/examples/simple.examples.json +27 -0
  16. package/dist/examples/visualization.examples.js +6 -0
  17. package/dist/examples/visualization.examples.js.map +1 -0
  18. package/dist/examples/visualization.examples.json +25 -0
  19. package/dist/index.d.ts +2 -0
  20. package/dist/index.js +6 -0
  21. package/dist/index.js.map +1 -0
  22. package/dist/internal/errors.d.ts +3 -0
  23. package/dist/internal/errors.js +10 -0
  24. package/dist/internal/errors.js.map +1 -0
  25. package/dist/internal/schema.d.ts +9 -0
  26. package/dist/internal/schema.js +98 -0
  27. package/dist/internal/schema.js.map +1 -0
  28. package/dist/internal/types.d.ts +77 -0
  29. package/dist/internal/utils.d.ts +1 -0
  30. package/dist/internal/utils.js +10 -0
  31. package/dist/internal/utils.js.map +1 -0
  32. package/dist/mixin/index.d.ts +453 -0
  33. package/dist/mixin/index.js +182 -0
  34. package/dist/mixin/index.js.map +1 -0
  35. package/dist/validators/index.d.ts +18 -0
  36. package/dist/validators/index.js +22 -0
  37. package/dist/validators/index.js.map +1 -0
  38. package/package.json +228 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple.examples.js","names":["#updateValue"],"sources":["../../src/examples/simple.examples.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, html, LitElement, nothing } from 'lit';\nimport { FormControlMixin } from '@nvidia-elements/forms/mixin';\n\nexport default {\n title: 'Labs/Forms/Examples'\n};\n\n/**\n * @summary Quality control form with checkbox inputs and schema-based validation.\n * @tags test-case\n */\nexport const QualityCheck = {\n render: () => html`\n<form nve-layout=\"column gap:lg pad:lg\">\n <ui-quality-control value='{\"good\": true, \"fast\": true, \"cheap\": false}' name=\"quality\"></ui-quality-control>\n <pre id=\"quality-control-value\"></pre>\n</form>\n\n<script type=\"module\">\n const form = document.querySelector('form');\n const pre = document.querySelector('#quality-control-value');\n const qualityControl = document.querySelector('ui-quality-control[name=\"quality\"]');\n pre.textContent = JSON.stringify(qualityControl.value, null, 2);\n\n form.addEventListener('change', (e) => {\n pre.textContent = JSON.stringify(qualityControl.value, null, 2);\n console.log('change', e.target.value, Object.fromEntries(new FormData(form)));\n });\n\n form.addEventListener('input', (e) => {\n pre.textContent = JSON.stringify(qualityControl.value, null, 2);\n console.log('input', e.target.value, Object.fromEntries(new FormData(form)));\n });\n</script>\n`\n};\n\n/**\n * @summary Quality control form events with strict mode toggle and invalid state handling.\n * @tags test-case\n */\nexport const Events = {\n render: () => html`\n<form id=\"simple-events-form\" nve-layout=\"column gap:lg pad:lg\">\n <ui-quality-control name=\"quality\" value='{\"good\": true, \"fast\": true, \"cheap\": false}'></ui-quality-control>\n <pre></pre>\n <div nve-layout=\"row gap:sm\">\n <button type=\"button\">set invalid value</button>\n <button type=\"reset\">reset</button>\n <button type=\"submit\">submit</button>\n <label>\n <input type=\"checkbox\" name=\"strict\" checked />\n strict mode\n </label>\n </div>\n</form>\n\n<script type=\"module\">\n const form = document.querySelector('#simple-events-form');\n const pre = form.querySelector('pre');\n const button = form.querySelector('button');\n const qualityControl = form.querySelector('[name=\"quality\"]');\n const strict = form.querySelector('[name=\"strict\"]');\n pre.textContent = JSON.stringify(qualityControl.value, null, 2);\n\n strict.addEventListener('change', (e) => {\n qualityControl.constructor.metadata.strict = e.target.checked;\n });\n\n button.addEventListener('click', () => {\n qualityControl.value = { good: true, fast: true, cheap: true };\n console.log('click', qualityControl.value);\n });\n\n form.addEventListener('change', (e) => {\n pre.textContent = JSON.stringify(qualityControl.value, null, 2);\n console.log('change', e.target.value);\n });\n\n form.addEventListener('input', (e) => {\n pre.textContent = JSON.stringify(qualityControl.value, null, 2);\n console.log('input', e.target.value);\n });\n\n form.addEventListener('submit', (e) => {\n e.preventDefault();\n pre.textContent = JSON.stringify(qualityControl.value, null, 2);\n console.log('submit', Object.fromEntries(new FormData(form)));\n });\n\n form.addEventListener('reset', (e) => {\n // reset event fires before the value is reset\n setTimeout(() => {\n pre.textContent = JSON.stringify(qualityControl.value, null, 2);\n console.log('reset', Object.fromEntries(new FormData(form)));\n });\n });\n\n qualityControl.addEventListener('invalid', (e) => {\n console.log('invalid', Object.fromEntries(new FormData(form)));\n });\n</script>\n`\n};\n\nexport interface QualityControlValue {\n good: boolean;\n fast: boolean;\n cheap: boolean;\n}\n\nfunction qualityValidator(value: unknown) {\n const v = value as QualityControlValue;\n if (v.good && v.fast && v.cheap) {\n return {\n validity: { badInput: true },\n message: 'at least one value must be false'\n };\n }\n return { validity: { } };\n}\n\n/**\n * Custom element integrating the FormControlMixin with LitElement for form validation.\n */\nexport class QualityControl extends FormControlMixin<typeof LitElement, QualityControlValue>(LitElement) {\n static styles = [\n css`\n :host {\n display: block;\n }\n\n :host(:invalid) {\n outline: 2px dashed red;\n }\n `\n ];\n\n static readonly metadata = {\n tag: 'ui-quality-control',\n version: '0.0.0',\n strict: true,\n validators: [qualityValidator],\n valueSchema: {\n type: 'object' as const,\n properties: {\n good: {\n type: 'boolean' as const\n },\n fast: {\n type: 'boolean' as const\n },\n cheap: {\n type: 'boolean' as const\n }\n },\n required: ['good', 'fast', 'cheap']\n }\n };\n\n render() {\n return this.value\n ? html`\n <form @input=${this.#updateValue} @change=${this.#updateValue}>\n <label>\n <input type=\"checkbox\" name=\"good\" .checked=${this.value.good} ?disabled=${this.disabled || this.readOnly} aria-label=\"Good\">\n Good\n </label>\n <label>\n <input type=\"checkbox\" name=\"fast\" .checked=${this.value.fast} ?disabled=${this.disabled || this.readOnly} aria-label=\"Fast\">\n Fast\n </label>\n <label>\n <input type=\"checkbox\" name=\"cheap\" .checked=${this.value.cheap} ?disabled=${this.disabled || this.readOnly} aria-label=\"Cheap\">\n Cheap\n </label>\n </form>`\n : nothing;\n }\n\n constructor() {\n super();\n this.value = { good: true, fast: true, cheap: true };\n }\n\n #updateValue(event: Event) {\n const form = this.shadowRoot?.querySelector('form') as HTMLFormElement;\n this.value = { good: form.good.checked, fast: form.fast.checked, cheap: form.cheap.checked };\n this.dispatchUpdateEvent(event.type as 'input' | 'change');\n }\n}\n\ncustomElements.get('ui-quality-control') ?? customElements.define('ui-quality-control', QualityControl);"],"mappings":";AAGA,IAAA,IAAc"}
@@ -0,0 +1,27 @@
1
+ {
2
+ "entrypoint": "@nvidia-elements/forms/examples/simple.examples.json",
3
+ "items": [
4
+ {
5
+ "id": "forms-examples-simple_quality-check",
6
+ "name": "QualityCheck",
7
+ "template": "<form nve-layout=\"column gap:lg pad:lg\">\n <ui-quality-control value='{\"good\": true, \"fast\": true, \"cheap\": false}' name=\"quality\"></ui-quality-control>\n <pre id=\"quality-control-value\"></pre>\n</form>\n<script type=\"module\">\n const form = document.querySelector(\"form\");\n const pre = document.querySelector(\"#quality-control-value\");\n const qualityControl = document.querySelector('ui-quality-control[name=\"quality\"]');\n pre.textContent = JSON.stringify(qualityControl.value, null, 2);\n form.addEventListener(\"change\", (e) => {\n pre.textContent = JSON.stringify(qualityControl.value, null, 2);\n console.log(\"change\", e.target.value, Object.fromEntries(new FormData(form)));\n });\n form.addEventListener(\"input\", (e) => {\n pre.textContent = JSON.stringify(qualityControl.value, null, 2);\n console.log(\"input\", e.target.value, Object.fromEntries(new FormData(form)));\n });\n</script>\n",
8
+ "summary": "Quality control form with checkbox inputs and schema-based validation.",
9
+ "description": "",
10
+ "composition": false,
11
+ "tags": [
12
+ "test-case"
13
+ ]
14
+ },
15
+ {
16
+ "id": "forms-examples-simple_events",
17
+ "name": "Events",
18
+ "template": "<form id=\"simple-events-form\" nve-layout=\"column gap:lg pad:lg\">\n <ui-quality-control name=\"quality\" value='{\"good\": true, \"fast\": true, \"cheap\": false}'></ui-quality-control>\n <pre></pre>\n <div nve-layout=\"row gap:sm\">\n <button type=\"button\">set invalid value</button>\n <button type=\"reset\">reset</button>\n <button type=\"submit\">submit</button>\n <label>\n <input type=\"checkbox\" name=\"strict\" checked />\n strict mode\n </label>\n </div>\n</form>\n<script type=\"module\">\n const form = document.querySelector(\"#simple-events-form\");\n const pre = form.querySelector(\"pre\");\n const button = form.querySelector(\"button\");\n const qualityControl = form.querySelector('[name=\"quality\"]');\n const strict = form.querySelector('[name=\"strict\"]');\n pre.textContent = JSON.stringify(qualityControl.value, null, 2);\n strict.addEventListener(\"change\", (e) => {\n qualityControl.constructor.metadata.strict = e.target.checked;\n });\n button.addEventListener(\"click\", () => {\n qualityControl.value = { good: true, fast: true, cheap: true };\n console.log(\"click\", qualityControl.value);\n });\n form.addEventListener(\"change\", (e) => {\n pre.textContent = JSON.stringify(qualityControl.value, null, 2);\n console.log(\"change\", e.target.value);\n });\n form.addEventListener(\"input\", (e) => {\n pre.textContent = JSON.stringify(qualityControl.value, null, 2);\n console.log(\"input\", e.target.value);\n });\n form.addEventListener(\"submit\", (e) => {\n e.preventDefault();\n pre.textContent = JSON.stringify(qualityControl.value, null, 2);\n console.log(\"submit\", Object.fromEntries(new FormData(form)));\n });\n form.addEventListener(\"reset\", (e) => {\n // reset event fires before the value is reset\n setTimeout(() => {\n pre.textContent = JSON.stringify(qualityControl.value, null, 2);\n console.log(\"reset\", Object.fromEntries(new FormData(form)));\n });\n });\n qualityControl.addEventListener(\"invalid\", (e) => {\n console.log(\"invalid\", Object.fromEntries(new FormData(form)));\n });\n</script>\n",
19
+ "summary": "Quality control form events with strict mode toggle and invalid state handling.",
20
+ "description": "",
21
+ "composition": false,
22
+ "tags": [
23
+ "test-case"
24
+ ]
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,6 @@
1
+ //#region src/examples/visualization.examples.ts
2
+ var e = "";
3
+ //#endregion
4
+ export { e as default };
5
+
6
+ //# sourceMappingURL=visualization.examples.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visualization.examples.js","names":["#canvas","#startAnimation","#shapes","#animationFrame","#render"],"sources":["../../src/examples/visualization.examples.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { css, html, LitElement, nothing } from 'lit';\nimport { FormControlMixin } from '@nvidia-elements/forms/mixin';\nimport '@nvidia-elements/core/color/define.js';\nimport '@nvidia-elements/core/radio/define.js';\nimport '@nvidia-elements/core/range/define.js';\nimport './visualization.examples.js';\n\nexport default {\n title: 'Labs/Forms/Examples'\n};\n\n/**\n * @summary Animated canvas visualization driven by form controls for color, shape, scale, and particle count.\n * @tags test-case\n */\nexport const CanvasParticles = {\n render: () => html`\n<section nve-layout=\"row gap:lg pad:lg align:center\">\n <form nve-layout=\"column gap:lg pad:lg\">\n <nve-color>\n <label>Color</label>\n <input type=\"color\" name=\"color\" value=\"#26ab40\" />\n </nve-color>\n <nve-radio-group>\n <label>Shape</label>\n <nve-radio>\n <label>Circle</label>\n <input type=\"radio\" name=\"shape\" value=\"circle\" checked/>\n </nve-radio>\n <nve-radio>\n <label>Square</label>\n <input type=\"radio\" name=\"shape\" value=\"square\" />\n </nve-radio>\n </nve-radio-group>\n <nve-range>\n <label>Scale</label>\n <input type=\"range\" name=\"scale\" value=\"20\" min=\"5\" max=\"100\" />\n </nve-range>\n <nve-range>\n <label>Particle Count</label>\n <input type=\"range\" name=\"particleCount\" value=\"100\" min=\"1\" max=\"10000\" />\n </nve-range>\n </form>\n <nve-divider orientation=\"vertical\"></nve-divider>\n <ui-entity-draw name=\"draw\" value='{\"color\": \"#26ab40\", \"shape\": \"circle\", \"scale\": 20, \"particleCount\": 100}'></ui-entity-draw>\n</section>\n<script type=\"module\">\n const form = document.querySelector('form');\n const draw = document.querySelector('ui-entity-draw');\n form.addEventListener('input', (e) => {\n draw.value = {\n color: form.elements.color.value,\n shape: form.elements.shape.value,\n scale: form.elements.scale.valueAsNumber,\n particleCount: form.elements.particleCount.valueAsNumber\n }\n });\n</script>\n`\n};\n\nconst styles = css`\n:host {\n display: block;\n}\n\nform {\n background: var(--nve-sys-layer-container-background);\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 1rem;\n border-radius: 0.5rem;\n box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, 0.1);\n}\n\nlabel {\n display: flex;\n align-items: center;\n line-height: 1;\n gap: 0.5rem;\n}\n\ninput {\n margin: 4px 0;\n}\n\npre {\n background: color-mix(in oklab, var(--nve-sys-layer-container-background) 100%, var(--nve-sys-text-muted-color) 7%);\n padding: 12px;\n margin: 0;\n}\n`;\n\nexport interface DrawValue {\n color: string;\n shape: 'circle' | 'square';\n scale: number;\n particleCount: number;\n}\n\nexport class Draw extends FormControlMixin<typeof LitElement, DrawValue>(LitElement) {\n static readonly metadata = {\n version: '0.0.0',\n tag: 'ui-entity-draw',\n valueSchema: {\n type: 'object' as const,\n properties: {\n color: {\n type: 'string' as const,\n format: 'color'\n },\n shape: {\n type: 'enum' as const,\n enum: ['circle', 'square']\n },\n scale: {\n type: 'number' as const,\n minimum: 1,\n maximum: 100\n },\n particleCount: {\n type: 'number' as const,\n minimum: 1,\n maximum: 10000\n }\n },\n required: ['color', 'shape', 'scale', 'particleCount']\n }\n };\n\n static styles = [\n styles,\n css`canvas {border: var(--nve-ref-border-width-sm) solid var(--nve-ref-border-color-muted);}`\n ];\n\n #shapes: Array<{ x: number; y: number; rotation: number }> = [];\n #canvas?: HTMLCanvasElement;\n #animationFrame?: number;\n\n render() {\n return this.value\n ? html`\n <form>\n <canvas name=\"canvas\" width=\"400\" height=\"400\"></canvas>\n <pre>${JSON.stringify(this.value, null, 2)}</pre>\n </form>\n `\n : nothing;\n }\n\n constructor() {\n super();\n this.updateValue({ color: '#000000', shape: 'circle', scale: 50, particleCount: 20 });\n }\n\n firstUpdated() {\n this.#canvas = this.renderRoot.querySelector('canvas') ?? undefined;\n this.#startAnimation();\n }\n\n updated(changedProperties: Map<string, unknown>) {\n super.updated(changedProperties);\n if (this.value && this.value.particleCount !== this.#shapes.length) {\n this.#shapes = new Array(this.value.particleCount).fill(0).map(() => {\n return { x: Math.random() * 400, y: Math.random() * 400, rotation: Math.random() * Math.PI * 2 };\n });\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n if (this.#animationFrame) {\n cancelAnimationFrame(this.#animationFrame);\n }\n }\n\n #startAnimation() {\n const animate = () => {\n if (this.value) {\n this.#render(this.value);\n }\n this.#animationFrame = requestAnimationFrame(animate);\n };\n animate();\n }\n\n #render(value: DrawValue) {\n const ctx = this.#canvas!.getContext('2d')!;\n ctx.clearRect(0, 0, this.#canvas!.width, this.#canvas!.height);\n\n const size = value.scale / 2.5;\n this.#shapes.forEach((shape, i) => {\n shape.y += Math.sin((Date.now() + i * 500) / 1000) * 0.5;\n shape.x += Math.cos((Date.now() + i * 500) / 1000) * 0.5;\n shape.rotation += 0.01;\n shape.x = (shape.x + this.#canvas!.width) % this.#canvas!.width;\n shape.y = (shape.y + this.#canvas!.height) % this.#canvas!.height;\n\n ctx.save();\n ctx.translate(shape.x, shape.y);\n ctx.rotate(shape.rotation);\n ctx.fillStyle = value.color;\n\n if (value.shape === 'circle') {\n ctx.beginPath();\n ctx.arc(0, 0, size / 2, 0, Math.PI * 2);\n ctx.fill();\n } else {\n ctx.fillRect(-size / 2, -size / 2, size, size);\n }\n\n ctx.restore();\n });\n }\n}\n\ncustomElements.get('ui-entity-draw') || customElements.define('ui-entity-draw', Draw);\n"],"mappings":";AAGA,IAAA,IAAc"}
@@ -0,0 +1,25 @@
1
+ {
2
+ "entrypoint": "@nvidia-elements/forms/examples/visualization.examples.json",
3
+ "items": [
4
+ {
5
+ "id": "forms-examples-visualization_canvas-particles",
6
+ "name": "CanvasParticles",
7
+ "template": "<section nve-layout=\"row gap:lg pad:lg align:center\">\n <form nve-layout=\"column gap:lg pad:lg\">\n <nve-color>\n <label>Color</label>\n <input type=\"color\" name=\"color\" value=\"#26ab40\" />\n </nve-color>\n <nve-radio-group>\n <label>Shape</label>\n <nve-radio>\n <label>Circle</label>\n <input type=\"radio\" name=\"shape\" value=\"circle\" checked />\n </nve-radio>\n <nve-radio>\n <label>Square</label>\n <input type=\"radio\" name=\"shape\" value=\"square\" />\n </nve-radio>\n </nve-radio-group>\n <nve-range>\n <label>Scale</label>\n <input type=\"range\" name=\"scale\" value=\"20\" min=\"5\" max=\"100\" />\n </nve-range>\n <nve-range>\n <label>Particle Count</label>\n <input type=\"range\" name=\"particleCount\" value=\"100\" min=\"1\" max=\"10000\" />\n </nve-range>\n </form>\n <nve-divider orientation=\"vertical\"></nve-divider>\n <ui-entity-draw\n name=\"draw\"\n value='{\"color\": \"#26ab40\", \"shape\": \"circle\", \"scale\": 20, \"particleCount\": 100}'\n ></ui-entity-draw>\n</section>\n<script type=\"module\">\n const form = document.querySelector(\"form\");\n const draw = document.querySelector(\"ui-entity-draw\");\n form.addEventListener(\"input\", (e) => {\n draw.value = {\n color: form.elements.color.value,\n shape: form.elements.shape.value,\n scale: form.elements.scale.valueAsNumber,\n particleCount: form.elements.particleCount.valueAsNumber,\n };\n });\n</script>\n",
8
+ "summary": "Animated canvas visualization driven by form controls for color, shape, scale, and particle count.",
9
+ "description": "",
10
+ "composition": true,
11
+ "tags": [
12
+ "test-case"
13
+ ]
14
+ },
15
+ {
16
+ "id": "forms-examples-visualization_styles",
17
+ "name": "styles",
18
+ "template": ":host { display: block; } form { background: var(--nve-sys-layer-container-background); display: flex; flex-direction:\ncolumn; gap: 6px; padding: 1rem; border-radius: 0.5rem; box-shadow: 0 0 0.5rem 0 rgba(0, 0, 0, 0.1); } label { display:\nflex; align-items: center; line-height: 1; gap: 0.5rem; } input { margin: 4px 0; } pre { background: color-mix(in oklab,\nvar(--nve-sys-layer-container-background) 100%, var(--nve-sys-text-muted-color) 7%); padding: 12px; margin: 0; }\n",
19
+ "summary": "",
20
+ "description": "",
21
+ "composition": false,
22
+ "tags": []
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,2 @@
1
+ export declare const VERSION = "0.0.0";
2
+ export * from './internal/types.js';
package/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ //#region src/index.ts
2
+ var e = "0.0.0";
3
+ //#endregion
4
+ export { e as VERSION };
5
+
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport const VERSION = '0.0.0';\n\nexport * from './internal/types.js';\n"],"mappings":";AAGA,IAAa,IAAU"}
@@ -0,0 +1,3 @@
1
+ export declare class FormControlError extends Error {
2
+ constructor(formControlName: string, message: string);
3
+ }
@@ -0,0 +1,10 @@
1
+ //#region src/internal/errors.ts
2
+ var e = class extends Error {
3
+ constructor(e, t) {
4
+ super(`(${e}): ${t}`), this.name = "FormControlError";
5
+ }
6
+ };
7
+ //#endregion
8
+ export { e as FormControlError };
9
+
10
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","names":[],"sources":["../../src/internal/errors.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport class FormControlError extends Error {\n constructor(formControlName: string, message: string) {\n super(`(${formControlName}): ${message}`);\n this.name = 'FormControlError';\n }\n}\n"],"mappings":";AAGA,IAAa,IAAb,cAAsC,MAAM;CAC1C,YAAY,GAAyB,GAAiB;AAEpD,EADA,MAAM,IAAI,EAAgB,KAAK,IAAU,EACzC,KAAK,OAAO"}
@@ -0,0 +1,9 @@
1
+ import { Schema } from './types.js';
2
+ export declare function parseValueSchema<T>(formControlName: string, value: string, schema: Schema): T;
3
+ type ValidationResult = {
4
+ validity: Partial<ValidityState>;
5
+ message: string;
6
+ };
7
+ export declare function validateSchema(schema: Schema, value: unknown): ValidationResult;
8
+ export declare function parseControlValue<T>(value: string, schema: Schema): T | undefined;
9
+ export {};
@@ -0,0 +1,98 @@
1
+ import { FormControlError as e } from "./errors.js";
2
+ //#region src/internal/schema.ts
3
+ function t(t, n, r) {
4
+ let i = f(n, r);
5
+ if (i === void 0) throw new e(t, `unsupported value type ${typeof n}`);
6
+ return i;
7
+ }
8
+ var n = {
9
+ validity: { valid: !0 },
10
+ message: ""
11
+ };
12
+ function r(e, t) {
13
+ return {
14
+ validity: {
15
+ ...e,
16
+ valid: !1
17
+ },
18
+ message: t
19
+ };
20
+ }
21
+ function i(e, t) {
22
+ return typeof t == "string" ? e.minLength !== void 0 && t.length < e.minLength ? r({ tooShort: !0 }, `string length ${t.length} is less than minimum length ${e.minLength}`) : e.maxLength !== void 0 && t.length > e.maxLength ? r({ tooLong: !0 }, `string length ${t.length} is greater than maximum length ${e.maxLength}`) : e.pattern && !new RegExp(e.pattern).test(t) ? r({ patternMismatch: !0 }, `string does not match pattern ${e.pattern}`) : n : r({ typeMismatch: !0 }, `expected string, got ${typeof t}`);
23
+ }
24
+ function a(e, t) {
25
+ return typeof t == "number" ? isNaN(t) ? r({ typeMismatch: !0 }, "expected type number, received type NaN") : e.minimum !== void 0 && t < e.minimum ? r({ rangeUnderflow: !0 }, `number ${t} is less than minimum ${e.minimum}`) : e.maximum !== void 0 && t > e.maximum ? r({ rangeOverflow: !0 }, `number ${t} is greater than maximum ${e.maximum}`) : n : r({ typeMismatch: !0 }, `expected type number, received type ${typeof t}`);
26
+ }
27
+ function o(e) {
28
+ return typeof e == "boolean" ? n : r({ typeMismatch: !0 }, `expected boolean, got ${typeof e}`);
29
+ }
30
+ function s(e, t) {
31
+ if (!Array.isArray(t)) return r({ typeMismatch: !0 }, `expected type array, received type ${typeof t}`);
32
+ if (e.minItems !== void 0 && t.length < e.minItems) return r({ rangeUnderflow: !0 }, `array length ${t.length} is less than minimum length ${e.minItems}`);
33
+ if (e.maxItems !== void 0 && t.length > e.maxItems) return r({ rangeOverflow: !0 }, `array length ${t.length} is greater than maximum length ${e.maxItems}`);
34
+ for (let n of t) {
35
+ let t = d(e.items, n);
36
+ if (!t.validity.valid) return t;
37
+ }
38
+ return n;
39
+ }
40
+ function c(e, t, i, a) {
41
+ let o = i[e];
42
+ return o === void 0 ? a?.includes(e) ? r({ valueMissing: !0 }, `missing required property: ${e}`) : n : d(t, o);
43
+ }
44
+ function l(e, t) {
45
+ if (typeof t != "object" || !t || Array.isArray(t)) return r({ typeMismatch: !0 }, `expected type object, received type ${typeof t}`);
46
+ let i = Object.keys(t), a = Object.keys(e.properties), o = i.filter((e) => !a.includes(e));
47
+ if (o.length > 0 && !e.additionalProperties) return r({ badInput: !0 }, `additional properties not allowed: ${o.join(", ")}`);
48
+ for (let [n, r] of Object.entries(e.properties)) {
49
+ let i = c(n, r, t, e.required);
50
+ if (!i.validity.valid) return i;
51
+ }
52
+ return n;
53
+ }
54
+ function u(e, t) {
55
+ return e.enum.includes(t) ? n : r({ typeMismatch: !0 }, `value must be one of: ${e.enum.join(", ")}`);
56
+ }
57
+ function d(e, t) {
58
+ if (!e || typeof e != "object") return r({ badInput: !0 }, "invalid schema, schema must be a non-null object");
59
+ if (!("type" in e)) return r({ badInput: !0 }, "schema must have \"type\" property");
60
+ switch (e.type) {
61
+ case "string": return i(e, t);
62
+ case "number": return a(e, t);
63
+ case "boolean": return o(t);
64
+ case "array": return s(e, t);
65
+ case "object": return l(e, t);
66
+ case "enum": return u(e, t);
67
+ default: return r({ badInput: !0 }, `unsupported type: ${e.type}`);
68
+ }
69
+ }
70
+ function f(e, t) {
71
+ let n = t.type, r;
72
+ switch (n) {
73
+ case "string":
74
+ r = e;
75
+ break;
76
+ case "number":
77
+ r = parseFloat(e);
78
+ break;
79
+ case "boolean":
80
+ r = !!e || e === "true";
81
+ break;
82
+ case "array":
83
+ r = JSON.parse(e);
84
+ break;
85
+ case "object":
86
+ r = JSON.parse(e);
87
+ break;
88
+ case "enum":
89
+ r = t.enum.includes(e) ? e : void 0;
90
+ break;
91
+ default: return;
92
+ }
93
+ return r;
94
+ }
95
+ //#endregion
96
+ export { t as parseValueSchema, d as validateSchema };
97
+
98
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","names":[],"sources":["../../src/internal/schema.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Schema } from './types.js';\nimport { FormControlError } from './errors.js';\n\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters -- caller specifies T for typed return\nexport function parseValueSchema<T>(formControlName: string, value: string, schema: Schema): T {\n const parsedValue = parseControlValue(value, schema);\n if (parsedValue === undefined) {\n throw new FormControlError(formControlName, `unsupported value type ${typeof value}`);\n }\n return parsedValue as T;\n}\n\ntype ValidationResult = { validity: Partial<ValidityState>; message: string };\n\nconst VALID: ValidationResult = { validity: { valid: true }, message: '' };\n\nfunction invalid(validity: Partial<ValidityState>, message: string): ValidationResult {\n return { validity: { ...validity, valid: false }, message };\n}\n\nfunction validateString(schema: Schema & { type: 'string' }, value: unknown): ValidationResult {\n if (typeof value !== 'string') {\n return invalid({ typeMismatch: true }, `expected string, got ${typeof value}`);\n }\n if (schema.minLength !== undefined && value.length < schema.minLength) {\n return invalid({ tooShort: true }, `string length ${value.length} is less than minimum length ${schema.minLength}`);\n }\n if (schema.maxLength !== undefined && value.length > schema.maxLength) {\n return invalid(\n { tooLong: true },\n `string length ${value.length} is greater than maximum length ${schema.maxLength}`\n );\n }\n if (schema.pattern && !new RegExp(schema.pattern).test(value)) {\n return invalid({ patternMismatch: true }, `string does not match pattern ${schema.pattern}`);\n }\n return VALID;\n}\n\nfunction validateNumber(schema: Schema & { type: 'number' }, value: unknown): ValidationResult {\n if (typeof value !== 'number') {\n return invalid({ typeMismatch: true }, `expected type number, received type ${typeof value}`);\n }\n if (isNaN(value as unknown as number)) {\n return invalid({ typeMismatch: true }, `expected type number, received type NaN`);\n }\n if (schema.minimum !== undefined && value < schema.minimum) {\n return invalid({ rangeUnderflow: true }, `number ${value} is less than minimum ${schema.minimum}`);\n }\n if (schema.maximum !== undefined && value > schema.maximum) {\n return invalid({ rangeOverflow: true }, `number ${value} is greater than maximum ${schema.maximum}`);\n }\n return VALID;\n}\n\nfunction validateBoolean(value: unknown): ValidationResult {\n if (typeof value !== 'boolean') {\n return invalid({ typeMismatch: true }, `expected boolean, got ${typeof value}`);\n }\n return VALID;\n}\n\nfunction validateArray(schema: Schema & { type: 'array' }, value: unknown): ValidationResult {\n if (!Array.isArray(value)) {\n return invalid({ typeMismatch: true }, `expected type array, received type ${typeof value}`);\n }\n if (schema.minItems !== undefined && value.length < schema.minItems) {\n return invalid(\n { rangeUnderflow: true },\n `array length ${value.length} is less than minimum length ${schema.minItems}`\n );\n }\n if (schema.maxItems !== undefined && value.length > schema.maxItems) {\n return invalid(\n { rangeOverflow: true },\n `array length ${value.length} is greater than maximum length ${schema.maxItems}`\n );\n }\n for (const item of value) {\n const result = validateSchema(schema.items, item);\n if (!result.validity.valid) {\n return result;\n }\n }\n return VALID;\n}\n\nfunction validateObjectProperty(\n prop: string,\n propSchema: Schema,\n value: Record<string, unknown>,\n required?: string[]\n): ValidationResult {\n const propValue = value[prop];\n if (propValue === undefined) {\n if (required?.includes(prop)) {\n return invalid({ valueMissing: true }, `missing required property: ${prop}`);\n }\n return VALID;\n }\n return validateSchema(propSchema, propValue);\n}\n\nfunction validateObject(schema: Schema & { type: 'object' }, value: unknown): ValidationResult {\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n return invalid({ typeMismatch: true }, `expected type object, received type ${typeof value}`);\n }\n\n const valueProperties = Object.keys(value as object);\n const schemaProperties = Object.keys(schema.properties);\n\n const additionalProps = valueProperties.filter(prop => !schemaProperties.includes(prop));\n if (additionalProps.length > 0 && !schema.additionalProperties) {\n return invalid({ badInput: true }, `additional properties not allowed: ${additionalProps.join(', ')}`);\n }\n\n for (const [prop, propSchema] of Object.entries(schema.properties)) {\n const result = validateObjectProperty(prop, propSchema, value as Record<string, unknown>, schema.required);\n if (!result.validity.valid) {\n return result;\n }\n }\n return VALID;\n}\n\nfunction validateEnum(schema: Schema & { type: 'enum' }, value: unknown): ValidationResult {\n if (!schema.enum.includes(value as string | number)) {\n return invalid({ typeMismatch: true }, `value must be one of: ${schema.enum.join(', ')}`);\n }\n return VALID;\n}\n\nexport function validateSchema(schema: Schema, value: unknown): ValidationResult {\n if (!schema || typeof schema !== 'object') {\n return invalid({ badInput: true }, 'invalid schema, schema must be a non-null object');\n }\n\n if (!('type' in schema)) {\n return invalid({ badInput: true }, 'schema must have \"type\" property');\n }\n\n switch (schema.type) {\n case 'string':\n return validateString(schema, value);\n case 'number':\n return validateNumber(schema, value);\n case 'boolean':\n return validateBoolean(value);\n case 'array':\n return validateArray(schema, value);\n case 'object':\n return validateObject(schema, value);\n case 'enum':\n return validateEnum(schema, value);\n default:\n return invalid({ badInput: true }, `unsupported type: ${(schema as { type: string }).type}`);\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters -- caller specifies T for typed return\nexport function parseControlValue<T>(value: string, schema: Schema): T | undefined {\n const schemaType = schema.type;\n let parsedValue: unknown;\n\n switch (schemaType) {\n case 'string': {\n parsedValue = value;\n break;\n }\n case 'number': {\n parsedValue = parseFloat(value);\n break;\n }\n case 'boolean': {\n parsedValue = !!value || value === 'true';\n break;\n }\n case 'array': {\n parsedValue = JSON.parse(value);\n break;\n }\n case 'object': {\n parsedValue = JSON.parse(value);\n break;\n }\n case 'enum': {\n parsedValue = schema.enum.includes(value) ? value : undefined;\n break;\n }\n default: {\n const _exhaustiveCheck: never = schemaType;\n return undefined;\n }\n }\n return parsedValue as T;\n}\n"],"mappings":"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"}
@@ -0,0 +1,77 @@
1
+ export type FormControlValue = string | number | File | File[] | null | object;
2
+ interface SchemaBase {
3
+ type: string;
4
+ description?: string;
5
+ format?: string;
6
+ }
7
+ export interface StringSchema extends SchemaBase {
8
+ type: 'string';
9
+ minLength?: number;
10
+ maxLength?: number;
11
+ pattern?: string;
12
+ }
13
+ export interface NumberSchema extends SchemaBase {
14
+ type: 'number';
15
+ minimum?: number;
16
+ maximum?: number;
17
+ multipleOf?: number;
18
+ }
19
+ export interface BooleanSchema extends SchemaBase {
20
+ type: 'boolean';
21
+ }
22
+ export interface ArraySchema extends SchemaBase {
23
+ type: 'array';
24
+ items: Schema;
25
+ minItems?: number;
26
+ maxItems?: number;
27
+ }
28
+ export interface ObjectSchema extends SchemaBase {
29
+ type: 'object';
30
+ properties: Record<string, Schema>;
31
+ required?: string[];
32
+ additionalProperties?: boolean | Schema;
33
+ }
34
+ export interface EnumSchema extends SchemaBase {
35
+ type: 'enum';
36
+ enum: Array<string | number>;
37
+ }
38
+ export type Schema = StringSchema | NumberSchema | BooleanSchema | ArraySchema | ObjectSchema | EnumSchema;
39
+ export interface FormControlMetadata {
40
+ tag: string;
41
+ valueSchema: Schema;
42
+ version?: string;
43
+ validators?: Validator[];
44
+ strict?: boolean;
45
+ }
46
+ interface FormControlInstance extends HTMLElement {
47
+ value: any;
48
+ form: HTMLFormElement | null;
49
+ readonly: boolean;
50
+ name: string;
51
+ noValidate: boolean;
52
+ willValidate: boolean;
53
+ validity: ValidityState;
54
+ validationMessage: string;
55
+ required?: boolean;
56
+ checkValidity(): boolean;
57
+ reportValidity(): boolean;
58
+ }
59
+ /**
60
+ * @event input - Dispatched when the input value changes
61
+ * @event change - Dispatched when the user commits the value
62
+ */
63
+ export interface FormControl {
64
+ new (...args: any[]): FormControlInstance;
65
+ formAssociated: boolean;
66
+ metadata: FormControlMetadata;
67
+ localName?: string;
68
+ }
69
+ export type ChangeEvent = Event & {
70
+ type: 'change';
71
+ };
72
+ export interface ValidatorResult {
73
+ validity: Partial<ValidityState>;
74
+ message?: string;
75
+ }
76
+ export type Validator = (value: unknown, element: FormControl) => ValidatorResult;
77
+ export {};
@@ -0,0 +1 @@
1
+ export declare function isObjectLiteral(item: unknown): boolean;
@@ -0,0 +1,10 @@
1
+ //#region src/internal/utils.ts
2
+ function e(e) {
3
+ if (!e || typeof e != "object" || Array.isArray(e)) return !1;
4
+ let t = Object.getPrototypeOf(e);
5
+ return t === null || t === Object.prototype;
6
+ }
7
+ //#endregion
8
+ export { e as isObjectLiteral };
9
+
10
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../../src/internal/utils.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function isObjectLiteral(item: unknown) {\n if (!item || typeof item !== 'object' || Array.isArray(item)) {\n return false;\n }\n const proto = Object.getPrototypeOf(item);\n return proto === null || proto === Object.prototype;\n}\n"],"mappings":";AAGA,SAAgB,EAAgB,GAAe;AAC7C,KAAI,CAAC,KAAQ,OAAO,KAAS,YAAY,MAAM,QAAQ,EAAK,CAC1D,QAAO;CAET,IAAM,IAAQ,OAAO,eAAe,EAAK;AACzC,QAAO,MAAU,QAAQ,MAAU,OAAO"}