release(content-suggestions): v0.1.1

This commit is contained in:
2026-03-11 17:15:01 +03:00
parent 6c73b0fa61
commit 1c1b9748c6
9 changed files with 1438 additions and 7 deletions

View File

@@ -77,12 +77,40 @@ By default, tags are rendered as plain styled text (not links).
## Angular usage
Tokenization helper:
```ts
import { createAngularContentTokens } from "@hublib-web/content-suggestions/angular";
const tokens = createAngularContentTokens(text);
```
Ready-to-use UI renderer (React-like props API):
```ts
import { AngularContentTextWithSuggestionsRenderer } from "@hublib-web/content-suggestions/angular";
const renderer = new AngularContentTextWithSuggestionsRenderer();
renderer.attach(containerElement, {
text,
weight: "normal",
ellipsis: { count: 180, expandable: true },
blur: false,
onView: () => {
// analytics
},
});
```
Title variant with defaults (`weight: "bold"`, `ellipsis: { rows: 2 }`):
```ts
import { AngularContentTitleWithSuggestionsRenderer } from "@hublib-web/content-suggestions/angular";
const titleRenderer = new AngularContentTitleWithSuggestionsRenderer();
titleRenderer.attach(titleContainer, { text: title });
```
## Storybook (dev/design system)
Run from repository root: