@lavalogic/scoria 0.0.20 → 0.0.21

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.
@@ -13,6 +13,7 @@ import { CheckboxDef } from '../Columns/Definitions/Accessors/CheckboxDef.svelte
13
13
  import { DateInputDef } from '../Columns/Definitions/Accessors/DateInputDef.svelte.js';
14
14
  import { ProgressBarDef } from '../Columns/Definitions/Display/ProgressBarDef.svelte.js';
15
15
  import { DisplayDef } from '../Columns/Definitions/Display/DisplayDef.svelte.js';
16
+ import { browser } from '$app/environment';
16
17
  const SORTING_ICON_WIDTH = 24;
17
18
  const InternalSymbol = Symbol();
18
19
  export class TableContext {
@@ -63,7 +64,7 @@ export class TableContext {
63
64
  // this.tableOptions.manualSorting = dataRepo.manualSorting;
64
65
  }
65
66
  this.userId = $derived(getUserId());
66
- if (localStorage) {
67
+ if (browser) {
67
68
  this._getUserDefaults();
68
69
  const removeInvalidPresets = () => {
69
70
  console.warn('invalid presets');
@@ -1,4 +1,5 @@
1
1
  import { SvelteMap } from 'svelte/reactivity';
2
+ import { browser } from '$app/environment';
2
3
  export class TableDataRepository {
3
4
  tableName;
4
5
  getUserId;
@@ -16,7 +17,7 @@ export class TableDataRepository {
16
17
  set paginationState(v) {
17
18
  this._previouslyViewedPage = this._paginationState?.pageIndex;
18
19
  this._paginationState = v;
19
- if (localStorage) {
20
+ if (browser) {
20
21
  localStorage.setItem(`${this.getUserId()}-${this.tableName}-page-size`, v.pageSize.toString());
21
22
  }
22
23
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lavalogic/scoria",
3
3
  "description": "Svelte components used for the FloWMS Web Frontend",
4
- "version": "0.0.20",
4
+ "version": "0.0.21",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },
@@ -23,6 +23,7 @@
23
23
  }
24
24
  },
25
25
  "peerDependencies": {
26
+ "@sveltejs/kit": "^2.0.0",
26
27
  "svelte": "^5.0.0"
27
28
  },
28
29
  "devDependencies": {