@streamscloud/kit 0.69.0 → 0.71.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.
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">import { Button } from '../button';
2
2
  import { Spinner } from '../spinner';
3
3
  import { InfiniteScrollLocalization } from './infinite-scroll-localization';
4
- let { loadMore, container = null, rootMargin = '200px', children, loading, retry } = $props();
4
+ let { loadMore, container = null, rootMargin = '200px', children, showLoading = false, loading, retry } = $props();
5
5
  const localization = new InfiniteScrollLocalization();
6
6
  const source = $derived(typeof loadMore === 'function' ? { loadMore, failed: false, canLoadMore: true } : loadMore);
7
7
  let isLoading = $state(false);
@@ -61,7 +61,7 @@ const onRetry = () => {
61
61
  {#if isLoading}
62
62
  {#if loading}
63
63
  {@render loading()}
64
- {:else}
64
+ {:else if showLoading}
65
65
  <div class="infinite-scroll__loading-container">
66
66
  <Spinner timeout={500} />
67
67
  </div>
@@ -79,7 +79,7 @@ const onRetry = () => {
79
79
 
80
80
  <!--
81
81
  @component
82
- Triggers an async `loadMore` callback when a sentinel element scrolls into view, using IntersectionObserver. Re-observes the sentinel on container resize so layout shifts inside the parent re-evaluate visibility (a known IntersectionObserver gotcha). Internal `isLoading` guard prevents overlapping fires while a load is in flight.
82
+ Triggers an async `loadMore` callback when a sentinel element scrolls into view, using IntersectionObserver. Re-observes the sentinel on container resize so layout shifts inside the parent re-evaluate visibility (a known IntersectionObserver gotcha). Internal `isLoading` guard prevents overlapping fires while a load is in flight. No loading indicator by default — opt in with `showLoading` or a `loading` snippet.
83
83
 
84
84
  Pairs with `core/data-loaders` (`CursorDataLoader`, `PageDataLoader`, `CursorDataLoaderWithSearch`) — wire `loadMore={loader.loadMore}` and `{#each loader.items as item}` directly.
85
85
 
@@ -16,13 +16,15 @@ type Props = {
16
16
  /** IntersectionObserver `rootMargin`. Default `'200px'` — fires the load a viewport-screen before reaching the bottom. */
17
17
  rootMargin?: string;
18
18
  children: Snippet;
19
- /** Custom loading indicator snippet. Defaults to the kit `Spinner`. */
19
+ /** Shows the kit `Spinner` while a batch loads. Off by default — the list owner usually renders its own loading state. */
20
+ showLoading?: boolean;
21
+ /** Custom loading indicator snippet. Passing it turns the indicator on regardless of `showLoading`. */
20
22
  loading?: Snippet;
21
23
  /** Manual continue shown while `failed`, taking the callback that retries the failed page. Defaults to a kit `Button`. */
22
24
  retry?: Snippet<[() => void]>;
23
25
  };
24
26
  /**
25
- * Triggers an async `loadMore` callback when a sentinel element scrolls into view, using IntersectionObserver. Re-observes the sentinel on container resize so layout shifts inside the parent re-evaluate visibility (a known IntersectionObserver gotcha). Internal `isLoading` guard prevents overlapping fires while a load is in flight.
27
+ * Triggers an async `loadMore` callback when a sentinel element scrolls into view, using IntersectionObserver. Re-observes the sentinel on container resize so layout shifts inside the parent re-evaluate visibility (a known IntersectionObserver gotcha). Internal `isLoading` guard prevents overlapping fires while a load is in flight. No loading indicator by default — opt in with `showLoading` or a `loading` snippet.
26
28
  *
27
29
  * Pairs with `core/data-loaders` (`CursorDataLoader`, `PageDataLoader`, `CursorDataLoaderWithSearch`) — wire `loadMore={loader.loadMore}` and `{#each loader.items as item}` directly.
28
30
  *
@@ -3,11 +3,11 @@ import { PageLayoutLocalization } from './page-layout-localization';
3
3
  import IconDismiss from '@fluentui/svg-icons/icons/dismiss_20_regular.svg?raw';
4
4
  import IconWindow from '@fluentui/svg-icons/icons/window_20_regular.svg?raw';
5
5
  import IconWindowMultiple from '@fluentui/svg-icons/icons/window_multiple_20_regular.svg?raw';
6
- const { children, title, actions, navigationToggle, editorControls, scrollable = false } = $props();
6
+ const { children, title, actions, navigationToggle, editorControls, scrollable = false, inert = false } = $props();
7
7
  const localization = new PageLayoutLocalization();
8
8
  </script>
9
9
 
10
- <div class="page-layout" class:page-layout--scrollable={scrollable}>
10
+ <div class="page-layout" class:page-layout--scrollable={scrollable} inert={inert}>
11
11
  <div class="page-layout__header">
12
12
  <div class="page-layout__title">
13
13
  {#if typeof title === 'function'}
@@ -9,6 +9,8 @@ type Props = {
9
9
  /** Editor chrome — the fixed panels-toggle + close pair. Set it to render both buttons; omit it entirely for a non-editor page. */
10
10
  editorControls?: EditorControls;
11
11
  scrollable?: boolean;
12
+ /** Sets `inert` on the whole layout — header and body stop taking focus, clicks and assistive-tech interaction. */
13
+ inert?: boolean;
12
14
  };
13
15
  /**
14
16
  * PageLayout — top-level window chrome. Renders a fixed-height header (title + actions + an optional
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/kit",
3
- "version": "0.69.0",
3
+ "version": "0.71.0",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",