rich-react-component 0.4.0 → 0.4.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/README.md +53 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,30 +20,36 @@ Each layer **reuses** the one below it instead of reimplementing it — `RemoteC
|
|
|
20
20
|
npm install rich-react-component bootstrap react react-dom
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
`bootstrap`, `react`, and `react-dom` are peer dependencies
|
|
23
|
+
`bootstrap`, `react`, and `react-dom` are peer dependencies. Bootstrap is still
|
|
24
|
+
loaded by the application:
|
|
24
25
|
|
|
25
26
|
```tsx
|
|
26
27
|
import "bootstrap/dist/css/bootstrap.min.css";
|
|
27
28
|
```
|
|
28
29
|
|
|
29
|
-
The library ships one opt-in stylesheet: a repository-owned **Metronic Bootstrap
|
|
30
|
-
visual skin** covering every public component. It is emitted as a separate
|
|
31
|
-
`dist/style.css` asset, so importing the package entry point stays
|
|
32
|
-
side-effect-free for SSR. Load it after Bootstrap
|
|
33
|
-
|
|
34
|
-
```tsx
|
|
35
|
-
import "bootstrap/dist/css/bootstrap.min.css";
|
|
36
|
-
import "rich-react-component/style.css";
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
30
|
+
The library ships one opt-in stylesheet: a repository-owned **Metronic Bootstrap
|
|
31
|
+
visual skin** covering every public component. It is emitted as a separate
|
|
32
|
+
`dist/style.css` asset, so importing the package entry point stays
|
|
33
|
+
side-effect-free for SSR. Load it after Bootstrap:
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
import "bootstrap/dist/css/bootstrap.min.css";
|
|
37
|
+
import "rich-react-component/style.css";
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Every rule in it is anchored on a library-owned `rrc-*` class, so importing it
|
|
41
|
+
cannot repaint your own Bootstrap markup — components emit both their Bootstrap
|
|
42
|
+
class and their `rrc-*` class, and a consumer who skips the import keeps plain
|
|
43
|
+
Bootstrap. It is **not** the official Metronic stylesheet: no licensed Metronic
|
|
44
|
+
or KeenIcons asset is used. Typography prefers Inter but the package never
|
|
45
|
+
fetches a font; supply Inter from your application and it is picked up, or opt
|
|
46
|
+
the whole page in with `body { font-family: var(--rrc-font-sans); }`.
|
|
47
|
+
|
|
48
|
+
The same philosophy applies to application chrome in this repository's
|
|
49
|
+
showcase: no separate app stylesheet is required. Reusable showcase hooks live
|
|
50
|
+
under `rrc-showcase-*` and are delivered through the public package stylesheet,
|
|
51
|
+
so the demo app consumes the component library the way an application should:
|
|
52
|
+
through component APIs and the package CSS entry, not a local `demo.css`.
|
|
47
53
|
|
|
48
54
|
## Quick example
|
|
49
55
|
|
|
@@ -421,23 +427,28 @@ not added as a second export; `DocumentViewer` is the only public name.
|
|
|
421
427
|
|
|
422
428
|
## Component showcase
|
|
423
429
|
|
|
424
|
-
A dev-only application exercises the library live
|
|
430
|
+
A dev-only application exercises the library live:
|
|
425
431
|
|
|
426
432
|
```bash
|
|
427
433
|
npm run dev
|
|
428
434
|
```
|
|
429
435
|
|
|
430
|
-
The showcase is a routed single-page application: a persistent shell
|
|
431
|
-
Sidebar, header, appearance drawer) with one route per public
|
|
432
|
-
each page showing a live Preview and the source that produced
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
- `/
|
|
436
|
-
- `/
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
436
|
+
The showcase is a routed single-page application: a persistent shell
|
|
437
|
+
(categorized Sidebar, header, appearance drawer) with one route per public
|
|
438
|
+
visual component, each page showing a live Preview and the source that produced
|
|
439
|
+
it.
|
|
440
|
+
|
|
441
|
+
- `/overview/introduction` — the landing route
|
|
442
|
+
- `/overview/ensa-dashboard-example` — an application-style ENSA dashboard
|
|
443
|
+
example built from `rich-react-component` components only
|
|
444
|
+
- `/components/<category>/<component>` — one route per Base component
|
|
445
|
+
- `/remote/<component>` and `/smart/<component>` — the Remote and Smart layers
|
|
446
|
+
|
|
447
|
+
The demo consumes the library through its real public specifier
|
|
448
|
+
(`rich-react-component`) and the public stylesheet
|
|
449
|
+
(`rich-react-component/style.css`), never through private source paths and never
|
|
450
|
+
through a separate `demo.css`. Showcase-specific surface classes are
|
|
451
|
+
`rrc-showcase-*`, owned by the package stylesheet.
|
|
441
452
|
|
|
442
453
|
## Scripts
|
|
443
454
|
|
|
@@ -460,13 +471,17 @@ src/
|
|
|
460
471
|
├── smart/ # Smart layer (Phases 1-5) — may depend on base/ and remote/
|
|
461
472
|
└── index.ts # public entry point
|
|
462
473
|
|
|
463
|
-
demo/ # dev-only routed showcase application (not published)
|
|
464
|
-
registry/ # authoritative route/category metadata + public-export inventory
|
|
465
|
-
shell/ # persistent app shell: sidebar, header, drawers, preferences
|
|
466
|
-
pages/ # one lazily loaded module per category
|
|
467
|
-
ui/ # page standard and the Preview/Code example viewer
|
|
468
|
-
mocks/ # deterministic in-memory HttpClient for the Remote demos
|
|
469
|
-
```
|
|
474
|
+
demo/ # dev-only routed showcase application (not published)
|
|
475
|
+
registry/ # authoritative route/category metadata + public-export inventory
|
|
476
|
+
shell/ # persistent app shell: sidebar, header, drawers, preferences
|
|
477
|
+
pages/ # one lazily loaded module per category
|
|
478
|
+
ui/ # page standard and the Preview/Code example viewer
|
|
479
|
+
mocks/ # deterministic in-memory HttpClient for the Remote demos
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
`src/styles/showcase.css` contains the reusable `rrc-showcase-*` application
|
|
483
|
+
surface that the showcase uses through `rich-react-component/style.css`; it is
|
|
484
|
+
not imported directly by the demo app.
|
|
470
485
|
|
|
471
486
|
## Testing
|
|
472
487
|
|