@uigraph/sdk 1.2.4 → 1.2.6

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/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- import { C as ServerComponentFieldInput, S as ServerComponentField, _ as SequenceParticipantLink, a as MermaidNode, b as SubgraphLayout, c as SequenceAutonumber, d as SequenceBlockType, f as SequenceBox, g as SequenceParticipant, h as SequenceNote, i as MermaidEdge, l as SequenceBlock, m as SequenceMessage, n as RFComponentField, o as SequenceActivation, p as SequenceDiagramData, r as ReactFlowData, s as SequenceArrowHead, t as CustomData, u as SequenceBlockSection, v as SequenceParticipantType, x as LinkOrFileValue, y as SubgraphInfo } from "./__index.YhKZQgFP.cjs";
1
+ import { A as C4ElementKind, C as ServerComponentFieldInput, D as C4DiagramType, E as C4DiagramData, F as C4RelDirection, I as C4RelStyle, L as C4Relationship, M as C4ElementStyle, N as C4LayoutConfig, O as C4Direction, P as C4NodeType, S as ServerComponentField, T as C4BoundaryKind, _ as SequenceParticipantLink, a as MermaidNode, b as SubgraphLayout, c as SequenceAutonumber, d as SequenceBlockType, f as SequenceBox, g as SequenceParticipant, h as SequenceNote, i as MermaidEdge, j as C4ElementShape, k as C4Element, l as SequenceBlock, m as SequenceMessage, n as RFComponentField, o as SequenceActivation, p as SequenceDiagramData, r as ReactFlowData, s as SequenceArrowHead, t as CustomData, u as SequenceBlockSection, v as SequenceParticipantType, w as C4Boundary, x as LinkOrFileValue, y as SubgraphInfo } from "./__index.BVDt3Nmx.cjs";
2
2
  import { t as ComponentInputType } from "./__component-type.tW2Xh7Xk.cjs";
3
- import { t as contextSchema } from "./__headless.DfSqiw4X.cjs";
3
+ import { t as contextSchema } from "./__headless.D9VUj46t.cjs";
4
4
  import z$1, { z } from "zod";
5
5
  import { Edge, Node } from "@xyflow/react";
6
6
 
@@ -732,9 +732,104 @@ type Options = {
732
732
  };
733
733
  declare function syncBaseData(prev: ReactFlowData, next: ReactFlowData, options?: Options): ReactFlowData;
734
734
  //#endregion
735
+ //#region src/mermaid-converter/index.d.ts
736
+ declare function convertMermaidToReactFlow(mermaidCode: string): Promise<ReactFlowData>;
737
+ //#endregion
738
+ //#region src/mermaid-converter/c4-diagram/parser.d.ts
739
+ declare function isC4Diagram(code: string): boolean;
740
+ declare function parseC4Diagram(code: string): C4DiagramData;
741
+ //#endregion
742
+ //#region src/mermaid-converter/c4-diagram/to-react-flow.d.ts
743
+ /** Mirrors mermaid's `c4` config block so imports land at a familiar scale. */
744
+ declare const C4_LAYOUT: {
745
+ WIDTH: number;
746
+ MIN_HEIGHT: number;
747
+ SHAPE_MARGIN: number;
748
+ ROW_MARGIN: number;
749
+ SHAPE_PADDING: number;
750
+ BOUNDARY_HEADER: number;
751
+ BOUNDARY_PADDING: number;
752
+ BOUNDARY_MARGIN: number;
753
+ DIAGRAM_MARGIN_X: number;
754
+ DIAGRAM_MARGIN_Y: number;
755
+ };
756
+ declare const C4_COLORS: {
757
+ person: {
758
+ fill: string;
759
+ stroke: string;
760
+ };
761
+ personExternal: {
762
+ fill: string;
763
+ stroke: string;
764
+ };
765
+ system: {
766
+ fill: string;
767
+ stroke: string;
768
+ };
769
+ systemExternal: {
770
+ fill: string;
771
+ stroke: string;
772
+ };
773
+ container: {
774
+ fill: string;
775
+ stroke: string;
776
+ };
777
+ containerExternal: {
778
+ fill: string;
779
+ stroke: string;
780
+ };
781
+ component: {
782
+ fill: string;
783
+ stroke: string;
784
+ };
785
+ componentExternal: {
786
+ fill: string;
787
+ stroke: string;
788
+ };
789
+ node: {
790
+ fill: string;
791
+ stroke: string;
792
+ };
793
+ nodeExternal: {
794
+ fill: string;
795
+ stroke: string;
796
+ };
797
+ };
798
+ declare function getC4ElementColors(element: C4Element): {
799
+ fill: string;
800
+ stroke: string;
801
+ } | {
802
+ fill: string;
803
+ stroke: string;
804
+ } | {
805
+ fill: string;
806
+ stroke: string;
807
+ } | {
808
+ fill: string;
809
+ stroke: string;
810
+ } | {
811
+ fill: string;
812
+ stroke: string;
813
+ } | {
814
+ fill: string;
815
+ stroke: string;
816
+ } | {
817
+ fill: string;
818
+ stroke: string;
819
+ } | {
820
+ fill: string;
821
+ stroke: string;
822
+ } | {
823
+ fill: string;
824
+ stroke: string;
825
+ } | {
826
+ fill: string;
827
+ stroke: string;
828
+ };
829
+ declare function convertC4ToReactFlow(data: C4DiagramData): ReactFlowData;
830
+ declare function convertC4MermaidToReactFlow(code: string): ReactFlowData;
831
+ //#endregion
735
832
  //#region src/mermaid-converter/constants/layout.d.ts
