Skip to content

Commit 557a2df

Browse files
committed
add @SInCE tags
1 parent 40c33e9 commit 557a2df

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

packages/svelte/src/reactivity/window/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { set, source } from '../../internal/client/reactivity/sources.js';
66

77
/**
88
* `scrollX.current` is a reactive view of `window.scrollX`. On the server it is `undefined`.
9+
* @since 5.11.0
910
*/
1011
export const scrollX = new ReactiveValue(
1112
BROWSER ? () => window.scrollX : () => undefined,
@@ -14,6 +15,7 @@ export const scrollX = new ReactiveValue(
1415

1516
/**
1617
* `scrollY.current` is a reactive view of `window.scrollY`. On the server it is `undefined`.
18+
* @since 5.11.0
1719
*/
1820
export const scrollY = new ReactiveValue(
1921
BROWSER ? () => window.scrollY : () => undefined,
@@ -22,6 +24,7 @@ export const scrollY = new ReactiveValue(
2224

2325
/**
2426
* `innerWidth.current` is a reactive view of `window.innerWidth`. On the server it is `undefined`.
27+
* @since 5.11.0
2528
*/
2629
export const innerWidth = new ReactiveValue(
2730
BROWSER ? () => window.innerWidth : () => undefined,
@@ -30,6 +33,7 @@ export const innerWidth = new ReactiveValue(
3033

3134
/**
3235
* `innerHeight.current` is a reactive view of `window.innerHeight`. On the server it is `undefined`.
36+
* @since 5.11.0
3337
*/
3438
export const innerHeight = new ReactiveValue(
3539
BROWSER ? () => window.innerHeight : () => undefined,
@@ -38,6 +42,7 @@ export const innerHeight = new ReactiveValue(
3842

3943
/**
4044
* `outerWidth.current` is a reactive view of `window.outerWidth`. On the server it is `undefined`.
45+
* @since 5.11.0
4146
*/
4247
export const outerWidth = new ReactiveValue(
4348
BROWSER ? () => window.outerWidth : () => undefined,
@@ -46,6 +51,7 @@ export const outerWidth = new ReactiveValue(
4651

4752
/**
4853
* `outerHeight.current` is a reactive view of `window.outerHeight`. On the server it is `undefined`.
54+
* @since 5.11.0
4955
*/
5056
export const outerHeight = new ReactiveValue(
5157
BROWSER ? () => window.outerHeight : () => undefined,
@@ -54,6 +60,7 @@ export const outerHeight = new ReactiveValue(
5460

5561
/**
5662
* `screenLeft.current` is a reactive view of `window.screenLeft`. It is updated inside a `requestAnimationFrame` callback. On the server it is `undefined`.
63+
* @since 5.11.0
5764
*/
5865
export const screenLeft = new ReactiveValue(
5966
BROWSER ? () => window.screenLeft : () => undefined,
@@ -76,6 +83,7 @@ export const screenLeft = new ReactiveValue(
7683

7784
/**
7885
* `screenTop.current` is a reactive view of `window.screenTop`. It is updated inside a `requestAnimationFrame` callback. On the server it is `undefined`.
86+
* @since 5.11.0
7987
*/
8088
export const screenTop = new ReactiveValue(
8189
BROWSER ? () => window.screenTop : () => undefined,
@@ -98,6 +106,7 @@ export const screenTop = new ReactiveValue(
98106

99107
/**
100108
* `online.current` is a reactive view of `navigator.onLine`. On the server it is `undefined`.
109+
* @since 5.11.0
101110
*/
102111
export const online = new ReactiveValue(
103112
BROWSER ? () => navigator.onLine : () => undefined,
@@ -116,6 +125,7 @@ export const online = new ReactiveValue(
116125
* Note that behaviour differs between browsers — on Chrome it will respond to the current zoom level,
117126
* on Firefox and Safari it won't.
118127
* @type {{ get current(): number }}
128+
* @since 5.11.0
119129
*/
120130
export const devicePixelRatio = /* @__PURE__ */ new (class DevicePixelRatio {
121131
#dpr = source(BROWSER ? window.devicePixelRatio : undefined);

packages/svelte/types/index.d.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1965,45 +1965,55 @@ declare module 'svelte/reactivity' {
19651965
declare module 'svelte/reactivity/window' {
19661966
/**
19671967
* `scrollX.current` is a reactive view of `window.scrollX`. On the server it is `undefined`.
1968+
* @since 5.11.0
19681969
*/
19691970
export const scrollX: ReactiveValue<number | undefined>;
19701971
/**
19711972
* `scrollY.current` is a reactive view of `window.scrollY`. On the server it is `undefined`.
1973+
* @since 5.11.0
19721974
*/
19731975
export const scrollY: ReactiveValue<number | undefined>;
19741976
/**
19751977
* `innerWidth.current` is a reactive view of `window.innerWidth`. On the server it is `undefined`.
1978+
* @since 5.11.0
19761979
*/
19771980
export const innerWidth: ReactiveValue<number | undefined>;
19781981
/**
19791982
* `innerHeight.current` is a reactive view of `window.innerHeight`. On the server it is `undefined`.
1983+
* @since 5.11.0
19801984
*/
19811985
export const innerHeight: ReactiveValue<number | undefined>;
19821986
/**
19831987
* `outerWidth.current` is a reactive view of `window.outerWidth`. On the server it is `undefined`.
1988+
* @since 5.11.0
19841989
*/
19851990
export const outerWidth: ReactiveValue<number | undefined>;
19861991
/**
19871992
* `outerHeight.current` is a reactive view of `window.outerHeight`. On the server it is `undefined`.
1993+
* @since 5.11.0
19881994
*/
19891995
export const outerHeight: ReactiveValue<number | undefined>;
19901996
/**
19911997
* `screenLeft.current` is a reactive view of `window.screenLeft`. It is updated inside a `requestAnimationFrame` callback. On the server it is `undefined`.
1998+
* @since 5.11.0
19921999
*/
19932000
export const screenLeft: ReactiveValue<number | undefined>;
19942001
/**
19952002
* `screenTop.current` is a reactive view of `window.screenTop`. It is updated inside a `requestAnimationFrame` callback. On the server it is `undefined`.
2003+
* @since 5.11.0
19962004
*/
19972005
export const screenTop: ReactiveValue<number | undefined>;
19982006
/**
19992007
* `online.current` is a reactive view of `navigator.onLine`. On the server it is `undefined`.
2008+
* @since 5.11.0
20002009
*/
20012010
export const online: ReactiveValue<boolean | undefined>;
20022011
/**
20032012
* `devicePixelRatio.current` is a reactive view of `window.devicePixelRatio`. On the server it is `undefined`.
20042013
* Note that behaviour differs between browsers — on Chrome it will respond to the current zoom level,
20052014
* on Firefox and Safari it won't.
2006-
* */
2015+
* @since 5.11.0
2016+
*/
20072017
export const devicePixelRatio: {
20082018
get current(): number;
20092019
};

0 commit comments

Comments
 (0)