{"_id":"@antinna/blogger-theme","_rev":"5-ebab3e21a1cfe31b2461c0b20f714af7","name":"@antinna/blogger-theme","dist-tags":{"latest":"5.0.0"},"versions":{"1.0.0":{"name":"@antinna/blogger-theme","version":"1.0.0","keywords":["blogger","blogspot","theme","template","xml","tsx","jsx","typescript"],"author":{"name":"Manishmg3994"},"license":"MIT","_id":"@antinna/blogger-theme@1.0.0","maintainers":[{"name":"manish3994","email":"manishgautammg7@gmail.com"},{"name":"manishmg3994","email":"manishgautammg3994@gmail.com"}],"homepage":"https://github.com/Antinna/blogger-theme#readme","bugs":{"url":"https://github.com/Antinna/blogger-theme/issues"},"bin":{"blogger-theme":"dist/cli.js"},"dist":{"shasum":"7a65f2c4d0853574cb1d1687eb8c69b55aa532cc","tarball":"https://registry.npmjs.org/@antinna/blogger-theme/-/blogger-theme-1.0.0.tgz","fileCount":47,"integrity":"sha512-o8u8NviJfKUgAC9r3TvJtRVBRGnG6HOvykDhJ0Tltjz13d+rAfJ65ZFOsvOKSuYgBNLztN871srJcUqVtah0hA==","signatures":[{"sig":"MEQCICXtzUrODf9shQt9rixrv1lZxrPQeoIi7MGIpnubY2qQAiA+9LpwudpOxdXuBBCQ+hYd2qXRIpN08HfW6BKpHwv8mQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":155452},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./jsx-runtime":{"types":"./dist/jsx-runtime.d.ts","import":"./dist/jsx-runtime.js"},"./jsx-dev-runtime":{"types":"./dist/jsx-dev-runtime.d.ts","import":"./dist/jsx-dev-runtime.js"}},"funding":{"url":"https://github.com/sponsors/Manishmg3994","type":"github"},"gitHead":"a2b91f5c559b27960bc30d8f9a046e5cc6dad791","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"tsc","test-watch":"vitest"},"_npmUser":{"name":"manish3994","email":"manishgautammg7@gmail.com"},"repository":{"url":"git+https://github.com/Antinna/blogger-theme.git","type":"git"},"_npmVersion":"11.14.1","description":"A lightweight TypeScript/ESNext library for generating Blogger theme XML using a clean, declarative component API with TSX support.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"esbuild":"^0.28.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.6.1","typescript":"^7.1.0-dev.20260726.1","@types/node":"^26.1.1"},"_npmOperationalInternal":{"tmp":"tmp/blogger-theme_1.0.0_1785078831389_0.4893079009686456","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@antinna/blogger-theme","version":"2.0.0","keywords":["blogger","blogspot","theme","template","xml","tsx","jsx","typescript"],"author":{"name":"Manishmg3994"},"license":"MIT","_id":"@antinna/blogger-theme@2.0.0","maintainers":[{"name":"manish3994","email":"manishgautammg7@gmail.com"},{"name":"manishmg3994","email":"manishgautammg3994@gmail.com"}],"homepage":"https://github.com/Antinna/blogger-theme#readme","bugs":{"url":"https://github.com/Antinna/blogger-theme/issues"},"bin":{"blogger-theme":"dist/cli.js"},"dist":{"shasum":"b32021a943fb84a1564ee91104221b1db5d2e70c","tarball":"https://registry.npmjs.org/@antinna/blogger-theme/-/blogger-theme-2.0.0.tgz","fileCount":47,"integrity":"sha512-EHSjXxYQSRLoI33CY1U8ZkYvlwLX0pda1BoTZRXCFCjsXtkKNq7YKvFqSzw4h1V5z5HVx/YecgNnjuNt2UsPNw==","signatures":[{"sig":"MEUCIGNcZmFs0JXeC4ZESz6i0PbfFM/phR4PE0YEvhCZq+itAiEAwakD11uPA2H/YeDNbbq4UXlEbNMiUiWxbLLJwqt6rK0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":155899},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./jsx-runtime":{"types":"./dist/jsx-runtime.d.ts","import":"./dist/jsx-runtime.js"},"./jsx-dev-runtime":{"types":"./dist/jsx-dev-runtime.d.ts","import":"./dist/jsx-dev-runtime.js"}},"funding":{"url":"https://github.com/sponsors/Manishmg3994","type":"github"},"gitHead":"a2b91f5c559b27960bc30d8f9a046e5cc6dad791","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"tsc","test-watch":"vitest"},"_npmUser":{"name":"manish3994","email":"manishgautammg7@gmail.com"},"repository":{"url":"git+https://github.com/Antinna/blogger-theme.git","type":"git"},"_npmVersion":"11.14.1","description":"A lightweight TypeScript/ESNext library for generating Blogger theme XML using a clean, declarative component API with TSX support.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"esbuild":"^0.28.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.6.1","typescript":"^7.1.0-dev.20260726.1","@types/node":"^26.1.1"},"_npmOperationalInternal":{"tmp":"tmp/blogger-theme_2.0.0_1785079170721_0.4678999045105072","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@antinna/blogger-theme","version":"3.0.0","keywords":["blogger","blogspot","theme","template","xml","tsx","jsx","typescript"],"author":{"name":"Manishmg3994"},"license":"MIT","_id":"@antinna/blogger-theme@3.0.0","maintainers":[{"name":"manish3994","email":"manishgautammg7@gmail.com"},{"name":"manishmg3994","email":"manishgautammg3994@gmail.com"}],"homepage":"https://github.com/Antinna/blogger-theme#readme","bugs":{"url":"https://github.com/Antinna/blogger-theme/issues"},"bin":{"blogger-theme":"dist/cli.js"},"dist":{"shasum":"a35fd84ac75e20415c04879f16b9411baf887610","tarball":"https://registry.npmjs.org/@antinna/blogger-theme/-/blogger-theme-3.0.0.tgz","fileCount":23,"integrity":"sha512-2viat/wlbtlQqmBrRSm+KNJ4cqEwDmegwqeervzTQlZ8m0o+a4drncfyn4ppmBs/64DjT2HmVLbesY0b3lNL6g==","signatures":[{"sig":"MEYCIQCFkAAqqLTnahJ+CvdGxo/xQQvkn/6u7Sh44xatxqDAqQIhAPxo0NEaN6I7kKjrk2Fd7OnHfVJfEP8Coygl0fEof+Kg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":80887},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./jsx-runtime":{"types":"./dist/jsx-runtime.d.ts","import":"./dist/jsx-runtime.js"},"./jsx-dev-runtime":{"types":"./dist/jsx-dev-runtime.d.ts","import":"./dist/jsx-dev-runtime.js"}},"funding":{"url":"https://github.com/sponsors/Manishmg3994","type":"github"},"gitHead":"035a34e7b39e9bbf9d7eae46f75f2650fedb15e7","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"tsc","test-watch":"vitest"},"_npmUser":{"name":"manish3994","email":"manishgautammg7@gmail.com"},"repository":{"url":"git+https://github.com/Antinna/blogger-theme.git","type":"git"},"_npmVersion":"11.14.1","description":"A lightweight TypeScript/ESNext library for generating Blogger theme XML using a clean, declarative component API with TSX support.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"esbuild":"^0.28.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.6.1","typescript":"^7.1.0-dev.20260726.1","@types/node":"^26.1.1"},"_npmOperationalInternal":{"tmp":"tmp/blogger-theme_3.0.0_1785079792120_0.2527275585598643","host":"s3://npm-registry-packages-npm-production"}},"4.0.0":{"name":"@antinna/blogger-theme","version":"4.0.0","keywords":["blogger","blogspot","theme","template","xml","tsx","jsx","typescript"],"author":{"name":"Manishmg3994","email":"manishgautammg7@gmail.com"},"license":"MIT","_id":"@antinna/blogger-theme@4.0.0","maintainers":[{"name":"manish3994","email":"manishgautammg7@gmail.com"},{"name":"manishmg3994","email":"manishgautammg3994@gmail.com"}],"homepage":"https://github.com/Antinna/blogger-theme#readme","bugs":{"url":"https://github.com/Antinna/blogger-theme/issues"},"bin":{"blogger-theme":"dist/cli.js"},"dist":{"shasum":"3273e01295ce9625f2aee52aaa5152a06b28ec55","tarball":"https://registry.npmjs.org/@antinna/blogger-theme/-/blogger-theme-4.0.0.tgz","fileCount":25,"integrity":"sha512-DxkMo/xRfD7grgvyRCrvNmeenjzvh/e6Iu8DlmVIB5brBAkcHNGNHSSwlSnXDAeC08cuFxqb00+OSGX6tfKv3w==","signatures":[{"sig":"MEYCIQCu3XXrv6bQsw4dXXYRzOzz+GwQWfwqIi2XVgOcgnLpfAIhAIdVdW+YxfMbSKRZ5BOttj0UlZSlzMQ2jR93s7w7DnGu","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":138151},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./jsx-runtime":{"types":"./dist/jsx-runtime.d.ts","import":"./dist/jsx-runtime.js"},"./jsx-dev-runtime":{"types":"./dist/jsx-dev-runtime.d.ts","import":"./dist/jsx-dev-runtime.js"}},"funding":{"url":"https://github.com/sponsors/Manishmg3994","type":"github"},"gitHead":"0da8b1e19d0c383cd8ad9cb6fdae7dc20908d45b","scripts":{"test":"vitest run","build":"tsc","prepack":"npm run build","test:watch":"vitest"},"_npmUser":{"name":"manish3994","email":"manishgautammg7@gmail.com"},"repository":{"url":"git+https://github.com/Antinna/blogger-theme.git","type":"git"},"_npmVersion":"11.14.1","description":"A lightweight TypeScript/ESNext library for generating Blogger theme XML using a clean, declarative component API with TSX support.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"esbuild":"^0.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^1.4.0","typescript":"^5.3.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/blogger-theme_4.0.0_1785148484449_0.3316441874862115","host":"s3://npm-registry-packages-npm-production"}},"5.0.0":{"name":"@antinna/blogger-theme","version":"5.0.0","description":"A lightweight TypeScript/ESNext library for generating Blogger theme XML using a clean, declarative component API with TSX support.","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","bin":{"blogger-theme":"dist/cli.js"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Antinna/blogger-theme.git"},"bugs":{"url":"https://github.com/Antinna/blogger-theme/issues"},"homepage":"https://github.com/Antinna/blogger-theme#readme","funding":{"type":"github","url":"https://github.com/sponsors/Manishmg3994"},"exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"},"./jsx-runtime":{"import":"./dist/jsx-runtime.js","types":"./dist/jsx-runtime.d.ts"},"./jsx-dev-runtime":{"import":"./dist/jsx-dev-runtime.js","types":"./dist/jsx-dev-runtime.d.ts"}},"scripts":{"build":"tsc","test":"vitest run","test:watch":"vitest"},"dependencies":{"esbuild":"^0.24.0"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.3.0","vitest":"^1.4.0"},"keywords":["blogger","blogspot","theme","template","xml","tsx","jsx","typescript"],"author":{"name":"Manishmg3994"},"license":"MIT","gitHead":"c135ff6e48fc75d4529079f9fc420820920a3400","_id":"@antinna/blogger-theme@5.0.0","_nodeVersion":"24.15.0","_npmVersion":"11.14.1","dist":{"integrity":"sha512-typCwzlzXJHi/tfwyfQwb1HkzwT4KGWrqgi3+WrNP/0bmihlTD4uxvj5kvTMhro1n3BJSdWXEkCTzj8S9mebRQ==","shasum":"23c74d38164b08026e23561733d6a8ffee32f13a","tarball":"https://registry.npmjs.org/@antinna/blogger-theme/-/blogger-theme-5.0.0.tgz","fileCount":27,"unpackedSize":145886,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDosE/bOYG3hHGP9rD5RKQtQY+pgLY0UymbLZ4cb9Vo+wIgdetjRf3wGVIKgZ+Scc25gTAMOwpHVjMqPbfAdlo6Q5M="}]},"_npmUser":{"name":"manish3994","email":"manishgautammg7@gmail.com"},"directories":{},"maintainers":[{"name":"manish3994","email":"manishgautammg7@gmail.com"},{"name":"manishmg3994","email":"manishgautammg3994@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/blogger-theme_5.0.0_1785259607516_0.9301107604302012"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-26T15:13:51.242Z","modified":"2026-07-28T17:26:47.862Z","1.0.0":"2026-07-26T15:13:51.533Z","2.0.0":"2026-07-26T15:19:30.841Z","3.0.0":"2026-07-26T15:29:52.256Z","4.0.0":"2026-07-27T10:34:44.593Z","5.0.0":"2026-07-28T17:26:47.670Z"},"bugs":{"url":"https://github.com/Antinna/blogger-theme/issues"},"author":{"name":"Manishmg3994"},"license":"MIT","homepage":"https://github.com/Antinna/blogger-theme#readme","keywords":["blogger","blogspot","theme","template","xml","tsx","jsx","typescript"],"repository":{"type":"git","url":"git+https://github.com/Antinna/blogger-theme.git"},"description":"A lightweight TypeScript/ESNext library for generating Blogger theme XML using a clean, declarative component API with TSX support.","maintainers":[{"name":"manish3994","email":"manishgautammg7@gmail.com"},{"name":"manishmg3994","email":"manishgautammg3994@gmail.com"}],"readme":"# 🚀 @antinna/blogger-theme (TypeScript)\r\n\r\nA lightweight TypeScript & ESNext library for generating Blogger (Blogspot) theme XML using a clean, declarative component API with full TSX/JSX and Builder support.\r\n\r\n---\r\n\r\n## Features\r\n\r\n- **Declarative theme authoring** in TypeScript using custom TSX/JSX elements or native Builder classes.\r\n- **Dual API Support (Option C):** Use standard OOP constructors (`new BSection(...)`), functional builders, or standard TSX layouts.\r\n- **XML-Safe rendering:** Automatic XML entity escaping and removal of XML 1.0 control characters.\r\n- **TypeScript 5+ and ESNext-native:** Fully typed, clean, modern ES module structure.\r\n- **On-Demand client script compilation:** Compile, bundle, and minify client-side TypeScript/JavaScript to self-invoking IIFEs inside Blogger templates using `esbuild` at render-time.\r\n- **Inline CSS Object Compilation:** Pass standard style objects (like `style={{ marginTop: '10px' }}`) inside TSX and have them automatically compiled to standard inline style strings.\r\n- **Automated CSS Bundling:** Organize layout styles inside standard external `.css` files and pass them directly to `BSkin` or `BTemplateSkin` to have them dynamically compiled, bundled (resolving `@import` rules), and minified using `esbuild` natively.\r\n<!-- - **Decoupled shared types:** Full integration with `@antinna/types-blogger-react` to prevent type collisions and provide absolute parity with React in mixed workspaces. -->\r\n- **Validation and Devtools:** Pre-render diagnostics checking Blogger layouts for nesting errors (such as nested sections, widgets outside sections, and duplicate IDs) as well as XHTML structure alerts.\r\n- **Direct rendering:** Directly render any component using `.render()`.\r\n\r\n---\r\n\r\n## Packages in This Repo\r\n\r\n1. **`@antinna/blogger-theme`** (Root package) - The compiler, devtool, CLI, automatic JSX runtime, and components.\r\n<!-- 2. **`@antinna/types-blogger-react`** (`packages/types-blogger-react`) - Decoupled, DRY typescript typings extending standard React to support Blogger layouts natively. -->\r\n\r\n---\r\n\r\n<!-- ## AI Agent Skills (Developer Guides)\r\n\r\nTo help developers and AI agents build awesome Blogger templates easily, we have prepared comprehensive guides:\r\n\r\n- [Skill 1: Core Declarative Templating](./ai-skills/1-core-templating.md)\r\n- [Skill 2: Styling and CSS Bundling](./ai-skills/2-styling-and-css.md)\r\n- [Skill 3: React 19 Integration & Code Bundling](./ai-skills/3-react-integration.md)\r\n- [Skill 4: Blogger Structural Validation & Diagnostics](./ai-skills/4-validation-and-diagnostics.md)\r\n- [Skill 5: CLI and Watch-Compiler](./ai-skills/5-cli-and-watch.md) -->\r\n\r\n---\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @antinna/blogger-theme\r\n\r\n```\r\n\r\n<!-- npm install -D @antinna/types-blogger-react -->\r\n\r\nMake sure you have `esbuild` installed (which is a peer dependency used for on-demand script and stylesheet bundling).\r\n\r\n---\r\n\r\n## tsconfig.json Setup\r\n\r\nTo use TSX/JSX syntax in your project, configure your `tsconfig.json` with the automatic JSX runtime:\r\n\r\n```json\r\n{\r\n  \"compilerOptions\": {\r\n    \"target\": \"ESNext\",\r\n    \"module\": \"NodeNext\",\r\n    \"moduleResolution\": \"NodeNext\",\r\n    \r\n    \"jsx\": \"react-jsx\",\r\n    \"jsxImportSource\": \"@antinna/blogger-theme\",\r\n    \"strict\": true\r\n  }\r\n}\r\n```\r\n\r\n---\r\n\r\n## Quick Start\r\n\r\n### 1. Define your Layout Component (TSX Style)\r\n\r\n```tsx\r\n/** @jsxImportSource @antinna/blogger-theme */\r\nimport { BSection, BWidget, BIf, BData } from \"@antinna/blogger-theme\";\r\n\r\nexport const BlogLayout = () => (\r\n  <div class=\"wrapper-pane\">\r\n    <BSection\r\n      id=\"header-area\"\r\n      className=\"header-section\"\r\n      maxwidgets={1}\r\n      showaddelement={true}\r\n    >\r\n      <BWidget\r\n        id=\"Header1\"\r\n        type=\"Header\"\r\n        title=\"Blog Header Title\"\r\n        locked={true}\r\n      />\r\n    </BSection>\r\n\r\n    <BIf cond=\"data:view.isPost\">\r\n      <div class=\"post-item\" style={{ marginTop: \"20px\", padding: \"15px\" }}>\r\n        <BData value=\"post.body\" />\r\n      </div>\r\n    </BIf>\r\n  </div>\r\n);\r\n```\r\n\r\n### 2. Generate Blogger Theme XML (with External CSS Bundling)\r\n\r\n```tsx\r\n/** @jsxImportSource @antinna/blogger-theme */\r\nimport { BloggerTheme, Title, BSkin } from \"@antinna/blogger-theme\";\r\nimport { BlogLayout } from \"./BlogLayout.js\";\r\n\r\nconst theme = new BloggerTheme({\r\n  attributes: {\r\n    \"b:responsive\": \"true\",\r\n    \"b:defaultwidgetversion\": \"2\",\r\n    \"b:layoutsversion\": \"3\",\r\n  },\r\n  head: [\r\n    <Title>My Modern Blogger Theme</Title>,\r\n\r\n    // Automatically loads, recursively bundles, and minifies your external CSS file:\r\n    <BSkin css=\"./src/styles/theme.css\" />,\r\n  ],\r\n  body: [<BlogLayout />],\r\n});\r\n\r\nconst xml = theme.generate();\r\nconsole.log(xml);\r\n```\r\n\r\n---\r\n\r\n## Dual API: Builder Style vs JSX\r\n\r\nThis library has been meticulously designed to support **both** styles natively.\r\n\r\n### Constructor/Builder Style\r\n\r\nIf you prefer class-based instantiation:\r\n\r\n```typescript\r\nimport { BSection, BWidget, BIf, Div, BData } from \"@antinna/blogger-theme\";\r\n\r\nconst layout = new Div(\r\n  { class: \"wrapper-pane\" },\r\n  new BSection(\r\n    {\r\n      id: \"header-area\",\r\n      className: \"header-section\",\r\n      maxwidgets: 1,\r\n      showaddelement: true,\r\n    },\r\n    new BWidget({\r\n      id: \"Header1\",\r\n      type: \"Header\",\r\n      title: \"Blog Header Title\",\r\n      locked: true,\r\n    }),\r\n  ),\r\n  new BIf(\r\n    { cond: \"data:view.isPost\" },\r\n    new Div({ class: \"post-item\" }, new BData(\"post.body\")),\r\n  ),\r\n);\r\n\r\nconst xml = layout.render();\r\n```\r\n\r\n---\r\n\r\n## Client-Side Script Bundling (`BClientScript`)\r\n\r\nYou can compile a client-side TypeScript or JavaScript file at render-time. This code will be bundled, minified, wrapped inside a self-invoking IIFE, and output directly inside the rendered theme XML's `<script>` tag.\r\n\r\n```tsx\r\nimport { BClientScript } from \"@antinna/blogger-theme\";\r\n\r\n// Inside your layout/head:\r\n<BClientScript scriptPath=\"./src/client/analytics.ts\" mode=\"cdata\" />;\r\n```\r\n\r\n---\r\n\r\n## CLI Compilation (`blogger-theme`)\r\n\r\nYou can compile any `.tsx` entrypoint directly to XML using our built-in compiler tool:\r\n\r\n```bash\r\nnpx @antinna/blogger-theme theme.tsx -o theme.xml\r\n```\r\n\r\nYou can also run it in **watch mode** to automatically compile layouts as you save changes during development:\r\n\r\n```bash\r\nnpx @antinna/blogger-theme theme.tsx -o theme.xml --watch\r\n```\r\n\r\n---\r\n\r\n## License\r\n\r\nMIT License.\r\n","readmeFilename":"README.md"}