@m13v/seo-components 0.8.3 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m13v/seo-components",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "scripts": {
5
5
  "build:css": "tailwindcss -i src/_build.css -o dist/styles.css --minify",
6
6
  "prepublishOnly": "npm run build:css"
@@ -0,0 +1,18 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+
5
+ const here = path.dirname(fileURLToPath(import.meta.url));
6
+ const cssPath = path.join(here, "..", "..", "dist", "styles.css");
7
+
8
+ let cachedCss: string | null = null;
9
+ function loadCss(): string {
10
+ if (cachedCss !== null) return cachedCss;
11
+ cachedCss = fs.readFileSync(cssPath, "utf8");
12
+ return cachedCss;
13
+ }
14
+
15
+ export function SeoComponentsStyles() {
16
+ const css = loadCss();
17
+ return <style dangerouslySetInnerHTML={{ __html: css }} />;
18
+ }
package/src/index.ts CHANGED
@@ -54,6 +54,11 @@ export { MotionSequence } from "./components/MotionSequence";
54
54
  export { RemotionClip, ConceptReveal } from "./components/RemotionClip";
55
55
  export { LottiePlayer } from "./components/LottiePlayer";
56
56
 
57
+ // Style injector — renders prebuilt Tailwind CSS as a <style> tag.
58
+ // Use this in your root layout instead of importing the .css file directly,
59
+ // to avoid PostCSS/Tailwind version conflicts on the consumer side.
60
+ export { SeoComponentsStyles } from "./components/SeoComponentsStyles";
61
+
57
62
  // Sitemap sidebar + heading anchors
58
63
  export { SitemapSidebar } from "./components/SitemapSidebar";
59
64
  export type { SitemapSidebarProps } from "./components/SitemapSidebar";