@animus-ui/next-plugin 0.1.30 → 0.1.31

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/README.md CHANGED
@@ -128,6 +128,21 @@ Two rules either way:
128
128
  you add to the script tag. The full CSP footguns are documented in the
129
129
  [`@animus-ui/vite-plugin` README](https://github.com/codecaaron/animus/tree/main/packages/vite-plugin#content-security-policy).
130
130
 
131
+ ## MDX
132
+
133
+ Animus reads each `.mdx` file as the JSX it renders: its imports, exports,
134
+ tags, props and `{expressions}`. It needs no MDX compiler. A component a tag
135
+ names, or one your provider maps markdown to (`# x` → your heading), counts
136
+ as rendered. Markdown and code examples render nothing.
137
+
138
+ MDX renders components; it declares no styles. Animus reports any reference
139
+ to its builder in an `.mdx` file as `SOURCE_MDX_STYLE_DECLARATION`, and a
140
+ strict build fails on it. That covers any import from `@animus-ui/system`,
141
+ and any member named like a builder method (`styles`, `variant`,
142
+ `compound`, `states`, `system`, `props`, `extend`, `asElement`,
143
+ `asComponent`, `asClass`), read, called or destructured. So `{Box.styles}`
144
+ is reported too. Declare components in `.ts` or `.tsx` files and import them.
145
+
131
146
  ## What It Does
132
147
 
133
148
  - Transforms `@animus-ui/system` builder chains into static CSS (webpack loader or Turbopack loader rule)
package/dist/types.d.ts CHANGED
@@ -13,7 +13,9 @@ export interface AnimusNextOptions {
13
13
  * `.spec.`; `node_modules`, `.next` and `.animus` are always excluded. */
14
14
  exclude?: string[];
15
15
  /** Extensions scanned for definitions and usages; replaces the default
16
- * `['.ts','.tsx','.js','.jsx','.mdx']`. `.mdx` needs `@mdx-js/mdx`. */
16
+ * `['.ts','.tsx','.js','.jsx','.mdx']`. `.mdx` is read for the components
17
+ * it renders, with no MDX compiler; any reference to the builder in it is
18
+ * an error (see the README's MDX section). */
17
19
  extensions?: string[];
18
20
  /** When true, error-severity diagnostics — lost configured inputs and
19
21
  * classified unsupported Animus declarations — and failed checks, such as
@@ -1 +1 @@
1
- {"version":3,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IAAI,CAAC;IACd;qEACiE;IACjE,SAAS,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,KAAK,CAAA;KAAE,CAAC;IAC7C;;;;sBAIkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;sCACkC;IAClC,kBAAkB,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IACtD;qEACiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;+EAC2E;IAC3E,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;sEAEkE;IAClE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;4EAEwE;IACxE,oBAAoB,CAAC,EAAE,mBAAmB,EAAE,CAAC;CAC9C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animus-ui/next-plugin",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "description": "Animus static CSS extraction for Next.js (webpack)",
5
5
  "keywords": [
6
6
  "animus",
@@ -40,21 +40,15 @@
40
40
  "compile": "bun check"
41
41
  },
42
42
  "dependencies": {
43
- "@animus-ui/extract": "0.1.30"
43
+ "@animus-ui/extract": "0.1.31"
44
44
  },
45
45
  "devDependencies": {
46
- "@animus-ui/assertions": "0.1.30"
46
+ "@animus-ui/assertions": "0.1.31"
47
47
  },
48
48
  "peerDependencies": {
49
- "@mdx-js/mdx": "^3.0.0",
50
49
  "next": ">=15 <17",
51
50
  "webpack": ">=5 <6"
52
51
  },
53
- "peerDependenciesMeta": {
54
- "@mdx-js/mdx": {
55
- "optional": true
56
- }
57
- },
58
52
  "engines": {
59
53
  "node": ">=22.12.0"
60
54
  }