{"_id":"@bernie_signagent/stom","_rev":"3-ffd00e740b21b678a2f788d88276fd1a","name":"@bernie_signagent/stom","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.1":{"name":"@bernie_signagent/stom","version":"0.1.1","keywords":["sign","template","rendering","typescript"],"author":{"name":"Bill McLean"},"license":"Proprietary","_id":"@bernie_signagent/stom@0.1.1","maintainers":[{"name":"bernie_signagent","email":"bernie@signagent.com"}],"dist":{"shasum":"4e23a484a9cc5ffaac761ffb6a2e335562549a39","tarball":"https://registry.npmjs.org/@bernie_signagent/stom/-/stom-0.1.1.tgz","fileCount":522,"integrity":"sha512-P1RNbTIkeXNspY3qW1WZamGqse/QYYM2iMkrJG6z1NKejLWuzpSShg6VG8HFEkAs/wCrSVpV5LMogn/uaohpfQ==","signatures":[{"sig":"MEYCIQD4Ri14LLtvqPxELh7ORcq8XbUVG16OqinRwZ6hmMBHvgIhANYIEnPdGhoq7CrRawKQ1KW5ZhE+HSO5i2aTeegoP5Du","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":899727},"main":"dist/cjs/index.js","types":"dist/types/index.d.ts","module":"dist/esm/index.js","engines":{"node":">=14.0.0"},"gitHead":"f809efa187c1bc1c2656d39118a699a6c64bcc13","private":false,"scripts":{"docs":"typedoc --out docs/api src","lint":"eslint src test --ext .ts","test":"npm run test:browser","build":"npm run build:clean && npm run build:cjs && npm run build:esm && npm run build:types","format":"prettier --write \"src/**/*.ts\" \"test/**/*.ts\"","prepare":"npm run build","version":"npm run format && git add -A src","build:cjs":"tsc -p tsconfig.build.json --module commonjs --outDir dist/cjs","build:esm":"tsc -p tsconfig.build.json --module es2015 --outDir dist/esm","preversion":"npm run lint && npm test","type-check":"tsc --noEmit","build:clean":"rimraf dist","build:types":"tsc -p tsconfig.build.json --declaration --emitDeclarationOnly --outDir dist/types","postversion":"git push && git push --tags","test:browser":"webpack serve --config webpack.config.mjs"},"_npmUser":{"name":"bernie_signagent","email":"bernie@signagent.com"},"_npmVersion":"10.2.0","description":"A TypeScript library providing a sign template object model for sign templates and rendering","directories":{},"_nodeVersion":"21.1.0","dependencies":{"opentype.js":"^1.3.4","@types/jsdom":"^21.1.7","@svgdotjs/svg.js":"^3.2.4","@types/opentype.js":"^1.3.8"},"publishConfig":{"access":"restricted","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^5.2.0","mocha":"^11.5.0","canvas":"^3.1.0","eslint":"^9.28.0","rimraf":"^6.0.1","ts-jest":"^29.3.4","ts-node":"^10.9.2","typedoc":"^0.28.5","webpack":"^5.99.9","prettier":"^3.5.3","fast-glob":"^3.3.3","ts-loader":"^9.5.2","typescript":"^5.8.3","@types/chai":"^5.2.2","@types/node":"^22.15.29","webpack-cli":"^6.0.1","@types/mocha":"^10.0.10","webpack-dev-server":"^5.2.2","html-webpack-plugin":"^5.6.3","@svgdotjs/svg.resize.js":"^2.0.5","@svgdotjs/svg.select.js":"^4.0.3","@typescript-eslint/parser":"^8.33.1","@svgdotjs/svg.draggable.js":"^3.0.6","@typescript-eslint/eslint-plugin":"^8.33.1"},"_npmOperationalInternal":{"tmp":"tmp/stom_0.1.1_1753117596403_0.652104266819409","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-07-21T17:06:36.220Z","modified":"2025-12-01T12:01:47.159Z","0.1.1":"2025-07-21T17:06:36.587Z"},"author":{"name":"Bill McLean"},"license":"Proprietary","keywords":["sign","template","rendering","typescript"],"description":"A TypeScript library providing a sign template object model for sign templates and rendering","maintainers":[{"email":"bernie@signagent.com","name":"signagent_bernie"}],"readme":"# STOM - Sign Template Object Model\n\nA TypeScript library providing a comprehensive object model for sign templates and rendering. STOM enables developers to create, manipulate, and render sign templates with a clean, type-safe API.\n\n## What is this repository for?\n\n* **Purpose**: STOM (Sign Template Object Model) provides a structured framework for defining, manipulating, and rendering sign templates. It offers a full object model with classes like Template, Side, Layer, Item, and more to represent all aspects of sign design.\n* **Version**: 0.1.1 (Beta)\n* **License**: Proprietary\n\n## Features\n\n* Complete object model for sign templates (Template, Side, Layer, Item)\n* Support for geometric shapes (Rect, Ellipse)\n* Text handling with font management\n* Measurement units conversion (px, in, pt, cm, etc.)\n* SVG-based rendering\n* CSS styling integration\n* Comprehensive unit testing\n\n## Installation\n\n### From Bitbucket Git Repository\n\n```bash\n# Install directly from the repository\nnpm install git@bitbucket.org:signagent/stom.git\n\n# Or with a specific version tag\nnpm install git@bitbucket.org:signagent/stom.git#v0.1.1\n```\n\n### Via package.json\n\n```json\n{\n  \"dependencies\": {\n    \"stom\": \"git@bitbucket.org:signagent/stom.git#master\"\n  }\n}\n```\n\n## Getting Started\n\n```typescript\n// Import the necessary classes\nimport { Template, Side, SAValueUnit, Rect } from 'stom';\n\n// Create a template (e.g., business card)\nconst businessCard = new Template(\n  'BC-001',                         // Template ID\n  new SAValueUnit(3.5, 'in'),       // Width\n  new SAValueUnit(2, 'in')          // Height\n);\n\n// Add a front side\nconst front = new Side('front');\nbusinessCard.sides.add(front);\n\n// Create a rectangle for the background\nconst background = new Rect(\n  new SAValueUnit(0, 'in'),\n  new SAValueUnit(0, 'in'),\n  new SAValueUnit(3.5, 'in'),\n  new SAValueUnit(2, 'in')\n);\n\nbackground.fill = '#ffffff';\nbackground.corners = [8, 8, 8, 8]; // Rounded corners\n\n// Add the rectangle to the front side\nfront.items.add(background);\n```\n\n## Core Classes\n\n* **Template**: The root container for sign templates\n* **Side**: Represents a side of a sign (e.g., front, back)\n* **Layer**: Groups related items together\n* **Item**: Base class for all visual elements\n* **Rect, Ellipse**: Geometric shapes\n* **SAValueUnit**: Handles measurements with different units\n* **Font**: Represents font resources and properties\n\n## How to Get Set Up\n\n### Development Environment\n\n```bash\n# Clone the repository\ngit clone https://bitbucket.org/signagent/stom.git\ncd stom\n\n# Install dependencies\nnpm install\n\n# Build the library\nnpm run build\n```\n\n### Run Tests\n\n```bash\n# Run all tests\nnpm test\n\n# Run browser-based tests\nnpm run test:browser\n```\n\n### Build Documentation\n\n```bash\n# Generate TypeDoc documentation\nnpm run docs\n```\n\n## Dependencies\n\n* **@svgdotjs/svg.js**: SVG manipulation and rendering\n* **opentype.js**: Font handling\n* **TypeScript**: Static typing and compilation\n\n## Code Structure\n\n```\nstom/\n├── src/              # Source code\n├── tests/            # Test cases\n├── dist/             # Compiled output\n│   ├── cjs/          # CommonJS modules\n│   ├── esm/          # ES modules\n│   └── types/        # TypeScript declarations\n└── docs/             # Generated documentation\n```\n\n## Contribution Guidelines\n\n* **Coding Style**: Follow TypeScript best practices and the project's linting rules\n* **Testing**: Write unit tests for all new features\n* **Documentation**: Document public APIs with JSDoc comments\n* **Pull Requests**: Submit PRs with comprehensive descriptions of changes\n\n## Versioning\n\nVersioning follows the format `v{major}.{minor}.{patch}` with tags on the master branch.\n\n## Contact\n\n* **Repository Owner**: Bill McLean\n* **Issues and Feature Requests**: Please use the Bitbucket issue tracker","readmeFilename":"README.md"}