@uigraph/sdk 1.2.0 → 1.2.2
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.Bvdu5Kox.d.mts +198 -0
- package/dist/__index.YhKZQgFP.d.cts +198 -0
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.mts +1 -1
- package/dist/index.cjs +1140 -227
- package/dist/index.d.cts +43 -2
- package/dist/index.d.mts +43 -2
- package/dist/index.mjs +1137 -227
- package/package.json +2 -2
- package/dist/__index.Bfg50WMf.d.mts +0 -122
- package/dist/__index.ClK6nImE.d.cts +0 -122
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as MermaidNode, c as
|
|
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";
|
|
2
2
|
import { t as ComponentInputType } from "./__component-type.tW2Xh7Xk.cjs";
|
|
3
3
|
import { t as contextSchema } from "./__headless.DfSqiw4X.cjs";
|
|
4
4
|
import z$1, { z } from "zod";
|
|
@@ -732,12 +732,53 @@ type Options = {
|
|
|
732
732
|
};
|
|
733
733
|
declare function syncBaseData(prev: ReactFlowData, next: ReactFlowData, options?: Options): ReactFlowData;
|
|
734
734
|
//#endregion
|
|
735
|
+
//#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
|
+
declare const SEQUENCE_LAYOUT: {
|
|
739
|
+
readonly COLUMN_WIDTH: 360;
|
|
740
|
+
readonly ROW_HEIGHT: 60;
|
|
741
|
+
readonly HEADER_HEIGHT: 40;
|
|
742
|
+
readonly MESSAGE_NODE_WIDTH: 140;
|
|
743
|
+
readonly MESSAGE_NODE_HEIGHT: 32;
|
|
744
|
+
readonly SELF_LOOP_OFFSET: 48;
|
|
745
|
+
readonly PARTICIPANT_NODE_WIDTH: 10;
|
|
746
|
+
readonly MESSAGE_MAX_WIDTH: 240;
|
|
747
|
+
readonly MESSAGE_TARGET_WRAP_LINES: 2;
|
|
748
|
+
readonly MESSAGE_CHAR_WIDTH: 7;
|
|
749
|
+
readonly MESSAGE_LINE_HEIGHT: 20;
|
|
750
|
+
readonly MESSAGE_HORIZONTAL_PADDING: 24;
|
|
751
|
+
readonly MESSAGE_VERTICAL_PADDING: 8;
|
|
752
|
+
readonly ROW_VERTICAL_PADDING: 16;
|
|
753
|
+
readonly NOTE_OFFSET: 24;
|
|
754
|
+
readonly BLOCK_TOP_PADDING: 36;
|
|
755
|
+
readonly BLOCK_BOTTOM_PADDING: 16;
|
|
756
|
+
readonly BLOCK_SIDE_PADDING: 44;
|
|
757
|
+
readonly BLOCK_SECTION_PADDING: 22;
|
|
758
|
+
readonly BLOCK_CONTENT_INSET: 12;
|
|
759
|
+
readonly BLOCK_FRAME_GAP: 12;
|
|
760
|
+
readonly BOX_TOP_INSET: 26;
|
|
761
|
+
readonly BOX_BOTTOM_PADDING: 24;
|
|
762
|
+
};
|
|
763
|
+
//#endregion
|
|
735
764
|
//#region src/mermaid-converter/mermaid-sanitizer.d.ts
|
|
736
765
|
declare function sanitizeMermaidLabels(src: string): string;
|
|
737
766
|
//#endregion
|
|
738
767
|
//#region src/mermaid-converter/mermaid-to-react-flow.d.ts
|
|
739
768
|
declare function convertMermaidToReactFlow(mermaidCode: string): Promise<ReactFlowData>;
|
|
740
769
|
//#endregion
|
|
770
|
+
//#region src/mermaid-converter/sequence-layout.d.ts
|
|
771
|
+
/**
|
|
772
|
+
* Sizes a sequence message box from its own label text, targeting a ~2-line
|
|
773
|
+
* wrap. A fixed width makes long labels ("Return Checkout Session client
|
|
774
|
+
* secret") wrap into 4+ jagged lines that overflow the box and collide with
|
|
775
|
+
* the row below.
|
|
776
|
+
*/
|
|
777
|
+
declare function estimateSequenceMessageBoxSize(label: string): {
|
|
778
|
+
width: number;
|
|
779
|
+
height: number;
|
|
780
|
+
};
|
|
781
|
+
//#endregion
|
|
741
782
|
//#region src/components/data-structure.d.ts
|
|
742
783
|
declare function flattenMetaData(fields: ServerComponentField[], fieldsValues: ServerComponentField[]): Record<string, any>;
|
|
743
784
|
declare function buildMetaData(fields: ServerComponentField[], data: Record<string, any | null>): ServerComponentFieldInput[];
|
|
@@ -765,4 +806,4 @@ type UigOutput = {
|
|
|
765
806
|
//#region src/uig-converter/index.d.ts
|
|
766
807
|
declare function convertUiGraphToMermaid(input: UiGraphInput, options?: UiGraphOptions): UigOutput;
|
|
767
808
|
//#endregion
|
|
768
|
-
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, SchemaAST, SchemaDialect, SchemaUIRepresentation, SequenceDiagramData, SequenceMessage, SequenceParticipant, ServerComponentField, ServerComponentFieldInput, SqlToAstParser, SubgraphInfo, SubgraphLayout, TParsedColumn, TParsedForeignKey, TParsedIndex, TParsedSchema, TParsedTable, TableAST, TableOptionsAST, UniqueConstraintAST, buildMetaData, contextSchema, convertDynamoSchemaToAst, convertJsonSchemaToAst, convertMermaidToReactFlow, convertMermaidToReactFlowWithContext, convertMongoSchemaToAst, convertNoSQLToAst, convertUiGraphToMermaid, flattenMetaData, generateTableNodeId, generateUUID, sanitizeMermaidLabels, syncBaseData };
|
|
809
|
+
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, convertUiGraphToMermaid, estimateSequenceMessageBoxSize, flattenMetaData, generateTableNodeId, generateUUID, sanitizeMermaidLabels, syncBaseData };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as MermaidNode, c as
|
|
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";
|
|
2
2
|
import { t as ComponentInputType } from "./__component-type.CO8FgnQE.mjs";
|
|
3
3
|
import { t as contextSchema } from "./__headless.BLqB7VsJ.mjs";
|
|
4
4
|
import z$1, { z } from "zod";
|
|
@@ -732,12 +732,53 @@ type Options = {
|
|
|
732
732
|
};
|
|
733
733
|
declare function syncBaseData(prev: ReactFlowData, next: ReactFlowData, options?: Options): ReactFlowData;
|
|
734
734
|
//#endregion
|
|
735
|
+
//#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
|
+
declare const SEQUENCE_LAYOUT: {
|
|
739
|
+
readonly COLUMN_WIDTH: 360;
|
|
740
|
+
readonly ROW_HEIGHT: 60;
|
|
741
|
+
readonly HEADER_HEIGHT: 40;
|
|
742
|
+
readonly MESSAGE_NODE_WIDTH: 140;
|
|
743
|
+
readonly MESSAGE_NODE_HEIGHT: 32;
|
|
744
|
+
readonly SELF_LOOP_OFFSET: 48;
|
|
745
|
+
readonly PARTICIPANT_NODE_WIDTH: 10;
|
|
746
|
+
readonly MESSAGE_MAX_WIDTH: 240;
|
|
747
|
+
readonly MESSAGE_TARGET_WRAP_LINES: 2;
|
|
748
|
+
readonly MESSAGE_CHAR_WIDTH: 7;
|
|
749
|
+
readonly MESSAGE_LINE_HEIGHT: 20;
|
|
750
|
+
readonly MESSAGE_HORIZONTAL_PADDING: 24;
|
|
751
|
+
readonly MESSAGE_VERTICAL_PADDING: 8;
|
|
752
|
+
readonly ROW_VERTICAL_PADDING: 16;
|
|
753
|
+
readonly NOTE_OFFSET: 24;
|
|
754
|
+
readonly BLOCK_TOP_PADDING: 36;
|
|
755
|
+
readonly BLOCK_BOTTOM_PADDING: 16;
|
|
756
|
+
readonly BLOCK_SIDE_PADDING: 44;
|
|
757
|
+
readonly BLOCK_SECTION_PADDING: 22;
|
|
758
|
+
readonly BLOCK_CONTENT_INSET: 12;
|
|
759
|
+
readonly BLOCK_FRAME_GAP: 12;
|
|
760
|
+
readonly BOX_TOP_INSET: 26;
|
|
761
|
+
readonly BOX_BOTTOM_PADDING: 24;
|
|
762
|
+
};
|
|
763
|
+
//#endregion
|
|
735
764
|
//#region src/mermaid-converter/mermaid-sanitizer.d.ts
|
|
736
765
|
declare function sanitizeMermaidLabels(src: string): string;
|
|
737
766
|
//#endregion
|
|
738
767
|
//#region src/mermaid-converter/mermaid-to-react-flow.d.ts
|
|
739
768
|
declare function convertMermaidToReactFlow(mermaidCode: string): Promise<ReactFlowData>;
|
|
740
769
|
//#endregion
|
|
770
|
+
//#region src/mermaid-converter/sequence-layout.d.ts
|
|
771
|
+
/**
|
|
772
|
+
* Sizes a sequence message box from its own label text, targeting a ~2-line
|
|
773
|
+
* wrap. A fixed width makes long labels ("Return Checkout Session client
|
|
774
|
+
* secret") wrap into 4+ jagged lines that overflow the box and collide with
|
|
775
|
+
* the row below.
|
|
776
|
+
*/
|
|
777
|
+
declare function estimateSequenceMessageBoxSize(label: string): {
|
|
778
|
+
width: number;
|
|
779
|
+
height: number;
|
|
780
|
+
};
|
|
781
|
+
//#endregion
|
|
741
782
|
//#region src/components/data-structure.d.ts
|
|
742
783
|
declare function flattenMetaData(fields: ServerComponentField[], fieldsValues: ServerComponentField[]): Record<string, any>;
|
|
743
784
|
declare function buildMetaData(fields: ServerComponentField[], data: Record<string, any | null>): ServerComponentFieldInput[];
|
|
@@ -765,4 +806,4 @@ type UigOutput = {
|
|
|
765
806
|
//#region src/uig-converter/index.d.ts
|
|
766
807
|
declare function convertUiGraphToMermaid(input: UiGraphInput, options?: UiGraphOptions): UigOutput;
|
|
767
808
|
//#endregion
|
|
768
|
-
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, SchemaAST, SchemaDialect, SchemaUIRepresentation, SequenceDiagramData, SequenceMessage, SequenceParticipant, ServerComponentField, ServerComponentFieldInput, SqlToAstParser, SubgraphInfo, SubgraphLayout, TParsedColumn, TParsedForeignKey, TParsedIndex, TParsedSchema, TParsedTable, TableAST, TableOptionsAST, UniqueConstraintAST, buildMetaData, contextSchema, convertDynamoSchemaToAst, convertJsonSchemaToAst, convertMermaidToReactFlow, convertMermaidToReactFlowWithContext, convertMongoSchemaToAst, convertNoSQLToAst, convertUiGraphToMermaid, flattenMetaData, generateTableNodeId, generateUUID, sanitizeMermaidLabels, syncBaseData };
|
|
809
|
+
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, convertUiGraphToMermaid, estimateSequenceMessageBoxSize, flattenMetaData, generateTableNodeId, generateUUID, sanitizeMermaidLabels, syncBaseData };
|