create-tinybase 1.0.0 → 1.0.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-tinybase",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "author": "jamesgpearce",
5
5
  "repository": {
6
6
  "type": "git",
Binary file
@@ -25,14 +25,14 @@
25
25
  "vite": "^7.3.1"
26
26
  {{#if typescript}}
27
27
  "typescript": "^5.9.3"
28
- "@types/node": "^25.0.9"
28
+ "@types/node": "^25.3.5"
29
29
  {{#if react}}
30
- "@types/react": "^19.2.8"
30
+ "@types/react": "^19.2.14"
31
31
  "@types/react-dom": "^19.2.3"
32
32
  {{/if}}
33
33
  {{/if}}
34
34
  {{#if react}}
35
- "@vitejs/plugin-react": "^5.1.2"
35
+ "@vitejs/plugin-react": "^5.1.4"
36
36
  {{/if}}
37
37
  {{#if persistSqlite}}
38
38
  "vite-plugin-static-copy": "^3.2.0"
@@ -41,7 +41,7 @@
41
41
  "vite-plugin-static-copy": "^3.2.0"
42
42
  {{/if}}
43
43
  {{#if prettier}}
44
- "prettier": "^3.8.0"
44
+ "prettier": "^3.8.1"
45
45
  {{/if}}
46
46
  {{#if eslint}}
47
47
  "eslint": "^9.39.2"
@@ -57,16 +57,16 @@
57
57
  },
58
58
  "dependencies": {
59
59
  {{#list}}
60
- "tinybase": "^7.3.2"
60
+ "tinybase": "^8.0.0"
61
61
  {{#if react}}
62
- "react": "^19.2.3"
63
- "react-dom": "^19.2.3"
62
+ "react": "^19.2.4"
63
+ "react-dom": "^19.2.4"
64
64
  {{/if}}
65
65
  {{#if sync}}
66
66
  "reconnecting-websocket": "^4.4.0"
67
67
  {{/if}}
68
68
  {{#if persistSqlite}}
69
- "@sqlite.org/sqlite-wasm": "^3.50.4-build1"
69
+ "@sqlite.org/sqlite-wasm": "^3.51.2-build6"
70
70
  {{/if}}
71
71
  {{#if persistPglite}}
72
72
  "@electric-sql/pglite": "^0.3.15"
@@ -93,4 +93,4 @@
93
93
  {{#if typescript}}
94
94
  {{includeFile template="client/tsconfig.json.hbs" output="client/tsconfig.json"}}
95
95
  {{includeFile template="client/vite-env.d.ts.hbs" output="client/src/vite-env.d.ts"}}
96
- {{/if}}
96
+ {{/if}}
@@ -3,7 +3,7 @@
3
3
  {{addImport "import './brushSize.css';"}}
4
4
 
5
5
  export const BrushSize = () => {
6
- const [size, setSize] = useValueState('brushSize', STORE_ID);
6
+ const [size, setSize] = useValueState('brushSize', STORE_ID) as [number | undefined, (value: number) => void];
7
7
 
8
8
  const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
9
9
  setSize(parseInt(e.target.value));
@@ -12,7 +12,7 @@ const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
12
12
  return (
13
13
  <div id="brushSize">
14
14
  <label>Size:</label>
15
- <input type="range" min="1" max="50" value={(size as number) ?? 5} onChange={handleChange} />
15
+ <input type="range" min="1" max="50" value={size ?? 5} onChange={handleChange} />
16
16
  <span id="brushSizeValue">{size}</span>
17
17
  </div>
18
18
  );
@@ -4,8 +4,8 @@
4
4
 
5
5
  export const GameStatus = () => {
6
6
  const gameStatus = useValue('gameStatus', STORE_ID);
7
- const currentPlayer = useValue('currentPlayer', STORE_ID);
8
- const winner = useValue('winner', STORE_ID);
7
+ const currentPlayer = useValue('currentPlayer', STORE_ID) as string;
8
+ const winner = useValue('winner', STORE_ID) as string;
9
9
 
10
10
  return (
11
11
  <div id="gameStatus">
@@ -3,7 +3,7 @@
3
3
  {{addImport "import {useCell, useSetCellCallback, useValue, STORE_ID} from './Store';"}}
4
4
 
5
5
  export const Square = ({position, disabled, winning}: {position: string; disabled: boolean; winning: boolean}) => {
6
- const value = useCell('board', position, 'value', STORE_ID);
6
+ const value = useCell('board', position, 'value', STORE_ID) as string;
7
7
  const currentPlayer = useValue('currentPlayer', STORE_ID);
8
8
 
9
9
  const isDisabled = disabled || !!value;
@@ -12,9 +12,9 @@ const currentPlayer = store.getValue('currentPlayer');
12
12
  const winner = store.getValue('winner');
13
13
 
14
14
  if (gameStatus === 'playing') {
15
- status.innerHTML = `Player <span class="player">${currentPlayer}</span>'s turn`;
15
+ status.innerHTML = `Player <span class="player">${currentPlayer as string}</span>'s turn`;
16
16
  } else if (gameStatus === 'won') {
17
- status.innerHTML = `Player <span class="winner">${winner}</span> wins!`;
17
+ status.innerHTML = `Player <span class="winner">${winner as string}</span> wins!`;
18
18
  } else if (gameStatus === 'draw') {
19
19
  status.textContent = "It's a draw!";
20
20
  }
@@ -20,7 +20,7 @@ plugins: [
20
20
  viteStaticCopy({
21
21
  targets: [
22
22
  {
23
- src: 'node_modules/@sqlite.org/sqlite-wasm/sqlite-wasm/jswasm/sqlite3.wasm',
23
+ src: 'node_modules/@sqlite.org/sqlite-wasm/dist/sqlite3.wasm',
24
24
  dest: '.'
25
25
  }
26
26
  ]
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "dependencies": {
24
24
  {{#list}}
25
- "tinybase": "^7.3.2"
25
+ "tinybase": "^8.0.0"
26
26
  {{#if (eq serverType "node")}}
27
27
  "ws": "^8.19.0"
28
28
  {{/if}}
@@ -33,7 +33,7 @@
33
33
  {{#if (eq serverType "node")}}
34
34
  "@types/ws": "^8.18.1"
35
35
  {{else}}
36
- "@cloudflare/workers-types": "^4.20260120.0"
36
+ "@cloudflare/workers-types": "^4.20260307.1"
37
37
  {{/if}}
38
38
  {{#if typescript}}
39
39
  "typescript": "^5.9.3"
@@ -42,8 +42,8 @@
42
42
  {{/if}}
43
43
  {{/if}}
44
44
  {{#if (eq serverType "durable-objects")}}
45
- "wrangler": "^4.59.2"
45
+ "wrangler": "^4.71.0"
46
46
  {{/if}}
47
47
  {{/list}}
48
48
  }
49
- }
49
+ }