index.js — svelte Source File
Architecture documentation for index.js, a javascript file in the svelte codebase. 10 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 424ba0d0_af52_9fbe_df46_22ab25a95a14["index.js"] dbd5109f_e29b_bbbf_8573_b47d1cf23d5a["index.js"] 424ba0d0_af52_9fbe_df46_22ab25a95a14 --> dbd5109f_e29b_bbbf_8573_b47d1cf23d5a 01ad7075_03ac_8603_15c0_1261b1448369["reactive-value.js"] 424ba0d0_af52_9fbe_df46_22ab25a95a14 --> 01ad7075_03ac_8603_15c0_1261b1448369 b486621e_e5a2_e818_93d0_84358fa8b8a7["ReactiveValue"] 424ba0d0_af52_9fbe_df46_22ab25a95a14 --> b486621e_e5a2_e818_93d0_84358fa8b8a7 a90e5ee7_62bf_5257_b6d7_6579a13ff90b["index.js"] 424ba0d0_af52_9fbe_df46_22ab25a95a14 --> a90e5ee7_62bf_5257_b6d7_6579a13ff90b e5c35d51_28d8_9054_923d_b7f82a3c8dc2["sources.js"] 424ba0d0_af52_9fbe_df46_22ab25a95a14 --> e5c35d51_28d8_9054_923d_b7f82a3c8dc2 63ee8247_ada4_9f1d_e139_0c1167cd5b1c["set"] 424ba0d0_af52_9fbe_df46_22ab25a95a14 --> 63ee8247_ada4_9f1d_e139_0c1167cd5b1c 1e2f7428_6050_5cb7_69db_bf5db719f6d1["source"] 424ba0d0_af52_9fbe_df46_22ab25a95a14 --> 1e2f7428_6050_5cb7_69db_bf5db719f6d1 2696eb67_452f_4c32_3e13_ee172192b366["tracing.js"] 424ba0d0_af52_9fbe_df46_22ab25a95a14 --> 2696eb67_452f_4c32_3e13_ee172192b366 4dfcf957_8573_ff55_bd31_4181227109e3["tag"] 424ba0d0_af52_9fbe_df46_22ab25a95a14 --> 4dfcf957_8573_ff55_bd31_4181227109e3 c9866d91_a204_fa55_a9e3_6bcc6aaaec1e["esm-env"] 424ba0d0_af52_9fbe_df46_22ab25a95a14 --> c9866d91_a204_fa55_a9e3_6bcc6aaaec1e style 424ba0d0_af52_9fbe_df46_22ab25a95a14 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { BROWSER, DEV } from 'esm-env';
import { on } from '../../events/index.js';
import { ReactiveValue } from '../reactive-value.js';
import { get } from '../../internal/client/index.js';
import { set, source } from '../../internal/client/reactivity/sources.js';
import { tag } from '../../internal/client/dev/tracing.js';
/**
* `scrollX.current` is a reactive view of `window.scrollX`. On the server it is `undefined`.
* @since 5.11.0
*/
export const scrollX = new ReactiveValue(
BROWSER ? () => window.scrollX : () => undefined,
(update) => on(window, 'scroll', update)
);
/**
* `scrollY.current` is a reactive view of `window.scrollY`. On the server it is `undefined`.
* @since 5.11.0
*/
export const scrollY = new ReactiveValue(
BROWSER ? () => window.scrollY : () => undefined,
(update) => on(window, 'scroll', update)
);
/**
* `innerWidth.current` is a reactive view of `window.innerWidth`. On the server it is `undefined`.
* @since 5.11.0
*/
export const innerWidth = new ReactiveValue(
BROWSER ? () => window.innerWidth : () => undefined,
(update) => on(window, 'resize', update)
);
/**
* `innerHeight.current` is a reactive view of `window.innerHeight`. On the server it is `undefined`.
* @since 5.11.0
*/
export const innerHeight = new ReactiveValue(
BROWSER ? () => window.innerHeight : () => undefined,
(update) => on(window, 'resize', update)
);
/**
* `outerWidth.current` is a reactive view of `window.outerWidth`. On the server it is `undefined`.
* @since 5.11.0
*/
export const outerWidth = new ReactiveValue(
BROWSER ? () => window.outerWidth : () => undefined,
(update) => on(window, 'resize', update)
);
/**
* `outerHeight.current` is a reactive view of `window.outerHeight`. On the server it is `undefined`.
* @since 5.11.0
*/
export const outerHeight = new ReactiveValue(
BROWSER ? () => window.outerHeight : () => undefined,
(update) => on(window, 'resize', update)
);
// ... (102 more lines)
Domain
Subdomains
Functions
Dependencies
Source
Frequently Asked Questions
What does index.js do?
index.js is a source file in the svelte codebase, written in javascript. It belongs to the SharedInternal domain, DOMUtils subdomain.
What functions are defined in index.js?
index.js defines 9 function(s): innerHeight, innerWidth, online, outerHeight, outerWidth, screenLeft, screenTop, scrollX, scrollY.
What does index.js depend on?
index.js imports 10 module(s): ReactiveValue, esm-env, index.js, index.js, reactive-value.js, set, source, sources.js, and 2 more.
Where is index.js in the architecture?
index.js is located at packages/svelte/src/reactivity/window/index.js (domain: SharedInternal, subdomain: DOMUtils, directory: packages/svelte/src/reactivity/window).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free