Feat v0.5.0 realtime dialog (#30)
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-frontend (push) Successful in 5s
CI/CD / test-go-pg (push) Successful in 2m36s
CI/CD / test-sqlite (push) Successful in 2m43s
CI/CD / build-and-deploy (push) Successful in 1m19s

Co-authored-by: Jeffrey Smith <jasafpro@gmail.com>
Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #30.
This commit is contained in:
2026-03-30 11:07:27 +00:00
committed by xcaliber
parent eb9a2d7d27
commit 2abf406db8
21 changed files with 680 additions and 22 deletions

View File

@@ -21,6 +21,7 @@ import { createTheme } from './theme.js';
import { createStorage } from './storage.js';
import { createSlots } from './slots.js';
import { createActions } from './actions.js';
import { createRealtime } from './realtime.js';
import { confirm } from '../primitives/confirm.js';
import { prompt } from '../primitives/prompt.js';
@@ -70,6 +71,7 @@ export async function boot() {
const storage = createStorage();
const slots = createSlots(events.emit.bind(events));
const actions = createActions(events.emit.bind(events));
const realtime = createRealtime(events);
// 7. Assemble sw object
const sw = Object.create(null);
@@ -102,6 +104,9 @@ export async function boot() {
sw.slots = slots;
sw.actions = actions;
// Realtime — room-scoped pub/sub over WebSocket (v0.5.0)
sw.realtime = realtime;
// Shell helpers — imperative confirm/prompt backed by primitives
sw.confirm = confirm;
sw.prompt = prompt;
@@ -162,7 +167,7 @@ export async function boot() {
};
// Marker for idempotency
sw._sdk = '0.2.3';
sw._sdk = '0.5.0';
// 8. Expose globally
window.sw = sw;