@mittwald/flow-react-components 0.2.0-alpha.1003 → 0.2.0-alpha.1004
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/AGENTS.md +9 -0
- package/CHANGELOG.md +6 -0
- package/PATTERNS.md +21 -1
- package/dist/assets/doc-properties.json +3252 -3252
- package/dist/css/all-layered.css +1 -1
- package/dist/types/tests/layered/CodeEditor.browser.test.d.ts +2 -0
- package/dist/types/tests/layered/CodeEditor.browser.test.d.ts.map +1 -0
- package/dist/types/tests/layered/Icon.browser.test.d.ts +2 -0
- package/dist/types/tests/layered/Icon.browser.test.d.ts.map +1 -0
- package/dist/types/tests/layered/ImageCropper.browser.test.d.ts +2 -0
- package/dist/types/tests/layered/ImageCropper.browser.test.d.ts.map +1 -0
- package/package.json +13 -11
package/AGENTS.md
CHANGED
|
@@ -196,6 +196,15 @@ if ("action" in props) {
|
|
|
196
196
|
Group repeated variants in local mixins.
|
|
197
197
|
- Structure sections with comments: `/* Elements */`, `/* States */`,
|
|
198
198
|
`/* Size */`, `/* Variants */`.
|
|
199
|
+
- **Overriding a dependency that injects its own stylesheet** (CodeMirror,
|
|
200
|
+
react-easy-crop, FontAwesome) needs `@layer flow.unlayered { … }`: their
|
|
201
|
+
`<style>` elements are unlayered, and unlayered CSS beats layered CSS
|
|
202
|
+
regardless of specificity, so a normal rule never applies in
|
|
203
|
+
`all-layered.css`. Only for the library's own `:global()` selectors — the
|
|
204
|
+
`flow/unlayered-third-party-only` lint rule enforces that, because the marker
|
|
205
|
+
costs consumers the layer-based overridability of the rule. New or changed
|
|
206
|
+
rendered behavior here gets a test in `src/tests/layered/`, which runs against
|
|
207
|
+
the layered variant; the default browser project cannot see this class of bug.
|
|
199
208
|
|
|
200
209
|
## Testing — the actual bar
|
|
201
210
|
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.2.0-alpha.1004](https://github.com/mittwald/flow/compare/0.2.0-alpha.1003...0.2.0-alpha.1004) (2026-08-06)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **components:** make third-party style overrides work in the layered stylesheet ([#2799](https://github.com/mittwald/flow/issues/2799)) ([ab20016](https://github.com/mittwald/flow/commit/ab2001688a279dc0194845f0da53342db12a574b))
|
|
11
|
+
|
|
6
12
|
# [0.2.0-alpha.1003](https://github.com/mittwald/flow/compare/0.2.0-alpha.1002...0.2.0-alpha.1003) (2026-08-06)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
package/PATTERNS.md
CHANGED
|
@@ -503,9 +503,29 @@ and consistency enforced by tooling, not maintained by hand.
|
|
|
503
503
|
- ✓ styling genuinely depends on rendered composition.
|
|
504
504
|
- ✗ the condition exists as state/props → apply a class.
|
|
505
505
|
- **Global `:global()` third-party** — target embedded third-party DOM under the
|
|
506
|
-
root. `src/components/CodeEditor/CodeEditor.module.scss:
|
|
506
|
+
root. `src/components/CodeEditor/CodeEditor.module.scss:47`
|
|
507
507
|
- ✓ scoped styles must reach third-party widget classes.
|
|
508
508
|
- ✗ Flow-owned elements → module classes/contextual styling.
|
|
509
|
+
- **Unlayered escape hatch (`@layer flow.unlayered`)** — take a third-party
|
|
510
|
+
override out of every cascade layer.
|
|
511
|
+
`src/components/CodeEditor/CodeEditor.module.scss:44`
|
|
512
|
+
- ✓ the library injects its own stylesheet at runtime and its declarations
|
|
513
|
+
would otherwise win: unlayered CSS beats layered CSS regardless of
|
|
514
|
+
specificity, so a layered override never applies in `all-layered.css`.
|
|
515
|
+
Confirmed injectors: CodeMirror, react-easy-crop, FontAwesome
|
|
516
|
+
(`autoAddCss`).
|
|
517
|
+
- ✗ the library sets **inline styles** → no layer helps; ✗ it only sets SVG
|
|
518
|
+
presentation attributes → author CSS already wins, no hatch needed
|
|
519
|
+
(`recharts` ships no CSS at all); ✗ Flow-owned classes → the
|
|
520
|
+
`flow/unlayered-third-party-only` lint rule rejects it, because the marker
|
|
521
|
+
costs consumers the layer-based overridability of that rule.
|
|
522
|
+
- Prefer one block per component at the end of the file; mark at the leaf only
|
|
523
|
+
where a block would duplicate scaffolding, e.g. rules inside a Sass mixin
|
|
524
|
+
(`src/components/Icon/Icon.module.scss:24`).
|
|
525
|
+
- Mark the whole override block, not single declarations — a dependency can
|
|
526
|
+
add a colliding declaration in any patch release.
|
|
527
|
+
- Rationale and build mechanics:
|
|
528
|
+
[ADR 0001, Amendment 2026-08-05](../../docs/adr/0001-css-cascade-layers-in-the-stylesheet.md#amendment-2026-08-05--unlayered-escape-hatch-for-third-party-css).
|
|
509
529
|
- **Global `.flow--…` descendant selectors** `[undocumented]` — coordinate
|
|
510
530
|
independently rendered descendants.
|
|
511
531
|
`src/components/LayoutCard/LayoutCard.module.scss:16`
|