@praxisui/rich-content 8.0.0-beta.105 → 8.0.0-beta.106
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 +56 -61
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,4 +1,59 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @praxisui/rich-content
|
|
2
|
+
|
|
3
|
+
Rich content rendering and authoring primitives for Praxis UI surfaces,
|
|
4
|
+
including semantic blocks, governed action surfaces and page-builder
|
|
5
|
+
integration.
|
|
6
|
+
|
|
7
|
+
## Documentation
|
|
8
|
+
|
|
9
|
+
- Official documentation: https://praxisui.dev/docs/components
|
|
10
|
+
- Quickstart reference app: https://github.com/codexrodrigues/praxis-ui-quickstart
|
|
11
|
+
- Live Praxis UI demo: https://praxis-ui-4e602.web.app
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm i @praxisui/rich-content@beta
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Peer dependencies:
|
|
20
|
+
- `@angular/core` `^21.0.0`
|
|
21
|
+
- `@angular/common` `^21.0.0`
|
|
22
|
+
- `@angular/forms` `^21.0.0`
|
|
23
|
+
- `@praxisui/core` `^8.0.0-beta.106`
|
|
24
|
+
- `rxjs` `~7.8.0`
|
|
25
|
+
|
|
26
|
+
## When to use
|
|
27
|
+
|
|
28
|
+
- Render portable `RichContentDocument` JSON inside Praxis runtime surfaces
|
|
29
|
+
- Provide page-builder widgets for semantic content blocks
|
|
30
|
+
- Reuse the canonical rich-content editor instead of building local JSON editors
|
|
31
|
+
- Validate rich documents before persistence with `validateRichContentDocument()`
|
|
32
|
+
|
|
33
|
+
## Minimal standalone renderer
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import { Component } from '@angular/core';
|
|
37
|
+
import { PraxisRichContent } from '@praxisui/rich-content';
|
|
38
|
+
import type { RichContentDocument } from '@praxisui/core';
|
|
39
|
+
|
|
40
|
+
@Component({
|
|
41
|
+
selector: 'app-rich-content-preview',
|
|
42
|
+
standalone: true,
|
|
43
|
+
imports: [PraxisRichContent],
|
|
44
|
+
template: `<praxis-rich-content [document]="document" />`,
|
|
45
|
+
})
|
|
46
|
+
export class RichContentPreviewComponent {
|
|
47
|
+
document: RichContentDocument = {
|
|
48
|
+
kind: 'praxis.rich-content',
|
|
49
|
+
version: '1.0.0',
|
|
50
|
+
nodes: [
|
|
51
|
+
{ type: 'text', text: 'Governed rich content' },
|
|
52
|
+
{ type: 'badge', label: 'canonical' },
|
|
53
|
+
],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
```
|
|
2
57
|
|
|
3
58
|
`PraxisRichContent` renders metadata-driven rich nodes and blocks used by Praxis
|
|
4
59
|
components such as table renderers, list metrics and compact status surfaces.
|
|
@@ -305,63 +360,3 @@ Supported inline variables:
|
|
|
305
360
|
- `--prx-rich-content-inline-align-items`, default `center`
|
|
306
361
|
- `--prx-rich-content-inline-flex-wrap`, default `nowrap`
|
|
307
362
|
- `--prx-rich-content-inline-gap`, default `6px`
|
|
308
|
-
|
|
309
|
-
## Code scaffolding
|
|
310
|
-
|
|
311
|
-
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
312
|
-
|
|
313
|
-
```bash
|
|
314
|
-
ng generate component component-name
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
318
|
-
|
|
319
|
-
```bash
|
|
320
|
-
ng generate --help
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
## Building
|
|
324
|
-
|
|
325
|
-
To build the library, run:
|
|
326
|
-
|
|
327
|
-
```bash
|
|
328
|
-
ng build praxis-rich-content
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
332
|
-
|
|
333
|
-
### Publishing the Library
|
|
334
|
-
|
|
335
|
-
Once the project is built, you can publish your library by following these steps:
|
|
336
|
-
|
|
337
|
-
1. Navigate to the `dist` directory:
|
|
338
|
-
```bash
|
|
339
|
-
cd dist/praxis-rich-content
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
343
|
-
```bash
|
|
344
|
-
npm publish
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
## Running unit tests
|
|
348
|
-
|
|
349
|
-
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
350
|
-
|
|
351
|
-
```bash
|
|
352
|
-
ng test
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
## Running end-to-end tests
|
|
356
|
-
|
|
357
|
-
For end-to-end (e2e) testing, run:
|
|
358
|
-
|
|
359
|
-
```bash
|
|
360
|
-
ng e2e
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
364
|
-
|
|
365
|
-
## Additional Resources
|
|
366
|
-
|
|
367
|
-
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/rich-content",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.106",
|
|
4
|
+
"description": "Rich content rendering and authoring primitives for Praxis UI surfaces, including semantic blocks and page-builder integration.",
|
|
4
5
|
"peerDependencies": {
|
|
5
6
|
"@angular/common": "^21.0.0",
|
|
6
7
|
"@angular/core": "^21.0.0",
|
|
7
|
-
"@praxisui/core": "^8.0.0-beta.
|
|
8
|
+
"@praxisui/core": "^8.0.0-beta.106",
|
|
8
9
|
"@angular/forms": "^21.0.0",
|
|
9
10
|
"rxjs": "~7.8.0"
|
|
10
11
|
},
|