@principal-ai/principal-view-react 0.6.10 → 0.6.11
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/README.md +2 -5
- package/dist/components/ConfigurationSelector.js +4 -2
- package/dist/components/ConfigurationSelector.js.map +1 -1
- package/dist/components/EdgeInfoPanel.d.ts.map +1 -1
- package/dist/components/EdgeInfoPanel.js +43 -13
- package/dist/components/EdgeInfoPanel.js.map +1 -1
- package/dist/components/GraphRenderer.d.ts.map +1 -1
- package/dist/components/GraphRenderer.js +133 -83
- package/dist/components/GraphRenderer.js.map +1 -1
- package/dist/components/NodeInfoPanel.d.ts.map +1 -1
- package/dist/components/NodeInfoPanel.js +143 -45
- package/dist/components/NodeInfoPanel.js.map +1 -1
- package/dist/edges/CustomEdge.d.ts.map +1 -1
- package/dist/edges/CustomEdge.js +2 -2
- package/dist/edges/CustomEdge.js.map +1 -1
- package/dist/edges/GenericEdge.d.ts.map +1 -1
- package/dist/edges/GenericEdge.js +2 -2
- package/dist/edges/GenericEdge.js.map +1 -1
- package/dist/hooks/usePathBasedEvents.d.ts +1 -1
- package/dist/hooks/usePathBasedEvents.d.ts.map +1 -1
- package/dist/hooks/usePathBasedEvents.js +9 -9
- package/dist/hooks/usePathBasedEvents.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/nodes/CustomNode.d.ts.map +1 -1
- package/dist/nodes/CustomNode.js +61 -44
- package/dist/nodes/CustomNode.js.map +1 -1
- package/dist/nodes/GenericNode.d.ts.map +1 -1
- package/dist/nodes/GenericNode.js.map +1 -1
- package/dist/utils/animationMapping.d.ts.map +1 -1
- package/dist/utils/animationMapping.js +12 -12
- package/dist/utils/animationMapping.js.map +1 -1
- package/dist/utils/graphConverter.d.ts.map +1 -1
- package/dist/utils/graphConverter.js +23 -17
- package/dist/utils/graphConverter.js.map +1 -1
- package/dist/utils/iconResolver.d.ts.map +1 -1
- package/dist/utils/iconResolver.js +1 -1
- package/dist/utils/iconResolver.js.map +1 -1
- package/package.json +2 -1
- package/src/components/ConfigurationSelector.tsx +5 -5
- package/src/components/EdgeInfoPanel.tsx +79 -37
- package/src/components/GraphRenderer.tsx +526 -365
- package/src/components/NodeInfoPanel.tsx +209 -86
- package/src/edges/CustomEdge.tsx +6 -4
- package/src/edges/GenericEdge.tsx +2 -6
- package/src/hooks/usePathBasedEvents.ts +54 -45
- package/src/index.ts +11 -2
- package/src/nodes/CustomNode.tsx +132 -106
- package/src/nodes/GenericNode.tsx +4 -3
- package/src/stories/AnimationWorkshop.stories.tsx +131 -12
- package/src/stories/CanvasNodeTypes.stories.tsx +898 -0
- package/src/stories/ColorPriority.stories.tsx +20 -10
- package/src/stories/EventDrivenAnimations.stories.tsx +8 -0
- package/src/stories/EventLog.stories.tsx +1 -1
- package/src/stories/GraphRenderer.stories.tsx +23 -10
- package/src/stories/IndustryThemes.stories.tsx +481 -0
- package/src/stories/MultiConfig.stories.tsx +8 -0
- package/src/stories/MultiDirectionalConnections.stories.tsx +8 -0
- package/src/stories/NodeFieldsAudit.stories.tsx +124 -37
- package/src/stories/NodeShapes.stories.tsx +73 -59
- package/src/utils/animationMapping.ts +19 -23
- package/src/utils/graphConverter.ts +35 -19
- package/src/utils/iconResolver.tsx +5 -1
|
@@ -576,24 +576,143 @@ export const AllAnimationsShowcase: Story = {
|
|
|
576
576
|
<ReactFlow
|
|
577
577
|
nodes={[
|
|
578
578
|
// Row 1: Edge animations
|
|
579
|
-
{
|
|
580
|
-
|
|
579
|
+
{
|
|
580
|
+
id: 'flow-1',
|
|
581
|
+
type: 'custom',
|
|
582
|
+
position: { x: 50, y: 50 },
|
|
583
|
+
data: {
|
|
584
|
+
label: 'Flow',
|
|
585
|
+
typeDefinition: processNodeType,
|
|
586
|
+
data: { name: 'Flow Start' },
|
|
587
|
+
} as CustomNodeData,
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
id: 'flow-2',
|
|
591
|
+
type: 'custom',
|
|
592
|
+
position: { x: 200, y: 50 },
|
|
593
|
+
data: {
|
|
594
|
+
label: 'Flow',
|
|
595
|
+
typeDefinition: dataNodeType,
|
|
596
|
+
data: { name: 'Flow End' },
|
|
597
|
+
} as CustomNodeData,
|
|
598
|
+
},
|
|
581
599
|
|
|
582
|
-
{
|
|
583
|
-
|
|
600
|
+
{
|
|
601
|
+
id: 'particle-1',
|
|
602
|
+
type: 'custom',
|
|
603
|
+
position: { x: 280, y: 50 },
|
|
604
|
+
data: {
|
|
605
|
+
label: 'Particle',
|
|
606
|
+
typeDefinition: processNodeType,
|
|
607
|
+
data: { name: 'Particle Start' },
|
|
608
|
+
} as CustomNodeData,
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
id: 'particle-2',
|
|
612
|
+
type: 'custom',
|
|
613
|
+
position: { x: 430, y: 50 },
|
|
614
|
+
data: {
|
|
615
|
+
label: 'Particle',
|
|
616
|
+
typeDefinition: dataNodeType,
|
|
617
|
+
data: { name: 'Particle End' },
|
|
618
|
+
} as CustomNodeData,
|
|
619
|
+
},
|
|
584
620
|
|
|
585
|
-
{
|
|
586
|
-
|
|
621
|
+
{
|
|
622
|
+
id: 'pulse-1',
|
|
623
|
+
type: 'custom',
|
|
624
|
+
position: { x: 510, y: 50 },
|
|
625
|
+
data: {
|
|
626
|
+
label: 'Pulse',
|
|
627
|
+
typeDefinition: processNodeType,
|
|
628
|
+
data: { name: 'Pulse Start' },
|
|
629
|
+
} as CustomNodeData,
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
id: 'pulse-2',
|
|
633
|
+
type: 'custom',
|
|
634
|
+
position: { x: 660, y: 50 },
|
|
635
|
+
data: {
|
|
636
|
+
label: 'Pulse',
|
|
637
|
+
typeDefinition: dataNodeType,
|
|
638
|
+
data: { name: 'Pulse End' },
|
|
639
|
+
} as CustomNodeData,
|
|
640
|
+
},
|
|
587
641
|
|
|
588
642
|
// Row 2: Node animations
|
|
589
|
-
{
|
|
590
|
-
|
|
591
|
-
|
|
643
|
+
{
|
|
644
|
+
id: 'node-pulse',
|
|
645
|
+
type: 'custom',
|
|
646
|
+
position: { x: 100, y: 180 },
|
|
647
|
+
data: {
|
|
648
|
+
label: 'Processing Pulse',
|
|
649
|
+
typeDefinition: processNodeType,
|
|
650
|
+
data: { name: 'Processing' },
|
|
651
|
+
animationType: 'pulse',
|
|
652
|
+
animationDuration: 1500,
|
|
653
|
+
} as CustomNodeData,
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
id: 'node-flash',
|
|
657
|
+
type: 'custom',
|
|
658
|
+
position: { x: 300, y: 180 },
|
|
659
|
+
data: {
|
|
660
|
+
label: 'Success Flash',
|
|
661
|
+
typeDefinition: dataNodeType,
|
|
662
|
+
data: { name: 'Success' },
|
|
663
|
+
animationType: 'flash',
|
|
664
|
+
animationDuration: 1000,
|
|
665
|
+
} as CustomNodeData,
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
id: 'node-shake',
|
|
669
|
+
type: 'custom',
|
|
670
|
+
position: { x: 500, y: 180 },
|
|
671
|
+
data: {
|
|
672
|
+
label: 'Error Shake',
|
|
673
|
+
typeDefinition: processNodeType,
|
|
674
|
+
data: { name: 'Error' },
|
|
675
|
+
animationType: 'shake',
|
|
676
|
+
animationDuration: 500,
|
|
677
|
+
hasViolations: true,
|
|
678
|
+
} as CustomNodeData,
|
|
679
|
+
},
|
|
592
680
|
]}
|
|
593
681
|
edges={[
|
|
594
|
-
{
|
|
595
|
-
|
|
596
|
-
|
|
682
|
+
{
|
|
683
|
+
id: 'e-flow',
|
|
684
|
+
source: 'flow-1',
|
|
685
|
+
target: 'flow-2',
|
|
686
|
+
type: 'custom',
|
|
687
|
+
data: {
|
|
688
|
+
typeDefinition: edgeTypeDefinition,
|
|
689
|
+
animationType: 'flow',
|
|
690
|
+
animationDirection: 'forward',
|
|
691
|
+
animationDuration: 1000,
|
|
692
|
+
} as CustomEdgeData,
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
id: 'e-particle',
|
|
696
|
+
source: 'particle-1',
|
|
697
|
+
target: 'particle-2',
|
|
698
|
+
type: 'custom',
|
|
699
|
+
data: {
|
|
700
|
+
typeDefinition: edgeTypeDefinition,
|
|
701
|
+
animationType: 'particle',
|
|
702
|
+
animationDuration: 1200,
|
|
703
|
+
} as CustomEdgeData,
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
id: 'e-pulse',
|
|
707
|
+
source: 'pulse-1',
|
|
708
|
+
target: 'pulse-2',
|
|
709
|
+
type: 'custom',
|
|
710
|
+
data: {
|
|
711
|
+
typeDefinition: edgeTypeDefinition,
|
|
712
|
+
animationType: 'pulse',
|
|
713
|
+
animationDuration: 1500,
|
|
714
|
+
} as CustomEdgeData,
|
|
715
|
+
},
|
|
597
716
|
]}
|
|
598
717
|
nodeTypes={nodeTypes}
|
|
599
718
|
edgeTypes={edgeTypes}
|