@emeraldemperaur/vector-sigma 1.4.30 → 1.4.32

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 (30) hide show
  1. package/lib/index.cjs +52274 -51859
  2. package/lib/index.esm.js +52272 -51859
  3. package/lib/types/index.d.ts +2 -1
  4. package/lib/types/tests/components/components.avatar.test.d.ts +1 -0
  5. package/lib/types/tests/components/components.button.test.d.ts +1 -0
  6. package/lib/types/tests/components/components.checkboxgroup.test.d.ts +1 -0
  7. package/lib/types/tests/components/components.conditional.test.d.ts +1 -0
  8. package/lib/types/tests/components/components.datepickers.test.d.ts +1 -0
  9. package/lib/types/tests/components/components.files.test.d.ts +1 -0
  10. package/lib/types/tests/components/components.iconimage.test.d.ts +1 -0
  11. package/lib/types/tests/components/components.inputs.finance.test.d.ts +1 -0
  12. package/lib/types/tests/components/components.inputs.test.d.ts +1 -0
  13. package/lib/types/tests/components/components.radiogroup.test.d.ts +1 -0
  14. package/lib/types/tests/components/components.rangeslider.test.d.ts +1 -0
  15. package/lib/types/tests/components/components.sectiontitle.test.d.ts +1 -0
  16. package/lib/types/tests/components/components.selectors.test.d.ts +1 -0
  17. package/lib/types/tests/layouts/layouts.accordion.test.d.ts +1 -0
  18. package/lib/types/tests/layouts/layouts.codex.test.d.ts +1 -0
  19. package/lib/types/tests/layouts/layouts.column.test.d.ts +1 -0
  20. package/lib/types/tests/layouts/layouts.container.test.d.ts +1 -0
  21. package/lib/types/tests/layouts/layouts.row.test.d.ts +1 -0
  22. package/lib/types/tests/orion.test.d.ts +0 -0
  23. package/lib/types/tests/utils/utils.chronos.test.d.ts +1 -0
  24. package/lib/types/tests/utils/utils.minerva.test.d.ts +1 -0
  25. package/lib/types/tests/utils/utils.uuid.test.d.ts +1 -0
  26. package/lib/types/tests/utils/utils.vinci.test.d.ts +1 -0
  27. package/lib/types/utils/minerva.d.ts +9 -0
  28. package/lib/types/utils/voltaire.d.ts +2 -0
  29. package/lib/types/vectorSigma.d.ts +46 -2
  30. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  export { primeMatrix } from './primeMatrix';
2
- export { vectorSigma } from './vectorSigma';
2
+ export { VectorSigma } from './vectorSigma';
3
3
  export { Theme, ThemePanel } from '@radix-ui/themes';
4
4
  export * from './components/avatar/avatar';
5
5
  export * from './components/button/button';
@@ -38,3 +38,4 @@ export * from './layouts/codex/codexcontrols';
38
38
  export * from './utils/architect';
39
39
  export * from './utils/uuidparser';
40
40
  export * from './utils/currencyconfig';
41
+ export * from './utils/minerva';
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
File without changes
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ import { XFormType } from "./voltron";
2
+ /**
3
+ * Normalizes and sanitizes an XFormType object.
4
+ * - Standardizes Section IDs.
5
+ * - Enforces globally consecutive Query IDs.
6
+ * - Ensures unique, Formik-friendly camelCase Input Aliases.
7
+ * - Prevents empty string values in Input Options (Fixes Radix UI crashes).
8
+ */
9
+ export declare const normalizeXForm: (form: XFormType) => XFormType;
@@ -1,3 +1,4 @@
1
+ import { XFormType } from "./voltron";
1
2
  export declare const avatarInputType: string[];
2
3
  export declare const buttonInputType: string[];
3
4
  export declare const checkboxInputType: string[];
@@ -22,3 +23,4 @@ export declare const rangeSliderInputType: string[];
22
23
  export declare const toggleInputType: string[];
23
24
  export declare const sectionTitleOutputType: string[];
24
25
  export declare const conditionalInputType: string[];
26
+ export declare const generateInitialValues: (schema: XFormType) => Record<string, any>;
@@ -1,3 +1,47 @@
1
- import React from "react";
1
+ import React from 'react';
2
+ import { XFormType, XFormQuery, SectionSchema } from './utils/voltron';
3
+ import { Teletraan1Props } from './teletraan1';
4
+ import { z } from "zod";
2
5
  import './styles/main.scss';
3
- export declare const vectorSigma: (name: String) => React.JSX.Element;
6
+ export declare class VectorSigma {
7
+ isValid: boolean;
8
+ formObject: XFormType;
9
+ values: Record<string, any>;
10
+ errors: Record<string, any>;
11
+ statusCode: 0 | 1 | 2;
12
+ timeCreated: number;
13
+ timeInProgress: number | null;
14
+ timeSubmitted: number | null;
15
+ isSubmitting: boolean;
16
+ /**
17
+ * Initializes the VectorSigma instance.
18
+ * @param initializer A JSON string or a JavaScript object matching XFormType.
19
+ * If left empty, initializes a blank form object for use with Builder methods.
20
+ */
21
+ constructor(initializer?: string | XFormType | unknown);
22
+ /**
23
+ * Safely validates the input against the XFormSchema.
24
+ * Throws developer-friendly errors if the JSON is malformed or violates the schema.
25
+ */
26
+ private validateAndSet;
27
+ /**
28
+ * Traverses the schema to extract Formik InitialValues and Yup Validation logic.
29
+ */
30
+ private buildFormikConfig;
31
+ setUUID(uuid: string): this;
32
+ setName(name: string): this;
33
+ setBrand(color: string, logo?: string, logoPosition?: 'left' | 'center' | 'right'): this;
34
+ addSection(section: z.infer<typeof SectionSchema>): this;
35
+ createSection(sectionId: string, title: string, icon?: string): this;
36
+ addQueryToSection(sectionId: string, query: XFormQuery): this;
37
+ /**
38
+ * Transforms the initialized xForm JSON/JS object by normalizing it and returning a `<Teletraan1/>` component.
39
+ */
40
+ transform(teletraanProps?: Omit<Teletraan1Props, 'xFormModel'>): React.ReactElement;
41
+ /**
42
+ * `render()` is the final method in the builder pattern chain.
43
+ */
44
+ render(teletraanProps?: Omit<Teletraan1Props, 'xFormModel'>): React.ReactElement;
45
+ toJSON(): string;
46
+ getObject(): XFormType;
47
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emeraldemperaur/vector-sigma",
3
- "version": "1.4.30",
3
+ "version": "1.4.32",
4
4
  "description": "Dynamic Form Orchestrator: NPM Package",
5
5
  "repository": {
6
6
  "type": "git",