{"id":13559140,"url":"https://github.com/skanaar/nomnoml","last_synced_at":"2025-05-14T02:08:03.900Z","repository":{"id":17629987,"uuid":"20434274","full_name":"skanaar/nomnoml","owner":"skanaar","description":"The sassy UML diagram renderer","archived":false,"fork":false,"pushed_at":"2025-03-31T08:28:35.000Z","size":1501,"stargazers_count":2771,"open_issues_count":14,"forks_count":209,"subscribers_count":40,"default_branch":"master","last_synced_at":"2025-05-10T18:16:56.306Z","etag":null,"topics":["class-diagram","diagram","flowchart","nomnoml","uml"],"latest_commit_sha":null,"homepage":"https://www.nomnoml.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skanaar.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-06-03T07:57:09.000Z","updated_at":"2025-05-07T23:11:31.000Z","dependencies_parsed_at":"2024-11-26T00:16:27.666Z","dependency_job_id":null,"html_url":"https://github.com/skanaar/nomnoml","commit_stats":{"total_commits":381,"total_committers":18,"mean_commits":"21.166666666666668","dds":0.1417322834645669,"last_synced_commit":"08275d9d20edea3e2b6504a5848f506d7d3127e9"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skanaar%2Fnomnoml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skanaar%2Fnomnoml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skanaar%2Fnomnoml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skanaar%2Fnomnoml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skanaar","download_url":"https://codeload.github.com/skanaar/nomnoml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253708793,"owners_count":21951057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["class-diagram","diagram","flowchart","nomnoml","uml"],"created_at":"2024-08-01T12:05:22.423Z","updated_at":"2025-05-14T02:07:58.885Z","avatar_url":"https://github.com/skanaar.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","others","Dessin et diagrammes","Packages"],"sub_categories":["Docker et conteneurs","Data Visualization"],"readme":"nomnoml\n[![npm version](https://badge.fury.io/js/nomnoml.svg)](https://badge.fury.io/js/nomnoml)\n[![Known Vulnerabilities](https://snyk.io/test/npm/nomnoml/badge.svg)](https://snyk.io/test/npm/nomnoml)\n[![web site](https://img.shields.io/badge/web-nomnoml.com-brightgreen)](https://www.nomnoml.com)\n=======\n\nHello, this is [nomnoml](http://www.nomnoml.com), a tool for drawing UML diagrams based on a simple syntax. It tries to keep its syntax visually as close as possible to the generated UML diagram without resorting to ASCII drawings.\n\nCreated by [Daniel Kallin](https://github.com/skanaar) with help from a group of [contributors](https://github.com/skanaar/nomnoml/graphs/contributors).\n\n## Library\n\nThe [nomnoml](https://www.nomnoml.com) javascript library can render diagrams on your web page. The only dependency is [graphre](https://github.com/skanaar/graphre). Install nomnoml using either _npm_ or good old script inclusion.\n\n## SVG output in NodeJS\n\n```\nnpm install nomnoml\n```\n\n```js\nvar nomnoml = require('nomnoml')\nvar src = '[nomnoml] is -\u003e [awesome]'\nconsole.log(nomnoml.renderSvg(src))\n```\n\nIn the SVG output the node name is attached to SVG shapes and `\u003cg\u003e` containers with `data-name` attribute. You can use this to implement interactive diagrams.\n\n```js\ndocument.querySelector('svg').onclick = function (e) {\n  console.log(e.target.closest('g[data-name]')?.attributes['data-name'])\n}\n```\n\n## HTML Canvas rendering target\n\n```html\n\u003cscript src=\"//unpkg.com/graphre/dist/graphre.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"//unpkg.com/nomnoml/dist/nomnoml.js\"\u003e\u003c/script\u003e\n\n\u003ccanvas id=\"target-canvas\"\u003e\u003c/canvas\u003e\n\u003cscript\u003e\n  var canvas = document.getElementById('target-canvas')\n  var source = '[nomnoml] is -\u003e [awesome]'\n  nomnoml.draw(canvas, source)\n\u003c/script\u003e\n```\n\n## Command Line Interface\n\n`npx nomnoml` exposes the SVG renderer with a command-line interface. This mode also supports the `#import: \u003cfilename\u003e` directive for dividing complex diagrams into multiple files.\n\n```\nnpx nomnoml input-file.noml\n```\n\n## Web application\n\nThe [nomnoml](http://www.nomnoml.com) web application is a simple editor with a live preview. It is purely client-side and uses your browser's _localStorage_, so your diagram should be here the next time you visit (but no guarantees).\n\n### Example\n\nThis is how the Decorator pattern can look in nomnoml syntax:\n\n    [\u003cframe\u003eDecorator pattern|\n      [\u003cabstract\u003eComponent||+ operation()]\n      [Client] depends --\u003e [Component]\n      [Decorator|- next: Component]\n      [Decorator] decorates -- [ConcreteComponent]\n      [Component] \u003c:- [Decorator]\n      [Component] \u003c:- [ConcreteComponent]\n    ]\n\n### Association types\n\n    -    association\n    -\u003e   association\n    \u003c-\u003e  association\n    --\u003e  dependency\n    \u003c--\u003e dependency\n    -:\u003e  generalization\n    \u003c:-  generalization\n    --:\u003e implementation\n    \u003c:-- implementation\n    +-   composition\n    +-\u003e  composition\n    o-   aggregation\n    o-\u003e  aggregation\n    -o)  ball and socket\n    o\u003c-) ball and socket\n    -\u003eo  ball and socket\n    --   note\n    -/-  hidden\n\n### Classifier types\n\n    [name]\n    [\u003cabstract\u003e name]\n    [\u003cinstance\u003e name]\n    [\u003creference\u003e name]\n    [\u003cnote\u003e name]\n    [\u003cpackage\u003e name]\n    [\u003cframe\u003e name]\n    [\u003cdatabase\u003e name]\n    [\u003cpipe\u003e name]\n    [\u003cstart\u003e name]\n    [\u003cend\u003e name]\n    [\u003cstate\u003e name]\n    [\u003cchoice\u003e name]\n    [\u003csync\u003e name]\n    [\u003cinput\u003e name]\n    [\u003clollipop\u003e lollipop]\n    [\u003csender\u003e name]\n    [\u003csocket\u003e socket]\n    [\u003creceiver\u003e name]\n    [\u003ctransceiver\u003e name]\n    [\u003cactor\u003e name]\n    [\u003cusecase\u003e name]\n    [\u003clabel\u003e name]\n    [\u003chidden\u003e name]\n    [\u003ctable\u003e name| a | 5 || b | 7]\n\n### Comments\n\nComments are supported at the start of a line.\n\n    //[commented]\n    [not //commented]\n\n### Id attribute\n\nTwo distinct nodes can have the same display name with the id attribute.\n\n    [\u003cactor id=a\u003eUser]\n    [\u003cactor id=b\u003eUser]\n    [a] -- [b]\n\n### Directives\n\n    #import: my-common-styles.nomnoml\n    #arrowSize: 1\n    #bendSize: 0.3\n    #direction: down | right\n    #gutter: 5\n    #edgeMargin: 0\n    #gravity: 1\n    #edges: hard | rounded\n    #background: transparent\n    #fill: #eee8d5; #fdf6e3\n    #fillArrows: false\n    #font: Calibri\n    #fontSize: 12\n    #leading: 1.35\n    #lineWidth: 3\n    #padding: 8\n    #spacing: 40\n    #stroke: #33322E\n    #title: filename\n    #zoom: 1\n    #acyclicer: greedy\n    #ranker: network-simplex | tight-tree | longest-path\n\n### Custom classifier styles\n\nA directive that starts with \".\" define a classifier style. The style is written as a space separated list of modifiers and key/value pairs.\n\n    #.box: fill=#8f8 dashed\n    #.blob: visual=ellipse title=bold\n    [\u003cbox\u003e GreenBox]\n    [\u003cblob\u003e HideousBlob]\n\nModifiers\n\n    dashed\n    empty\n\nKey/value pairs\n\n    fill=(any css color)\n\n    stroke=(any css color)\n\n    align=center\n    align=left\n\n    direction=right\n    direction=down\n\n    visual=actor\n    visual=class\n    visual=database\n    visual=ellipse\n    visual=end\n    visual=frame\n    visual=hidden\n    visual=input\n    visual=none\n    visual=note\n    visual=package\n    visual=pipe\n    visual=receiver\n    visual=rhomb\n    visual=roundrect\n    visual=sender\n    visual=start\n    visual=table\n    visual=transceiver\n\nStyle title and text body with a comma separated list of text modifiers\n\n    title=left,italic,bold\n    body=center,italic,bold\n\nText modifiers\n\n    bold\n    center\n    italic\n    left\n    underline\n\n## Contributing\n\nIf you want to contribute to the project, more info is available in [CONTRIBUTING.md](CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskanaar%2Fnomnoml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskanaar%2Fnomnoml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskanaar%2Fnomnoml/lists"}