{"_id":"@calpano/ddot-highlightjs","_rev":"2-08fc7418987c1a3e5f7e02d82c28c2db","name":"@calpano/ddot-highlightjs","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@calpano/ddot-highlightjs","version":"0.1.0","keywords":["ddot.it","highlightjs","highlight.js","syntax-highlighting","knowledge-graph"],"license":"MIT","_id":"@calpano/ddot-highlightjs@0.1.0","maintainers":[{"name":"xamde","email":"support@calpano.com"}],"homepage":"https://ddot.it","bugs":{"url":"https://github.com/Calpano/ddot.it-syntax-tools/issues"},"dist":{"shasum":"8e42ecae5047ed5f5d66f4aa647e05d923bf6522","tarball":"https://registry.npmjs.org/@calpano/ddot-highlightjs/-/ddot-highlightjs-0.1.0.tgz","fileCount":3,"integrity":"sha512-A6M5t3haHhY3t/7tkalgng636e6pGESLWWkQWszN6pfOPs0RoYrkahFVAz6s/P9zEQBrG6NQEg/a4iZWPLH1UQ==","signatures":[{"sig":"MEUCIHzRM83YYCR0chCZr9Z5Z3qPwOdGCxJj/enV8i547krkAiEA240b6BWmGmC9oVJeYFRogclUj6Ivpt73PccFG1CM2jM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10636},"main":"./index.js","type":"module","exports":{".":"./index.js"},"gitHead":"2bb1bd28555bb0d500e347f3d83a04707985b33c","_npmUser":{"name":"xamde","email":"support@calpano.com"},"repository":{"url":"git+https://github.com/Calpano/ddot.it-syntax-tools.git","type":"git","directory":"highlightjs"},"_npmVersion":"11.12.1","description":"highlight.js language definition for ddot.it (Knowledge Graph Notation).","directories":{},"_nodeVersion":"25.9.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"highlight.js":">=11.0.0"},"_npmOperationalInternal":{"tmp":"tmp/ddot-highlightjs_0.1.0_1778233795752_0.7681049081245317","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@calpano/ddot-highlightjs","version":"0.1.1","description":"highlight.js language definition for ddot.it (Knowledge Graph Notation).","license":"MIT","type":"module","main":"./index.js","exports":{".":"./index.js"},"keywords":["ddot.it","highlightjs","highlight.js","syntax-highlighting","knowledge-graph"],"peerDependencies":{"highlight.js":">=11.0.0"},"repository":{"type":"git","url":"git+https://github.com/Calpano/ddot.it-syntax-tools.git","directory":"highlightjs"},"homepage":"https://ddot.it","publishConfig":{"access":"public"},"gitHead":"4ebb5bb2eb2965add6f8a690a48a8ad938119966","_id":"@calpano/ddot-highlightjs@0.1.1","bugs":{"url":"https://github.com/Calpano/ddot.it-syntax-tools/issues"},"_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-X5n7EAnloHkgItkS8bVBpnSvfKVOfF72h8rGmU1RuBI1PlNhuNicAlranvo1Sbexhs1OGo2CLa8nN+2sxxWF5w==","shasum":"d228c5a1259166c84fa9465e9b1f80381252d2ec","tarball":"https://registry.npmjs.org/@calpano/ddot-highlightjs/-/ddot-highlightjs-0.1.1.tgz","fileCount":3,"unpackedSize":10636,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@calpano%2fddot-highlightjs@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDbhJKmrHlSKPakA+al1I1LP7j3pZmx7ncHt/pGZx9nIAIgPmU5B6OzphBr9THpCrVNRh2nZ2twg2U99ZGMQThObks="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:0ff6e7ba-6367-40f3-9841-ab986780283d"}},"directories":{},"maintainers":[{"name":"xamde","email":"support@calpano.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ddot-highlightjs_0.1.1_1778311035115_0.39307828085657803"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-08T09:49:55.692Z","modified":"2026-05-09T07:17:15.544Z","0.1.0":"2026-05-08T09:49:55.901Z","0.1.1":"2026-05-09T07:17:15.244Z"},"bugs":{"url":"https://github.com/Calpano/ddot.it-syntax-tools/issues"},"license":"MIT","homepage":"https://ddot.it","keywords":["ddot.it","highlightjs","highlight.js","syntax-highlighting","knowledge-graph"],"repository":{"type":"git","url":"git+https://github.com/Calpano/ddot.it-syntax-tools.git","directory":"highlightjs"},"description":"highlight.js language definition for ddot.it (Knowledge Graph Notation).","maintainers":[{"name":"xamde","email":"support@calpano.com"}],"readme":"# @calpano/ddot-highlightjs\n\n[highlight.js](https://highlightjs.org) language definition for **ddot.it**\n— a minimal text format for typed knowledge graphs.\n\n## Install\n\n```sh\nnpm install @calpano/ddot-highlightjs highlight.js\n```\n\n`highlight.js` is a peer dependency.\n\n## Use\n\n```js\nimport hljs from 'highlight.js/lib/core';\nimport ddot from '@calpano/ddot-highlightjs';\n\nhljs.registerLanguage('ddot.it', ddot);\n\nconst html = hljs.highlight(code, { language: 'ddot.it' }).value;\n```\n\nAliases registered: `ddot.it`, `ddot`, `ddotit`.\n\n## Theme styling\n\nThis language uses ddot-specific scopes (`hljs-subject`, `hljs-relation`,\n`hljs-object`, `hljs-operator`, `hljs-command`, `hljs-meta-delim`,\n`hljs-meta-operator`, `hljs-meta-relation`, `hljs-meta-object`,\n`hljs-meta-text`, `hljs-disabled`). To get reasonable colours from a\ngeneric hljs theme, supply CSS that maps these to themed properties:\n\n```css\n.hljs-subject  { color: var(--hljs-name); font-weight: 600; }\n.hljs-relation { color: var(--hljs-attr); }\n.hljs-object   { color: var(--hljs-string); }\n.hljs-operator { color: var(--hljs-punctuation); }\n.hljs-command  { color: var(--hljs-keyword); }\n.hljs-meta-delim, .hljs-meta-operator,\n.hljs-meta-relation, .hljs-meta-object,\n.hljs-meta-text { color: var(--hljs-comment); font-style: italic; }\n.hljs-disabled { color: var(--hljs-comment); opacity: 0.6; }\n```\n\n## Conformance\n\nThe lexer is verified against the cross-implementation golden corpus —\nidentical to the TextMate, Shiki, Pygments, Chroma, and Rouge ports. See\n[`tools/conformance-highlightjs.mjs`](https://github.com/Calpano/ddot.it-syntax-tools/blob/main/tools/conformance-highlightjs.mjs).\n\n```sh\nnpm run conformance:highlightjs\n```\n\n## Implementation note\n\nhighlight.js's bygroups (`match: [r1,r2,...]` + `scope: {1:'a',2:'b'}`)\nkeys scope by **array position**, not capture-group index. There's no way\nto express \"this slot is either a command OR a name\" with one rule — so\neach line shape is split into two variants (command-subject vs\nname-subject). The corpus only ever places commands in the subject slot\n(or as standalone off/on markers), so this stays tractable.\n\nA subtler hljs quirk: in a begin/end mode, the inner `contains` rules can\nmatch the end marker before the END regex fires. Our `DISABLED` mode's\ninner content rule uses a negative lookahead `(?![ \\t]*(?:ddot\\.it\\/on|!!on)[ \\t]*$)`\nto avoid swallowing the on-marker line.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}