{
  "name": "@diagrammo/dgmo",
  "version": "0.44.1",
  "description": "DGMO diagram markup language — parser, renderer, and color system",
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/diagrammo/dgmo.git"
  },
  "homepage": "https://github.com/diagrammo/dgmo#readme",
  "type": "module",
  "engines": {
    "node": ">=20.6"
  },
  "bin": {
    "dgmo": "dist/cli.cjs"
  },
  "main": "./dist/index.cjs",
  "module": "./dist/index.js",
  "types": "./dist/index.d.ts",
  "exports": {
    ".": {
      "import": {
        "types": "./dist/index.d.ts",
        "default": "./dist/index.js"
      },
      "require": {
        "types": "./dist/index.d.cts",
        "default": "./dist/index.cjs"
      }
    },
    "./editor": {
      "import": {
        "types": "./dist/editor.d.ts",
        "default": "./dist/editor.js"
      },
      "require": {
        "types": "./dist/editor.d.cts",
        "default": "./dist/editor.cjs"
      }
    },
    "./highlight": {
      "import": {
        "types": "./dist/highlight.d.ts",
        "default": "./dist/highlight.js"
      },
      "require": {
        "types": "./dist/highlight.d.cts",
        "default": "./dist/highlight.cjs"
      }
    },
    "./advanced": {
      "import": {
        "types": "./dist/advanced.d.ts",
        "default": "./dist/advanced.js"
      },
      "require": {
        "types": "./dist/advanced.d.cts",
        "default": "./dist/advanced.cjs"
      }
    },
    "./pert": {
      "import": {
        "types": "./dist/pert.d.ts",
        "default": "./dist/pert.js"
      },
      "require": {
        "types": "./dist/pert.d.cts",
        "default": "./dist/pert.cjs"
      }
    },
    "./auto": {
      "import": {
        "types": "./dist/auto.d.ts",
        "default": "./dist/auto.mjs"
      },
      "require": {
        "types": "./dist/auto.d.cts",
        "default": "./dist/auto.cjs"
      }
    },
    "./element": {
      "import": {
        "types": "./dist/element.d.ts",
        "default": "./dist/element.mjs"
      },
      "require": {
        "types": "./dist/element.d.cts",
        "default": "./dist/element.cjs"
      }
    },
    "./fonts/*": "./fonts/*"
  },
  "files": [
    "dist/*.js",
    "dist/*.cjs",
    "dist/*.mjs",
    "dist/*.d.ts",
    "dist/*.d.cts",
    "dist/*.css",
    "dist/map-data/*.json",
    "fonts",
    "src",
    "docs/*.md",
    "gallery/fixtures",
    ".claude/commands",
    ".github/copilot-instructions.md",
    ".cursorrules",
    ".windsurfrules",
    "SKILL.md"
  ],
  "sideEffects": [
    "./src/palettes/*.ts",
    "./dist/palettes/*"
  ],
  "scripts": {
    "codegen": "lezer-generator src/editor/dgmo.grammar -o src/editor/dgmo.grammar.js",
    "prebuild": "rm -rf dist && pnpm codegen",
    "build": "DGMO_DEV_RELOAD=1 tsup; _e=$?; rm -rf ../diagrammo-app/node_modules/.vite/deps 2>/dev/null; exit $_e",
    "typecheck": "tsc --noEmit",
    "dev": "DGMO_DEV_RELOAD=1 tsup --watch",
    "pretest": "pnpm codegen",
    "test": "vitest run --coverage",
    "bench:perf": "vitest run --config vitest.perf.config.ts tests/perf-bench.ts",
    "bench:bl": "vitest run --config vitest.bench.config.ts tests/bl-layout-bench.ts",
    "bench:bl-collapse": "vitest run --config vitest.bench.config.ts tests/bl-collapse-bench.ts",
    "bench:bl-options": "vitest run --config vitest.bench.config.ts tests/bl-options.ts",
    "bench:bl-overlap": "vitest run --config vitest.bench.config.ts tests/bl-overlap-debug.ts",
    "bl-gallery": "vitest run --config vitest.bench.config.ts tests/bl-gallery.ts",
    "test:watch": "vitest",
    "test:auto": "pnpm build && vitest run tests/auto.test.ts tests/safe-href.test.ts",
    "sri": "node scripts/sri.mjs",
    "build:map-data": "node scripts/build-map-data.mjs",
    "gallery": "pnpm build && node scripts/generate-gallery.mjs",
    "gallery:snapshot": "pnpm build && node scripts/gallery-snapshot.mjs",
    "gallery:snapshot:update": "pnpm build && node scripts/gallery-snapshot.mjs --update",
    "lint": "eslint .",
    "lint:fix": "eslint . --fix",
    "format": "prettier --write src/",
    "format:check": "prettier --check src/",
    "check:api": "pnpm build && bash scripts/check-api.sh check",
    "check:api:update": "pnpm build && bash scripts/check-api.sh update",
    "check:duplication": "jscpd ./src",
    "check:deadcode": "knip",
    "check:spelling": "cspell \"src/**/*.ts\" \"tests/**/*.ts\"",
    "check:all": "pnpm check:deadcode && pnpm check:spelling && pnpm check:duplication && pnpm check:circular && pnpm check:deps && pnpm check:security && pnpm build && bash scripts/check-api.sh check && pnpm check:publish && pnpm check:types",
    "check:circular": "madge --circular --extensions ts src/ --json | node -e \"const c=JSON.parse(require('fs').readFileSync('/dev/stdin','utf8')); const n=c.length; if(n>7){console.error('New circular deps found ('+n+' > 7 known type-only/dynamic cycles)');process.exit(1)}else if(n>0){console.log(n+' known type-only/dynamic cycles (safe)')}else{console.log('No circular dependencies')}\"",
    "check:deps": "depcheck --ignores='@diagrammo/dgmo,@codemirror/language,@lezer/*,husky,lint-staged,tsup,axe-core,type-coverage'",
    "check:security": "pnpm audit --prod",
    "check:publish": "publint",
    "check:size": "pnpm build && du -sh dist/ && echo '---' && ls -lh dist/*.js dist/*.cjs",
    "check:types": "attw --pack . --ignore-rules no-resolution false-export-default",
    "postinstall": "node -e \"console.log('\\n💡 Claude Code user? Run: dgmo install claude-code\\n')\"",
    "prepare": "husky"
  },
  "dependencies": {
    "@dagrejs/dagre": "^3.0.0",
    "@resvg/resvg-js": "^2.6.2",
    "d3-array": "^3.2.4",
    "d3-cloud": "^1.2.9",
    "d3-geo": "^3.1.1",
    "d3-hierarchy": "^3.1.2",
    "d3-scale": "^4.0.2",
    "d3-selection": "^3.0.0",
    "d3-shape": "^3.2.0",
    "jsdom": "^29.1.1",
    "lz-string": "^1.5.0",
    "topojson-client": "^3.1.0"
  },
  "pnpm": {
    "overrides": {
      "undici": "^7.28.0"
    }
  },
  "devDependencies": {
    "@arethetypeswrong/cli": "^0.18.3",
    "@codemirror/language": "^6.12.3",
    "@eslint/js": "^10.0.1",
    "@lezer/generator": "^1.8.0",
    "@types/d3-array": "^3.2.2",
    "@types/d3-cloud": "^1.2.9",
    "@types/d3-geo": "^3.1.0",
    "@types/d3-hierarchy": "^3.1.7",
    "@types/d3-scale": "^4.0.9",
    "@types/d3-selection": "^3.0.11",
    "@types/d3-shape": "^3.1.8",
    "@types/jsdom": "^28.0.3",
    "@types/topojson-client": "^3.1.5",
    "@vitest/coverage-v8": "^4.1.8",
    "axe-core": "^4.12.0",
    "cspell": "^10.0.1",
    "depcheck": "^1.4.7",
    "esbuild": "^0.28.0",
    "eslint": "^10.4.1",
    "eslint-plugin-security": "^4.0.0",
    "fast-check": "^4.8.0",
    "fflate": "^0.8.3",
    "husky": "^9.1.7",
    "jscpd": "^4.2.4",
    "knip": "^6.15.0",
    "lint-staged": "^17.0.7",
    "madge": "^8.0.0",
    "mapshaper": "0.7.22",
    "prettier": "^3.8.3",
    "publint": "^0.3.21",
    "tsup": "^8.5.1",
    "type-coverage": "^2.29.7",
    "typescript": "^6.0.3",
    "typescript-eslint": "^8.60.1",
    "vitest": "^4.1.8"
  },
  "lint-staged": {
    "*.ts": [
      "eslint --fix",
      "prettier --write"
    ]
  },
  "peerDependencies": {
    "@codemirror/language": "^6.12.3",
    "@lezer/common": "^1.5.1",
    "@lezer/highlight": "^1.2.3",
    "@lezer/lr": "^1.4.8"
  },
  "peerDependenciesMeta": {
    "@codemirror/language": {
      "optional": true
    },
    "@codemirror/state": {
      "optional": true
    },
    "@lezer/common": {
      "optional": true
    },
    "@lezer/highlight": {
      "optional": true
    },
    "@lezer/lr": {
      "optional": true
    }
  }
}
