Skip to content

Commit 4daad54

Browse files
committed
[svelte] More API changes
1 parent 183077b commit 4daad54

File tree

14 files changed

+484
-484
lines changed

14 files changed

+484
-484
lines changed

package-lock.json

Lines changed: 266 additions & 266 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/client/package.json.hbs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
},
2828
"devDependencies": {
2929
{{#list}}
30-
"vite": "^8.0.0"
30+
"vite": "^8.0.3"
3131
{{#if typescript}}
32-
"typescript": "^5.9.3"
32+
"typescript": "^6.0.2"
3333
"@types/node": "^25.5.0"
3434
{{#if svelte}}
3535
"@tsconfig/svelte": "^5.0.8"
36-
"svelte-check": "^4.4.5"
36+
"svelte-check": "^4.4.6"
3737
{{/if}}
3838
{{#if react}}
3939
"@types/react": "^19.2.14"
@@ -45,13 +45,13 @@
4545
{{/if}}
4646
{{#if svelte}}
4747
"@sveltejs/vite-plugin-svelte": "^7.0.0"
48-
"svelte": "^5.54.0"
48+
"svelte": "^5.55.1"
4949
{{/if}}
5050
{{#if persistSqlite}}
51-
"vite-plugin-static-copy": "^3.3.0"
51+
"vite-plugin-static-copy": "^4.0.0"
5252
{{/if}}
5353
{{#if persistPglite}}
54-
"vite-plugin-static-copy": "^3.3.0"
54+
"vite-plugin-static-copy": "^4.0.0"
5555
{{/if}}
5656
{{#if prettier}}
5757
"prettier": "^3.8.1"
@@ -82,7 +82,7 @@
8282
"@sqlite.org/sqlite-wasm": "^3.51.2-build8"
8383
{{/if}}
8484
{{#if persistPglite}}
85-
"@electric-sql/pglite": "^0.3.16"
85+
"@electric-sql/pglite": "^0.4.2"
8686
{{/if}}
8787
{{/list}}
8888
}
@@ -102,4 +102,4 @@
102102
{{#if typescript}}
103103
{{includeFile template="client/tsconfig.json.hbs" output="client/tsconfig.json"}}
104104
{{includeFile template="client/vite-env.d.ts.hbs" output="client/src/vite-env.d.ts"}}
105-
{{/if}}
105+
{{/if}}

templates/client/src/chat/Message.svelte.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<script{{#if typescript}} lang="ts"{{/if}}>
44
import './message.css';
5-
import {createRow} from 'tinybase/ui-svelte';
5+
import {getRow} from 'tinybase/ui-svelte';
66
import {chatStore} from './chatStore';
77
{{#if typescript}}
88
{{#if schemas}}
@@ -13,7 +13,7 @@ import {chatStore} from './chatStore';
1313
1414
let {rowId}{{#if typescript}}: {rowId: string}{{/if}} = $props();
1515
16-
const message = createRow(
16+
const message = getRow(
1717
'messages',
1818
() => rowId,
1919
{{#if schemas}}chatStore as unknown as TinyBaseStore{{else}}chatStore{{/if}},

templates/client/src/chat/MessageInput.svelte.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import './button.css';
77
import './input.css';
88
import './messageInput.css';
9-
import {createValue} from 'tinybase/ui-svelte';
9+
import {getValue} from 'tinybase/ui-svelte';
1010
import {onMount} from 'svelte';
1111
import {chatStore} from './chatStore';
1212
import {settingsStore} from './settingsStore';
@@ -19,7 +19,7 @@ import {settingsStore} from './settingsStore';
1919
let message = $state('');
2020
let input{{#if typescript}}: HTMLInputElement | undefined{{/if}};
2121
22-
const username = createValue(
22+
const username = getValue(
2323
'username',
2424
{{#if schemas}}settingsStore as unknown as TinyBaseStore{{else}}settingsStore{{/if}},
2525
){{#if typescript}} as {current: string | undefined}{{/if}};

templates/client/src/chat/Messages.svelte.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<script{{#if typescript}} lang="ts"{{/if}}>
55
import './messages.css';
6-
import {createSortedRowIds} from 'tinybase/ui-svelte';
6+
import {getSortedRowIds} from 'tinybase/ui-svelte';
77
import Message from './Message.svelte';
88
import {chatStore} from './chatStore';
99
{{#if schemas}}
@@ -12,7 +12,7 @@ import {chatStore} from './chatStore';
1212
{{/if}}
1313
{{/if}}
1414
15-
const messageIds = createSortedRowIds(
15+
const messageIds = getSortedRowIds(
1616
'messages',
1717
'timestamp',
1818
false,

templates/client/src/chat/UsernameInput.svelte.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
<script{{#if typescript}} lang="ts"{{/if}}>
55
import './input.css';
66
import './usernameInput.css';
7-
import {createValue} from 'tinybase/ui-svelte';
7+
import {getValue} from 'tinybase/ui-svelte';
88
import {settingsStore} from './settingsStore';
99
{{#if schemas}}
1010
{{#if typescript}}
1111
import type {Store as TinyBaseStore} from 'tinybase';
1212
{{/if}}
1313
{{/if}}
1414
15-
const username = createValue(
15+
const username = getValue(
1616
'username',
1717
{{#if schemas}}settingsStore as unknown as TinyBaseStore{{else}}settingsStore{{/if}},
1818
){{#if typescript}} as {current: string | undefined}{{/if}};

templates/client/src/drawing/BrushSize.svelte.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
<script{{#if typescript}} lang="ts"{{/if}}>
44
import './brushSize.css';
5-
import {createValue} from 'tinybase/ui-svelte';
5+
import {getValue} from 'tinybase/ui-svelte';
66
import {settingsStore} from './settingsStore';
77
{{#if schemas}}
88
{{#if typescript}}
99
import type {Store as TinyBaseStore} from 'tinybase';
1010
{{/if}}
1111
{{/if}}
1212
13-
const size = createValue(
13+
const size = getValue(
1414
'brushSize',
1515
{{#if schemas}}settingsStore as unknown as TinyBaseStore{{else}}settingsStore{{/if}},
1616
){{#if typescript}} as {current: number | undefined}{{/if}};

templates/client/src/drawing/ColorPicker.svelte.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<script{{#if typescript}} lang="ts"{{/if}}>
44
import './colorPicker.css';
5-
import {createValue} from 'tinybase/ui-svelte';
5+
import {getValue} from 'tinybase/ui-svelte';
66
import {settingsStore} from './settingsStore';
77
{{#if schemas}}
88
{{#if typescript}}
@@ -11,7 +11,7 @@ import {settingsStore} from './settingsStore';
1111
{{/if}}
1212
1313
const colors = ['#d81b60', '#1976d2', '#388e3c', '#f57c00', '#7b1fa2', '#fff'];
14-
const currentColor = createValue(
14+
const currentColor = getValue(
1515
'brushColor',
1616
{{#if schemas}}settingsStore as unknown as TinyBaseStore{{else}}settingsStore{{/if}},
1717
){{#if typescript}} as {current: string | undefined}{{/if}};

templates/client/src/game/Board.svelte.hbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<script{{#if typescript}} lang="ts"{{/if}}>
55
import './board.css';
6-
import {createTable, createValues} from 'tinybase/ui-svelte';
6+
import {getTable, getValues} from 'tinybase/ui-svelte';
77
import Square from './Square.svelte';
88
import {store} from './store';
99
{{#if schemas}}
@@ -14,12 +14,12 @@ import {store} from './store';
1414
1515
const positions = Array.from({length: 9}, (_, i) => i.toString());
1616
17-
const board = createTable(
17+
const board = getTable(
1818
'board',
1919
{{#if schemas}}store as unknown as TinyBaseStore{{else}}store{{/if}},
2020
){{#if typescript}} as {readonly current: Record<string, {value?: string}>}{{/if}};
2121
22-
const gameState = createValues(
22+
const gameState = getValues(
2323
{{#if schemas}}store as unknown as TinyBaseStore{{else}}store{{/if}},
2424
){{#if typescript}} as {
2525
readonly current: {

templates/client/src/game/GameStatus.svelte.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
<script{{#if typescript}} lang="ts"{{/if}}>
44
import './gameStatus.css';
5-
import {createValues} from 'tinybase/ui-svelte';
5+
import {getValues} from 'tinybase/ui-svelte';
66
import {store} from './store';
77
{{#if schemas}}
88
{{#if typescript}}
99
import type {Store as TinyBaseStore} from 'tinybase';
1010
{{/if}}
1111
{{/if}}
1212
13-
const status = createValues(
13+
const status = getValues(
1414
{{#if schemas}}store as unknown as TinyBaseStore{{else}}store{{/if}},
1515
){{#if typescript}} as {
1616
readonly current: {

0 commit comments

Comments
 (0)