736
- /** Default lifeline/indicator color, shared with the canvas's own participants. */
737
- declare const SEQUENCE_PARTICIPANT_COLOR = "#E2E8F0";
738
833
  declare const SEQUENCE_LAYOUT: {
739
834
  readonly COLUMN_WIDTH: 360;
740
835
  readonly ROW_HEIGHT: 60;
@@ -764,14 +859,11 @@ declare const SEQUENCE_LAYOUT: {
764
859
  //#region src/mermaid-converter/mermaid-sanitizer.d.ts
765
860
  declare function sanitizeMermaidLabels(src: string): string;
766
861
  //#endregion
767
- //#region src/mermaid-converter/mermaid-to-react-flow.d.ts
768
- declare function convertMermaidToReactFlow(mermaidCode: string): Promise<ReactFlowData>;
769
- //#endregion
770
- //#region src/mermaid-converter/react-flow-to-sequence.d.ts
862
+ //#region src/mermaid-converter/sequence-diagram/from-react-flow.d.ts
771
863
  declare function isSequenceDiagram(nodes: Node[]): boolean;
772
864
  declare function convertReactFlowToSequenceMermaid(nodes: Node[], edges: Edge[]): string;
773
865
  //#endregion
774
- //#region src/mermaid-converter/sequence-layout.d.ts
866
+ //#region src/mermaid-converter/sequence-diagram/layout.d.ts
775
867
  /**
776
868
  * Sizes a sequence message box from its own label text, targeting a ~2-line
777
869
  * wrap. A fixed width makes long labels ("Return Checkout Session client
@@ -810,4 +902,4 @@ type UigOutput = {
810
902
  //#region src/uig-converter/index.d.ts
811
903
  declare function convertUiGraphToMermaid(input: UiGraphInput, options?: UiGraphOptions): UigOutput;
812
904
  //#endregion
813
- export { AstToSqlGenerator, AstToUiConverter, BasicDetailsSchema, CheckConstraintAST, ColumnAST, ComponentInputType, ConstraintAST, CustomData, DataTypeAST, DefaultValueAST, DialectIdSchema, DocumentCollectionSchema, DocumentIndexSchema, DynamoAttributeSchema, DynamoEditorSchema, DynamoGsiSchema, EditorSupportedDialectSchema, ForeignKeyConstraintAST, IndexAST, IndexColumnAST, IndexMethodAST, JsonEditorSchema, LinkOrFileValue, MermaidEdge, MermaidNode, MongoCollectionSchema, MongoEditorSchema, MongoIndexFieldSchema, MongoIndexSchema, MongoNestedFieldSchema, NestedFieldSchema, NoSqlFieldSchema, PrimaryKeyConstraintAST, RFComponentField, ReactFlowData, ReferentialActionAST, SEQUENCE_LAYOUT, SEQUENCE_PARTICIPANT_COLOR, SchemaAST, SchemaDialect, SchemaUIRepresentation, SequenceActivation, SequenceArrowHead, SequenceAutonumber, SequenceBlock, SequenceBlockSection, SequenceBlockType, SequenceBox, SequenceDiagramData, SequenceMessage, SequenceNote, SequenceParticipant, SequenceParticipantLink, SequenceParticipantType, ServerComponentField, ServerComponentFieldInput, SqlToAstParser, SubgraphInfo, SubgraphLayout, TParsedColumn, TParsedForeignKey, TParsedIndex, TParsedSchema, TParsedTable, TableAST, TableOptionsAST, UniqueConstraintAST, buildMetaData, contextSchema, convertDynamoSchemaToAst, convertJsonSchemaToAst, convertMermaidToReactFlow, convertMermaidToReactFlowWithContext, convertMongoSchemaToAst, convertNoSQLToAst, convertReactFlowToSequenceMermaid, convertUiGraphToMermaid, estimateSequenceMessageBoxSize, flattenMetaData, generateTableNodeId, generateUUID, isSequenceDiagram, sanitizeMermaidLabels, syncBaseData };
905
+ export { AstToSqlGenerator, AstToUiConverter, BasicDetailsSchema, C4Boundary, C4BoundaryKind, C4DiagramData, C4DiagramType, C4Direction, C4Element, C4ElementKind, C4ElementShape, C4ElementStyle, C4LayoutConfig, C4NodeType, C4RelDirection, C4RelStyle, C4Relationship, C4_COLORS, C4_LAYOUT, CheckConstraintAST, ColumnAST, ComponentInputType, ConstraintAST, CustomData, DataTypeAST, DefaultValueAST, DialectIdSchema, DocumentCollectionSchema, DocumentIndexSchema, DynamoAttributeSchema, DynamoEditorSchema, DynamoGsiSchema, EditorSupportedDialectSchema, ForeignKeyConstraintAST, IndexAST, IndexColumnAST, IndexMethodAST, JsonEditorSchema, LinkOrFileValue, MermaidEdge, MermaidNode, MongoCollectionSchema, MongoEditorSchema, MongoIndexFieldSchema, MongoIndexSchema, MongoNestedFieldSchema, NestedFieldSchema, NoSqlFieldSchema, PrimaryKeyConstraintAST, RFComponentField, ReactFlowData, ReferentialActionAST, SEQUENCE_LAYOUT, SchemaAST, SchemaDialect, SchemaUIRepresentation, SequenceActivation, SequenceArrowHead, SequenceAutonumber, SequenceBlock, SequenceBlockSection, SequenceBlockType, SequenceBox, SequenceDiagramData, SequenceMessage, SequenceNote, SequenceParticipant, SequenceParticipantLink, SequenceParticipantType, ServerComponentField, ServerComponentFieldInput, SqlToAstParser, SubgraphInfo, SubgraphLayout, TParsedColumn, TParsedForeignKey, TParsedIndex, TParsedSchema, TParsedTable, TableAST, TableOptionsAST, UniqueConstraintAST, buildMetaData, contextSchema, convertC4MermaidToReactFlow, convertC4ToReactFlow, convertDynamoSchemaToAst, convertJsonSchemaToAst, convertMermaidToReactFlow, convertMermaidToReactFlowWithContext, convertMongoSchemaToAst, convertNoSQLToAst, convertReactFlowToSequenceMermaid, convertUiGraphToMermaid, estimateSequenceMessageBoxSize, flattenMetaData, generateTableNodeId, generateUUID, getC4ElementColors, isC4Diagram, isSequenceDiagram, parseC4Diagram, sanitizeMermaidLabels, syncBaseData };
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { C as ServerComponentFieldInput, S as ServerComponentField, _ as SequenceParticipantLink, a as MermaidNode, b as SubgraphLayout, c as SequenceAutonumber, d as SequenceBlockType, f as SequenceBox, g as SequenceParticipant, h as SequenceNote, i as MermaidEdge, l as SequenceBlock, m as SequenceMessage, n as RFComponentField, o as SequenceActivation, p as SequenceDiagramData, r as ReactFlowData, s as SequenceArrowHead, t as CustomData, u as SequenceBlockSection, v as SequenceParticipantType, x as LinkOrFileValue, y as SubgraphInfo } from "./__index.Bvdu5Kox.mjs";
1
+ import { A as C4ElementKind, C as ServerComponentFieldInput, D as C4DiagramType, E as C4DiagramData, F as C4RelDirection, I as C4RelStyle, L as C4Relationship, M as C4ElementStyle, N as C4LayoutConfig, O as C4Direction, P as C4NodeType, S as ServerComponentField, T as C4BoundaryKind, _ as SequenceParticipantLink, a as MermaidNode, b as SubgraphLayout, c as SequenceAutonumber, d as SequenceBlockType, f as SequenceBox, g as SequenceParticipant, h as SequenceNote, i as MermaidEdge, j as C4ElementShape, k as C4Element, l as SequenceBlock, m as SequenceMessage, n as RFComponentField, o as SequenceActivation, p as SequenceDiagramData, r as ReactFlowData, s as SequenceArrowHead, t as CustomData, u as SequenceBlockSection, v as SequenceParticipantType, w as C4Boundary, x as LinkOrFileValue, y as SubgraphInfo } from "./__index.BQQp_uAt.mjs";
2
2
  import { t as ComponentInputType } from "./__component-type.CO8FgnQE.mjs";
3
- import { t as contextSchema } from "./__headless.BLqB7VsJ.mjs";
3
+ import { t as contextSchema } from "./__headless.CnrU6aAA.mjs";
4
4
  import z$1, { z } from "zod";
5
5
  import { Edge, Node } from "@xyflow/react";
6
6
 
@@ -732,9 +732,104 @@ type Options = {
732
732
  };
733
733
  declare function syncBaseData(prev: ReactFlowData, next: ReactFlowData, options?: Options): ReactFlowData;
734
734
  //#endregion
735
+ //#region src/mermaid-converter/index.d.ts
736
+ declare function convertMermaidToReactFlow(mermaidCode: string): Promise<ReactFlowData>;
737
+ //#endregion
738
+ //#region src/mermaid-converter/c4-diagram/parser.d.ts
739
+ declare function isC4Diagram(code: string): boolean;
740
+ declare function parseC4Diagram(code: string): C4DiagramData;
741
+ //#endregion
742
+ //#region src/mermaid-converter/c4-diagram/to-react-flow.d.ts
743
+ /** Mirrors mermaid's `c4` config block so imports land at a familiar scale. */
744
+ declare const C4_LAYOUT: {
745
+ WIDTH: number;
746
+ MIN_HEIGHT: number;
747
+ SHAPE_MARGIN: number;
748
+ ROW_MARGIN: number;
749
+ SHAPE_PADDING: number;
750
+ BOUNDARY_HEADER: number;
751
+ BOUNDARY_PADDING: number;
752
+ BOUNDARY_MARGIN: number;
753
+ DIAGRAM_MARGIN_X: number;
754
+ DIAGRAM_MARGIN_Y: number;
755
+ };
756
+ declare const C4_COLORS: {
757
+ person: {
758
+ fill: string;
759
+ stroke: string;
760
+ };
761
+ personExternal: {
762
+ fill: string;
763
+ stroke: string;
764
+ };
765
+ system: {
766
+ fill: string;
767
+ stroke: string;
768
+ };
769
+ systemExternal: {
770
+ fill: string;
771
+ stroke: string;
772
+ };
773
+ container: {
774
+ fill: string;
775
+ stroke: string;
776
+ };
777
+ containerExternal: {
778
+ fill: string;
779
+ stroke: string;
780
+ };
781
+ component: {
782
+ fill: string;
783
+ stroke: string;
784
+ };
785
+ componentExternal: {
786
+ fill: string;
787
+ stroke: string;
788
+ };
789
+ node: {
790
+ fill: string;
791
+ stroke: string;
792
+ };
793
+ nodeExternal: {
794
+ fill: string;
795
+ stroke: string;
796
+ };
797
+ };
798
+ declare function getC4ElementColors(element: C4Element): {
799
+ fill: string;
800
+ stroke: string;
801
+ } | {
802
+ fill: string;
803
+ stroke: string;
804
+ } | {
805
+ fill: string;
806
+ stroke: string;
807
+ } | {
808
+ fill: string;
809
+ stroke: string;
810
+ } | {
811
+ fill: string;
812
+ stroke: string;
813
+ } | {
814
+ fill: string;
815
+ stroke: string;
816
+ } | {
817
+ fill: string;
818
+ stroke: string;
819
+ } | {
820
+ fill: string;
821
+ stroke: string;
822
+ } | {
823
+ fill: string;
824
+ stroke: string;
825
+ } | {
826
+ fill: string;
827
+ stroke: string;
828
+ };
829
+ declare function convertC4ToReactFlow(data: C4DiagramData): ReactFlowData;
830
+ declare function convertC4MermaidToReactFlow(code: string): ReactFlowData;
831
+ //#endregion
735
832
  //#region src/mermaid-converter/constants/layout.d.ts
736
- /** Default lifeline/indicator color, shared with the canvas's own participants. */
737
- declare const SEQUENCE_PARTICIPANT_COLOR = "#E2E8F0";
738
833
  declare const SEQUENCE_LAYOUT: {
739
834
  readonly COLUMN_WIDTH: 360;
740
835
  readonly ROW_HEIGHT: 60;
@@ -764,14 +859,11 @@ declare const SEQUENCE_LAYOUT: {
764
859
  //#region src/mermaid-converter/mermaid-sanitizer.d.ts
765
860
  declare function sanitizeMermaidLabels(src: string): string;
766
861
  //#endregion
767
- //#region src/mermaid-converter/mermaid-to-react-flow.d.ts
768
- declare function convertMermaidToReactFlow(mermaidCode: string): Promise<ReactFlowData>;
769
- //#endregion
770
- //#region src/mermaid-converter/react-flow-to-sequence.d.ts
862
+ //#region src/mermaid-converter/sequence-diagram/from-react-flow.d.ts
771
863
  declare function isSequenceDiagram(nodes: Node[]): boolean;
772
864
  declare function convertReactFlowToSequenceMermaid(nodes: Node[], edges: Edge[]): string;
773
865
  //#endregion
774
- //#region src/mermaid-converter/sequence-layout.d.ts
866
+ //#region src/mermaid-converter/sequence-diagram/layout.d.ts
775
867
  /**
776
868
  * Sizes a sequence message box from its own label text, targeting a ~2-line
777
869
  * wrap. A fixed width makes long labels ("Return Checkout Session client
@@ -810,4 +902,4 @@ type UigOutput = {
810
902
  //#region src/uig-converter/index.d.ts
811
903
  declare function convertUiGraphToMermaid(input: UiGraphInput, options?: UiGraphOptions): UigOutput;
812
904
  //#endregion
813
- export { AstToSqlGenerator, AstToUiConverter, BasicDetailsSchema, CheckConstraintAST, ColumnAST, ComponentInputType, ConstraintAST, CustomData, DataTypeAST, DefaultValueAST, DialectIdSchema, DocumentCollectionSchema, DocumentIndexSchema, DynamoAttributeSchema, DynamoEditorSchema, DynamoGsiSchema, EditorSupportedDialectSchema, ForeignKeyConstraintAST, IndexAST, IndexColumnAST, IndexMethodAST, JsonEditorSchema, LinkOrFileValue, MermaidEdge, MermaidNode, MongoCollectionSchema, MongoEditorSchema, MongoIndexFieldSchema, MongoIndexSchema, MongoNestedFieldSchema, NestedFieldSchema, NoSqlFieldSchema, PrimaryKeyConstraintAST, RFComponentField, ReactFlowData, ReferentialActionAST, SEQUENCE_LAYOUT, SEQUENCE_PARTICIPANT_COLOR, SchemaAST, SchemaDialect, SchemaUIRepresentation, SequenceActivation, SequenceArrowHead, SequenceAutonumber, SequenceBlock, SequenceBlockSection, SequenceBlockType, SequenceBox, SequenceDiagramData, SequenceMessage, SequenceNote, SequenceParticipant, SequenceParticipantLink, SequenceParticipantType, ServerComponentField, ServerComponentFieldInput, SqlToAstParser, SubgraphInfo, SubgraphLayout, TParsedColumn, TParsedForeignKey, TParsedIndex, TParsedSchema, TParsedTable, TableAST, TableOptionsAST, UniqueConstraintAST, buildMetaData, contextSchema, convertDynamoSchemaToAst, convertJsonSchemaToAst, convertMermaidToReactFlow, convertMermaidToReactFlowWithContext, convertMongoSchemaToAst, convertNoSQLToAst, convertReactFlowToSequenceMermaid, convertUiGraphToMermaid, estimateSequenceMessageBoxSize, flattenMetaData, generateTableNodeId, generateUUID, isSequenceDiagram, sanitizeMermaidLabels, syncBaseData };
905
+ export { AstToSqlGenerator, AstToUiConverter, BasicDetailsSchema, C4Boundary, C4BoundaryKind, C4DiagramData, C4DiagramType, C4Direction, C4Element, C4ElementKind, C4ElementShape, C4ElementStyle, C4LayoutConfig, C4NodeType, C4RelDirection, C4RelStyle, C4Relationship, C4_COLORS, C4_LAYOUT, CheckConstraintAST, ColumnAST, ComponentInputType, ConstraintAST, CustomData, DataTypeAST, DefaultValueAST, DialectIdSchema, DocumentCollectionSchema, DocumentIndexSchema, DynamoAttributeSchema, DynamoEditorSchema, DynamoGsiSchema, EditorSupportedDialectSchema, ForeignKeyConstraintAST, IndexAST, IndexColumnAST, IndexMethodAST, JsonEditorSchema, LinkOrFileValue, MermaidEdge, MermaidNode, MongoCollectionSchema, MongoEditorSchema, MongoIndexFieldSchema, MongoIndexSchema, MongoNestedFieldSchema, NestedFieldSchema, NoSqlFieldSchema, PrimaryKeyConstraintAST, RFComponentField, ReactFlowData, ReferentialActionAST, SEQUENCE_LAYOUT, SchemaAST, SchemaDialect, SchemaUIRepresentation, SequenceActivation, SequenceArrowHead, SequenceAutonumber, SequenceBlock, SequenceBlockSection, SequenceBlockType, SequenceBox, SequenceDiagramData, SequenceMessage, SequenceNote, SequenceParticipant, SequenceParticipantLink, SequenceParticipantType, ServerComponentField, ServerComponentFieldInput, SqlToAstParser, SubgraphInfo, SubgraphLayout, TParsedColumn, TParsedForeignKey, TParsedIndex, TParsedSchema, TParsedTable, TableAST, TableOptionsAST, UniqueConstraintAST, buildMetaData, contextSchema, convertC4MermaidToReactFlow, convertC4ToReactFlow, convertDynamoSchemaToAst, convertJsonSchemaToAst, convertMermaidToReactFlow, convertMermaidToReactFlowWithContext, convertMongoSchemaToAst, convertNoSQLToAst, convertReactFlowToSequenceMermaid, convertUiGraphToMermaid, estimateSequenceMessageBoxSize, flattenMetaData, generateTableNodeId, generateUUID, getC4ElementColors, isC4Diagram, isSequenceDiagram, parseC4Diagram, sanitizeMermaidLabels, syncBaseData };