@sqlrooms/room-config 0.26.1-rc.4 → 0.26.1-rc.5

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/README.md CHANGED
@@ -38,16 +38,14 @@ console.log(roomConfig.name); // 'My SQL Room'
38
38
 
39
39
  ### Persisting Room Configuration
40
40
 
41
- Room configuration is designed to be saved and restored between sessions. Here's how to use it with Zustand's persist middleware:
41
+ Room configuration is designed to be saved and restored between sessions. Here's how to use the `persistSliceConfigs` helper:
42
42
 
43
43
  ```tsx
44
- import {persist} from 'zustand/middleware';
45
44
  import {
46
45
  createRoomStore,
47
46
  createRoomShellSlice,
48
47
  RoomShellSliceState,
49
- StateCreator,
50
- createPersistHelpers,
48
+ persistSliceConfigs,
51
49
  LayoutConfig,
52
50
  } from '@sqlrooms/room-shell';
53
51
  import {BaseRoomConfig} from '@sqlrooms/room-config';
@@ -56,7 +54,14 @@ type MyRoomState = RoomShellSliceState;
56
54
 
57
55
  // Create a store with persistence for configuration
58
56
  const {useRoomStore} = createRoomStore<MyRoomState>(
59
- persist(
57
+ persistSliceConfigs(
58
+ {
59
+ name: 'room-config-storage',
60
+ sliceConfigSchemas: {
61
+ room: BaseRoomConfig,
62
+ layout: LayoutConfig,
63
+ },
64
+ },
60
65
  (set, get, store) => ({
61
66
  ...createRoomShellSlice({
62
67
  config: {
@@ -73,15 +78,7 @@ const {useRoomStore} = createRoomStore<MyRoomState>(
73
78
  },
74
79
  })(set, get, store),
75
80
  }),
76
- {
77
- name: 'room-config-storage',
78
- // Use helper to persist configuration
79
- ...createPersistHelpers({
80
- room: BaseRoomConfig,
81
- layout: LayoutConfig,
82
- }),
83
- },
84
- ) as StateCreator<MyRoomState>,
81
+ ),
85
82
  );
86
83
 
87
84
  // Access the config in components
package/dist/index.d.ts CHANGED
@@ -2,8 +2,8 @@
2
2
  * {@include ../README.md}
3
3
  * @packageDocumentation
4
4
  */
5
- export * from './BaseRoomConfig';
6
- export * from './DataSource';
7
- export * from './LoadOptions';
8
- export * from '@sqlrooms/layout-config';
5
+ export { BaseRoomConfig, DEFAULT_ROOM_TITLE, createDefaultBaseRoomConfig, } from './BaseRoomConfig';
6
+ export { DataSourceTypes, BaseDataSource, FileDataSource, UrlDataSource, SqlQueryDataSource, DataSource, isFileDataSource, isUrlDataSource, isSqlQueryDataSource, } from './DataSource';
7
+ export { LoadFile, StandardLoadOptions, SpatialLoadOptions, SpatialLoadFileOptions, isSpatialLoadFileOptions, StandardLoadFileOptions, LoadFileOptions, } from './LoadOptions';
8
+ export { MAIN_VIEW, LayoutTypes, DEFAULT_MOSAIC_LAYOUT, createDefaultMosaicLayout, MosaicLayoutDirection, MosaicLayoutParent, isMosaicLayoutParent, MosaicLayoutNodeKey, MosaicLayoutNode, MosaicLayoutConfig, LayoutConfig, } from '@sqlrooms/layout-config';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAE9B,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,eAAe,EACf,cAAc,EACd,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,oBAAoB,GACrB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,eAAe,GAChB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,SAAS,EACT,WAAW,EACX,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,GACb,MAAM,yBAAyB,CAAC"}
package/dist/index.js CHANGED
@@ -2,8 +2,10 @@
2
2
  * {@include ../README.md}
3
3
  * @packageDocumentation
4
4
  */
5
- export * from './BaseRoomConfig';
6
- export * from './DataSource';
7
- export * from './LoadOptions';
8
- export * from '@sqlrooms/layout-config';
5
+ // Values also export their corresponding types automatically (Zod pattern)
6
+ export { BaseRoomConfig, DEFAULT_ROOM_TITLE, createDefaultBaseRoomConfig, } from './BaseRoomConfig';
7
+ export { DataSourceTypes, BaseDataSource, FileDataSource, UrlDataSource, SqlQueryDataSource, DataSource, isFileDataSource, isUrlDataSource, isSqlQueryDataSource, } from './DataSource';
8
+ export { LoadFile, StandardLoadOptions, SpatialLoadOptions, SpatialLoadFileOptions, isSpatialLoadFileOptions, StandardLoadFileOptions, LoadFileOptions, } from './LoadOptions';
9
+ // Re-export from @sqlrooms/layout-config
10
+ export { MAIN_VIEW, LayoutTypes, DEFAULT_MOSAIC_LAYOUT, createDefaultMosaicLayout, MosaicLayoutDirection, MosaicLayoutParent, isMosaicLayoutParent, MosaicLayoutNodeKey, MosaicLayoutNode, MosaicLayoutConfig, LayoutConfig, } from '@sqlrooms/layout-config';
9
11
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAE9B,cAAc,yBAAyB,CAAC","sourcesContent":["/**\n * {@include ../README.md}\n * @packageDocumentation\n */\n\nexport * from './BaseRoomConfig';\nexport * from './DataSource';\nexport * from './LoadOptions';\n\nexport * from '@sqlrooms/layout-config';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,2EAA2E;AAC3E,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,eAAe,EACf,cAAc,EACd,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,oBAAoB,GACrB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,eAAe,GAChB,MAAM,eAAe,CAAC;AAEvB,yCAAyC;AACzC,OAAO,EACL,SAAS,EACT,WAAW,EACX,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,GACb,MAAM,yBAAyB,CAAC","sourcesContent":["/**\n * {@include ../README.md}\n * @packageDocumentation\n */\n\n// Values also export their corresponding types automatically (Zod pattern)\nexport {\n BaseRoomConfig,\n DEFAULT_ROOM_TITLE,\n createDefaultBaseRoomConfig,\n} from './BaseRoomConfig';\n\nexport {\n DataSourceTypes,\n BaseDataSource,\n FileDataSource,\n UrlDataSource,\n SqlQueryDataSource,\n DataSource,\n isFileDataSource,\n isUrlDataSource,\n isSqlQueryDataSource,\n} from './DataSource';\n\nexport {\n LoadFile,\n StandardLoadOptions,\n SpatialLoadOptions,\n SpatialLoadFileOptions,\n isSpatialLoadFileOptions,\n StandardLoadFileOptions,\n LoadFileOptions,\n} from './LoadOptions';\n\n// Re-export from @sqlrooms/layout-config\nexport {\n MAIN_VIEW,\n LayoutTypes,\n DEFAULT_MOSAIC_LAYOUT,\n createDefaultMosaicLayout,\n MosaicLayoutDirection,\n MosaicLayoutParent,\n isMosaicLayoutParent,\n MosaicLayoutNodeKey,\n MosaicLayoutNode,\n MosaicLayoutConfig,\n LayoutConfig,\n} from '@sqlrooms/layout-config';\n"]}
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@sqlrooms/room-config",
3
- "version": "0.26.1-rc.4",
3
+ "version": "0.26.1-rc.5",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/index.js",
7
7
  "type": "module",
8
+ "sideEffects": false,
8
9
  "author": "Ilya Boyandin <ilya@boyandin.me>",
9
10
  "license": "MIT",
10
11
  "repository": {
@@ -18,7 +19,7 @@
18
19
  "access": "public"
19
20
  },
20
21
  "dependencies": {
21
- "@sqlrooms/layout-config": "0.26.1-rc.4",
22
+ "@sqlrooms/layout-config": "0.26.1-rc.5",
22
23
  "zod": "^4.1.8"
23
24
  },
24
25
  "peerDependencies": {
@@ -32,5 +33,5 @@
32
33
  "typecheck": "tsc --noEmit",
33
34
  "typedoc": "typedoc"
34
35
  },
35
- "gitHead": "fa5390a5f1fc0f5f59e914046acd67133175d68a"
36
+ "gitHead": "1df21f4729c5deb96f7af790cff7c189c6885074"
36
37
  }