@recursica/mantine-adapter 0.36.0 → 0.36.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @recursica/mantine-adapter
2
2
 
3
+ ## 0.36.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 5c10166: Split shared contributor docs (`COMPONENT_DEV_GUIDE.md`, `COMPONENT_STORYBOOK_GUIDE.md`) into a canonical version in `adapter-common` plus thin per-adapter deltas, and publish `docs/PHILOSOPHY.md` to npm.
8
+
3
9
  ## 0.36.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -28,10 +28,10 @@ Please read [PHILOSOPHY.md](./docs/PHILOSOPHY.md) to understand the core princip
28
28
 
29
29
  ## Developer & AI Guidelines
30
30
 
31
- This repository provides dedicated routing documents for both human developers and AI Agents to ensure strict adherence to our design system constraints.
31
+ This repository provides dedicated routing documents for both human developers and AI Agents to ensure strict adherence to our design system constraints. These are contributor-facing docs that live in the [recursica monorepo](https://github.com/borderux/recursica) rather than in this published package, so they're linked here as GitHub URLs rather than relative paths.
32
32
 
33
- - **For Human Developers:** This `README.md` acts as your primary routing document. If you are integrating this library into an application, please read [USAGE.md](./USAGE.md). If you are building or modifying components inside this library, please read [CONTRIBUTING.md](./CONTRIBUTING.md).
34
- - **For AI Agents:** All AI Agents operating in this repository must start by reading [AGENT.md](./AGENT.md), which serves as the primary routing document for AI workflows.
33
+ - **For Human Developers:** This `README.md` acts as your primary routing document. If you are integrating this library into an application, please read [USAGE.md](./USAGE.md) (published alongside this README). If you are building or modifying components inside this library, please read [CONTRIBUTING.md](https://github.com/borderux/recursica/blob/main/packages/mantine-adapter/CONTRIBUTING.md).
34
+ - **For AI Agents:** All AI Agents operating in the monorepo must start by reading [AGENT.md](https://github.com/borderux/recursica/blob/main/packages/mantine-adapter/AGENT.md), which serves as the primary routing document for AI workflows.
35
35
 
36
36
  ## Development and Architecture
37
37
 
@@ -0,0 +1,39 @@
1
+ # Recursica Mantine Adapter: Core Philosophy
2
+
3
+ Recursica's component architecture isn't just a wrapper; it's a strict enforcing layer over Mantine's massive API surface. Our primary goal is to ensure consistency, eliminate "design system rot," and provide clear boundaries for application developers using the UI Kit.
4
+
5
+ This document serves as the governing framework for why the `mantine-adapter` components are built the way they are.
6
+
7
+ ## 1. Strict Separation of Props (The Unified Recursica Prop Layer)
8
+
9
+ Recursica has a **single universal API surface** internally regardless of whether we use Mantine or another underlying UI library.
10
+
11
+ - We decouple our visual properties natively. Instead of mapping perfectly to Mantine's variants `(solid, outline)`, we intentionally use Recursica's semantic and behavioral structures (e.g., `<Badge variant="alert" />`).
12
+ - We intentionally omit and strip complex underlying parameters if they collide with or circumvent our UI tokens (like stripping `--size` out of Mantine Badge when Recursica enforces a universal single size).
13
+
14
+ ## 2. Component Wrappers (Leaving Mantine Alone)
15
+
16
+ We actively avoid mutating or patching Mantine source code or deeply hooking into the Mantine Theme object to apply our token system.
17
+
18
+ - We rely on standard DOM `module.css` bridging with strictly targeted `className`/`classNames` overrides.
19
+ - This creates total decoupled isolation: updating Mantine natively will not fracture our styles, and we avoid dealing with deep Emotion/styled-component theme clashing logic.
20
+
21
+ ## 3. The `overStyled` Property
22
+
23
+ Mantine encourages deep styling access by injecting properties like `p` (padding), `bg` (background), `c` (color), or `styles`/`classNames` directly into component tags.
24
+
25
+ - By default, **Recursica components block all arbitrary styling vectors**. `className` maps, system styles, and inline logic are proactively stripped before they hit Mantine using central utility functions.
26
+ - **Why?** To prevent the design system from deteriorating over time as developers write one-off hotfixes into their TSX rendering blocks.
27
+ - **The Caveat:** We allow _external DOM layout positioning props_ (e.g., margin `m`, `mt`, `mb`, etc.) to pass through so developers can still structure components organically within their parent layouts.
28
+
29
+ ### Escape Hatches
30
+
31
+ If a developer _strictly must_ heavily alter a component, they are required to explicitly declare `<Component overStyled={true} />`. This immediately raises a visible red flag during code reviews.
32
+
33
+ ## 4. Expectations for External Developers (Modifying Recursica)
34
+
35
+ If a developer finds that a component does not fit their needs and styling must be modified, their path of execution should follow these principles sequentially:
36
+
37
+ 1. **Leverage Native Mantine First:** If a Recursica component lacks the functionality or styling variant needed for a highly custom edge case (e.g., a massive marketing hero button), do not try to forcibly hack the Recursica component. Instead, import the raw underlying `Button` component directly from `@mantine/core` and style it manually. Use Recursica for standard systematic needs, and native libraries for isolated custom one-offs.
38
+ 2. **Accept `overStyled` as Technical Debt:** If you must override the Recursica component immediately but intend to roll it back, use `overStyled={true}`. The expectation is that `overStyled` uses will eventually be replaced once the actual Recursica Figma variants are natively updated to accommodate your usecase, at which point `overStyled={true}` can be safely removed.
39
+ 3. **Contribute to the Kit:** Avoid building private custom wrappers around Recursica components. If the system is missing a variant, that is a shared project deficit—raise a concern and have the variant integrated directly into the universal token libraries!
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "url": "git+https://github.com/borderux/recursica.git",
14
14
  "directory": "packages/mantine-adapter"
15
15
  },
16
- "version": "0.36.0",
16
+ "version": "0.36.1",
17
17
  "type": "module",
18
18
  "main": "./dist/mantine-adapter.cjs",
19
19
  "module": "./dist/mantine-adapter.js",
@@ -35,7 +35,8 @@
35
35
  "USAGE.md",
36
36
  "ARCHITECTURE.md",
37
37
  "SETUP.md",
38
- "OVERSTYLING.md"
38
+ "OVERSTYLING.md",
39
+ "docs/PHILOSOPHY.md"
39
40
  ],
40
41
  "keywords": [
41
42
  "react",