{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "diagram-shapes",
  "framework": "javascript",
  "type": "registry:component",
  "component": "Diagram",
  "variant": "shapes",
  "dependencies": [
    "@syncfusion/ej2-diagrams"
  ],
  "description": "Shape gallery showcasing basic diagram nodes, icons, templates, and glossy styling.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/javascript/llms.txt",
    "skillPack": "syncfusion/javascript-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/javascript/diagram-shapes.md"
  },
  "files": [
    {
      "target": "src/components/diagram-shapes/diagram.html",
      "content": "<div class=\"control-section diagram-shapes\" style=\"width: 100%\">\n\n        <div id=\"container\"></div>\n    </div>\n"
    },
    {
      "target": "src/components/diagram-shapes/diagram.ts",
      "content": "import type { NodeModel, TextModel, FlowShapes } from '@syncfusion/ej2-diagrams';\nimport {\n    Diagram, BpmnDiagrams, FlowShape, NodeConstraints, SnapConstraints\n} from '@syncfusion/ej2-diagrams';\n\nexport interface GalleryInfo {\n    type: string;\n    shape: string;\n    text: string;\n}\n\nDiagram.Inject(BpmnDiagrams);\n\n// Function to create a basic shape object\nfunction getBasicShape(shapeType: string, annotations: { content: string }[]): any {\n    return {\n        shape: {\n            type: 'Basic',\n            shape: shapeType\n        },\n        annotations\n    };\n}\n\n// Define basic shape models\nlet basicShapeModel: any[] = [\n    { \n        shape: { type: 'Text', content: 'Basic Shapes' },\n        constraints: NodeConstraints.PointerEvents,\n        style: { fontSize: 16, fill: 'None', fontFamily: 'sans-serif', bold: true, strokeWidth: 0 },\n    },\n    getBasicShape('Rectangle', [{ content: 'Rectangle' }]),\n    getBasicShape('Ellipse', [{ content: 'Ellipse' }]),\n    getBasicShape('Triangle', [{ content: 'Triangle' }]),\n    getBasicShape('Plus', [{ content: 'Plus' }]),\n    getBasicShape('Star', [{ content: 'Star' }]),\n    getBasicShape('Pentagon', [{ content: 'Pentagon' }]),\n    getBasicShape('Heptagon', [{ content: 'Heptagon' }]),\n    getBasicShape('Octagon', [{ content: 'Octagon' }]),\n    getBasicShape('Trapezoid', [{ content: 'Trapezoid' }]),\n    getBasicShape('Decagon', [{ content: 'Decagon' }]),\n    getBasicShape('RightTriangle', [{ content: 'Right Triangle' }]),\n    getBasicShape('Parallelogram', [{ content: 'Parallelogram' }])\n];\n\n\n//Function to get flowshapes.\nfunction createFlowShape(shapeType: any,content: string): NodeModel {\n    let flowshape: NodeModel = {\n        shape: { type: 'Flow', shape: shapeType },\n    annotations:[{content:content}] };\n    return flowshape;\n  }\n\n  //Initialize the flowshapes for the symbol palatte\n  let flowShapes: NodeModel[] = [\n    { shape: { type: 'Text', content: 'Flow Shapes' }, constraints: NodeConstraints.PointerEvents,\n    style: { fontSize: 16, fill: 'None', fontFamily: 'sans-serif', bold: true, strokeWidth: 0 }\n  },\n  createFlowShape('Terminator', 'Terminator'),\n  createFlowShape('Process', 'Process'),\n  createFlowShape('Decision', 'Decision'),\n  createFlowShape('Document', 'Document'),\n  createFlowShape('PreDefinedProcess', 'Predefined Process'),\n  createFlowShape('PaperTap', 'Paper Tape'),\n  createFlowShape('DirectData', 'Direct Data'),\n  createFlowShape('SequentialData', 'Direct Data'),\n  createFlowShape('Sort', 'Sort'),\n  createFlowShape('MultiDocument', 'Multi-Document'),\n  createFlowShape('Collate', 'Collate'),\n  createFlowShape('SummingJunction', 'Summing Junction'),\n  createFlowShape('Or', 'Or'),\n  createFlowShape('InternalStorage', 'Internal Storage'),\n  createFlowShape('Extract', 'Extract'),\n  createFlowShape('ManualOperation', 'Manual Operation'),\n  createFlowShape('Merge', 'Merge'),\n  createFlowShape('OffPageReference', 'Off-Page Reference'),\n  createFlowShape('SequentialAccessStorage', 'Sequential Access Storage'),\n  createFlowShape('Data', 'Data'),\n  createFlowShape('Card', 'Card')\n  ];\n\n// Function to create BPMN shape\nfunction getBpmnShape(shapeType: string, annotations: { content: string }[], event?: { event: string, trigger: string }): any {\n  const shape: any = {\n      type: 'Bpmn',\n      shape: shapeType\n  };\n  if (event) {\n      shape.event = event;\n  }\n  return {\n      shape,\n      annotations\n  };\n}\n\n// Define BPMN shape models\nlet bpmnShapeModel: any[] = [\n  { \n      shape: { type: 'Text', content: 'BPMN Shapes' },\n      constraints: NodeConstraints.PointerEvents,\n      style: { fontSize: 16, fill: 'none', fontFamily: 'sans-serif', bold: true, strokeWidth: 0 },\n  },\n  getBpmnShape('Event', [{ content: 'Start Event' }], { event: 'Start', trigger: 'None' }),\n  getBpmnShape('Event', [{ content: 'Intermediate Event' }], { event: 'Intermediate', trigger: 'None' }),\n  getBpmnShape('Event', [{ content: 'End Event' }], { event: 'End', trigger: 'None' }),\n  getBpmnShape('Gateway', [{ content: 'Gateway' }]),\n  {\n    shape: { type: 'Bpmn', shape: 'Activity', activity: { activity: 'Task' } },\n    annotations: [{ content: 'Task' }]\n  },\n  {\n    shape: {type: 'Bpmn', shape: 'Activity', activity: {\n            activity: 'SubProcess',\n            subProcess: {\n                type: 'Transaction', transaction: {\n                    success: { visible: false }, failure: { visible: false }, cancel: { visible: false }}\n            }}},\n    annotations: [{ content: 'Transaction' }]\n  },\n  getBpmnShape('Message', [{ content: 'Message' }]),\n  getBpmnShape('DataObject', [{ content: 'Data Object' }]),\n  getBpmnShape('DataSource', [{ content: 'Data Source' }]),\n  getBpmnShape('Group', [{ content: 'Group' }]),\n  getBpmnShape('TextAnnotation', [{ content: 'Text Annotation' }])\n];\n\n\n//create and return the Nodes collection.\nfunction getNodes(): NodeModel[] {\n    let nodes1: NodeModel[] = basicShapeModel.concat(flowShapes).concat(bpmnShapeModel);\n    let offsetx: number = 60;\n    let offsety: number = 50;\n    let count: number = 1;\n    for (let i: number = 0; i < nodes1.length; i++) {\n        let node: NodeModel = nodes1[i];\n        node.width = 40;\n        node.height = 40;\n        if (node.shape!.type === 'Flow') {\n            let shapeType: FlowShapes = (node.shape as FlowShape).shape;\n            if (shapeType === 'Process' || shapeType === 'Terminator') {\n                node.height = 20;\n            } else if (shapeType === 'Decision') {\n                node.height = 35;\n            } else if (shapeType === 'Document' || shapeType === 'DirectData' ||\n                shapeType === 'MultiDocument' || shapeType === 'PreDefinedProcess') {\n                node.height = 30;\n            }\n        }\n        node.offsetX = offsetx;\n        node.offsetY = offsety;\n        if (!(node.shape!.type === 'Text')) {\n            let label = node.annotations![0];\n            label.verticalAlignment = 'Top';\n            label.offset = { y: 1 };\n            label.margin = { top: 10 };\n            offsetx += 90;\n            if (count % 10 === 0) {\n                offsety = offsety + 100;\n                offsetx = 60;\n            }\n            count++;\n        }\n        if (node.shape!.type === 'Text') {\n            offsetx = 60;\n            offsety +=50;\n            count = 1;\n            node.width = 150;\n            node.height = 100;\n            node.offsetX = 90;\n            if (!((node.shape as TextModel).content === 'Basic Shapes')) {\n                node.offsetX = 90;\n                node.offsetY = offsety + 50;\n                offsety = offsety + 100;\n            }\n        }\n    }\n    return nodes1;\n}\n\nexport function initShapesDiagram(): void {\n    let objects: NodeModel[] = getNodes();\n    //Initialize diagram control\n    let diagram: Diagram = new Diagram({\n        width: '100%', height: '800px', snapSettings: { constraints: SnapConstraints.None },\n        nodes: objects,\n    });\n    diagram.appendTo('#container');\n    diagram.fitToPage({ mode: 'Height' });\n}\n"
    }
  ]
}