ngx-oneforall-mcp 1.5.0 → 2.0.0
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/data/docs.json +1 -1
- package/package.json +1 -1
package/data/docs.json
CHANGED
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
"importPath": "ngx-oneforall/directives/infinite-scroll",
|
|
318
318
|
"url": "https://love1024.github.io/ngx-oneforall/directives/infinite-scroll",
|
|
319
319
|
"description": "Implements infinite scroll behavior using IntersectionObserver for efficient detection.",
|
|
320
|
-
"fullContent": "Implements infinite scroll behavior using IntersectionObserver for efficient detection.\n\n## Features\n\n- **IntersectionObserver** — No scroll event listeners, better performance\n- **Reactive** — Automatically reinitializes when inputs change\n- **Flexible Container** — Works with window, custom container, or auto-detects parent\n- **Configurable Threshold** — Control trigger distance via `bottomMargin`\n- **SSR Safe** — Only activates in the browser\n\n---\n\n## Installation\n\n```typescript\nimport { InfiniteScrollDirective } from 'ngx-oneforall/directives/infinite-scroll';\n```\n\n---\n\n## Basic Usage\n\n```html\n<!-- Window scrolling (default) -->\n<div infiniteScroll (scrolled)=\"loadMore()\">\n @for (item of items(); track item.id) {\n <div></div>\n }\n</div>\n```\n\n---\n\n## API Reference\n\n| Input | Type | Default | Description |\n|-------|------|---------|-------------|\n| `bottomMargin` | `number` | `20` | Distance (%) from bottom to trigger |\n| `useWindow` | `boolean` | `true` | Use window vs container scroll |\n| `scrollContainer` | `string` | `null` | CSS selector for custom container |\n| `disabled` | `boolean` | `false` | Disable scroll detection |\n| `checkOnInit` | `boolean` | `true` | Emit on initial render if visible |\n
|
|
320
|
+
"fullContent": "Implements infinite scroll behavior using IntersectionObserver for efficient detection.\n\n## Features\n\n- **IntersectionObserver** — No scroll event listeners, better performance\n- **Reactive** — Automatically reinitializes when inputs change\n- **Flexible Container** — Works with window, custom container, or auto-detects parent\n- **Configurable Threshold** — Control trigger distance via `bottomMargin`\n- **SSR Safe** — Only activates in the browser\n\n---\n\n## Installation\n\n```typescript\nimport { InfiniteScrollDirective } from 'ngx-oneforall/directives/infinite-scroll';\n```\n\n---\n\n## Basic Usage\n\n```html\n<!-- Window scrolling (default) -->\n<div infiniteScroll (scrolled)=\"loadMore()\">\n @for (item of items(); track item.id) {\n <div></div>\n }\n</div>\n```\n\n---\n\n## API Reference\n\n| Input | Type | Default | Description |\n|-------|------|---------|-------------|\n| `bottomMargin` | `number` | `20` | Distance (%) from bottom to trigger |\n| `useWindow` | `boolean` | `true` | Use window vs container scroll |\n| `scrollContainer` | `string` | `null` | CSS selector for custom container |\n| `disabled` | `boolean` | `false` | Disable scroll detection |\n| `checkOnInit` | `boolean` | `true` | Emit on initial render if visible |\n\n| Output | Type | Description |\n|--------|------|-------------|\n| `scrolled` | `void` | Emits when scroll reaches threshold |\n\n---\n\n## Container Scrolling\n\nFor a specific scrollable container:\n\n```html\n<div \n class=\"scroll-container\" \n infiniteScroll \n [useWindow]=\"false\"\n [scrollContainer]=\"'.scroll-container'\"\n (scrolled)=\"loadMore()\">\n <!-- Items -->\n</div>\n```\n\n---\n\n## Common Use Cases\n\n### Paginated List\n\n```typescript\n@Component({\n template: `\n <div infiniteScroll (scrolled)=\"loadNextPage()\" [disabled]=\"loading()\">\n @for (item of items(); track item.id) {\n <app-item [data]=\"item\" />\n }\n @if (loading()) {\n <div class=\"spinner\">Loading...</div>\n }\n </div>\n `,\n imports: [InfiniteScrollDirective]\n})\nexport class ListComponent {\n items = signal<Item[]>([]);\n loading = signal(false);\n page = 0;\n\n loadNextPage() {\n this.loading.set(true);\n this.api.getItems(++this.page).subscribe(newItems => {\n this.items.update(items => [...items, ...newItems]);\n this.loading.set(false);\n });\n }\n}\n```\n\n---\n\n## Live Demo"
|
|
321
321
|
},
|
|
322
322
|
{
|
|
323
323
|
"name": "Lowercase",
|