@sqlrooms/cells 0.29.0-rc.11 → 0.29.0-rc.13

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.
Files changed (2) hide show
  1. package/README.md +43 -0
  2. package/package.json +10 -10
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @sqlrooms/cells
2
2
 
3
+ > **Experimental:** This package's API and behavior may change between releases.
4
+
3
5
  Shared cells model and UI primitives used by notebook and canvas views.
4
6
 
5
7
  The package owns:
@@ -9,6 +11,47 @@ The package owns:
9
11
  - in-artifact dependency edges and cascade execution
10
12
  - SQL/result execution helpers and status tracking
11
13
 
14
+ ## Setup
15
+
16
+ Cells require a room store with database state. Most apps compose them with
17
+ `createRoomShellSlice()` and a feature host such as notebook or canvas:
18
+
19
+ ```ts
20
+ import {
21
+ CellsSliceConfig,
22
+ createCellsSlice,
23
+ createDefaultCellRegistry,
24
+ } from '@sqlrooms/cells';
25
+ import {
26
+ createRoomShellSlice,
27
+ createRoomStore,
28
+ persistSliceConfigs,
29
+ } from '@sqlrooms/room-shell';
30
+
31
+ const {roomStore} = createRoomStore(
32
+ persistSliceConfigs(
33
+ {
34
+ name: 'cells-workspace',
35
+ sliceConfigSchemas: {
36
+ cells: CellsSliceConfig,
37
+ },
38
+ },
39
+ (set, get, store) => ({
40
+ ...createRoomShellSlice({})(set, get, store),
41
+ ...createCellsSlice({
42
+ cellRegistry: createDefaultCellRegistry(),
43
+ })(set, get, store),
44
+ }),
45
+ ),
46
+ );
47
+
48
+ roomStore.getState().cells.ensureArtifact('notebook-1');
49
+ ```
50
+
51
+ The registry controls which cell types can be created and how they render.
52
+ Start with `createDefaultCellRegistry()` and extend it with feature entries such
53
+ as `pivotCellRegistryEntry` when needed.
54
+
12
55
  ## Dependency and schema model
13
56
 
14
57
  - Dependencies and cascades are **artifact-local** by default.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sqlrooms/cells",
3
- "version": "0.29.0-rc.11",
3
+ "version": "0.29.0-rc.13",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/sqlrooms/sqlrooms.git"
@@ -26,14 +26,14 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@paralleldrive/cuid2": "^2.2.2",
29
- "@sqlrooms/data-table": "0.29.0-rc.11",
30
- "@sqlrooms/db": "0.29.0-rc.11",
31
- "@sqlrooms/duckdb": "0.29.0-rc.11",
32
- "@sqlrooms/room-store": "0.29.0-rc.11",
33
- "@sqlrooms/sql-editor": "0.29.0-rc.11",
34
- "@sqlrooms/ui": "0.29.0-rc.11",
35
- "@sqlrooms/utils": "0.29.0-rc.11",
36
- "@sqlrooms/vega": "0.29.0-rc.11",
29
+ "@sqlrooms/data-table": "0.29.0-rc.13",
30
+ "@sqlrooms/db": "0.29.0-rc.13",
31
+ "@sqlrooms/duckdb": "0.29.0-rc.13",
32
+ "@sqlrooms/room-store": "0.29.0-rc.13",
33
+ "@sqlrooms/sql-editor": "0.29.0-rc.13",
34
+ "@sqlrooms/ui": "0.29.0-rc.13",
35
+ "@sqlrooms/utils": "0.29.0-rc.13",
36
+ "@sqlrooms/vega": "0.29.0-rc.13",
37
37
  "@tanstack/react-table": "^8.21.3",
38
38
  "apache-arrow": "17.0.0",
39
39
  "immer": "^11.0.1",
@@ -52,5 +52,5 @@
52
52
  "react": "^18 || ^19",
53
53
  "react-dom": "^18 || ^19"
54
54
  },
55
- "gitHead": "e451e434c67f59d16a45493689f092af134b207c"
55
+ "gitHead": "d183fe9164e5f67c23b358328ca03dbf77a035a4"
56
56
  }