create-bridgething 0.12.0 → 0.14.0

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.
@@ -0,0 +1,33 @@
1
+ name: publish
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ concurrency:
9
+ group: publish
10
+ cancel-in-progress: false
11
+
12
+ permissions:
13
+ contents: write
14
+
15
+ jobs:
16
+ publish:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - uses: oven-sh/setup-bun@v2
22
+ with:
23
+ bun-version-file: .bun-version
24
+
25
+ - run: bun install --frozen-lockfile
26
+
27
+ - name: identify the publisher
28
+ run: |
29
+ git config user.name "github-actions[bot]"
30
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
31
+
32
+ - name: build every unpublished version and push the catalog
33
+ run: bun run publish
@@ -0,0 +1,7 @@
1
+ node_modules
2
+ dist
3
+ site
4
+ .dev-extension
5
+ .DS_Store
6
+ *.log
7
+ .env*
@@ -0,0 +1,10 @@
1
+ /** @type {import("prettier").Config} */
2
+ export default {
3
+ bracketSpacing: true,
4
+ bracketSameLine: true,
5
+ singleQuote: true,
6
+ trailingComma: 'all',
7
+ arrowParens: 'avoid',
8
+ semi: true,
9
+ overrides: [{ files: ['*.ts', '*.js', '*.tsx', '*.jsx', '*.cjs', '*.mjs'], options: { printWidth: 120 } }],
10
+ };
File without changes
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "__REPO_NAME__",
3
+ "private": true,
4
+ "type": "module",
5
+ "workspaces": [
6
+ "apps/*"
7
+ ],
8
+ "scripts": {
9
+ "new": "bunx create-bridgething",
10
+ "dev": "bridgething-source run dev",
11
+ "dev:device": "bridgething-source run dev:device",
12
+ "build": "bridgething-source run build",
13
+ "push": "bridgething-source run push",
14
+ "share": "bridgething-source run share",
15
+ "check": "bridgething-source check",
16
+ "bump": "bridgething-source bump",
17
+ "shot": "bridgething-source shot",
18
+ "catalog": "bridgething-source catalog",
19
+ "publish": "bridgething-source publish",
20
+ "skills": "bridgething-source skills",
21
+ "format": "prettier --write \"*.json\" \"*.js\""
22
+ },
23
+ "devDependencies": {
24
+ "prettier": "^3.9.6",
25
+ "typescript": "^6.0.3"
26
+ }
27
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "__SOURCE_NAME__",
3
+ "description": "__SOURCE_DESCRIPTION__",
4
+ "homepage": "https://github.com/__REPO_OWNER__/__REPO_NAME__",
5
+ "icon": null,
6
+ "base_url": "https://__REPO_OWNER_LOWER__.github.io/__REPO_NAME__",
7
+ "recommended_sources": []
8
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "@bridgething/client": "^0.14.0",
3
+ "@bridgething/extension": "^0.14.0",
4
+ "@bridgething/source": "^0.14.0",
5
+ "libbridgething": "0.14.0"
6
+ }
@@ -1,71 +0,0 @@
1
- # Building this bridgething webapp
2
-
3
- A bridgething webapp is one page running full-screen in the chromium kiosk on a
4
- Spotify Car Thing. It reaches the on-device daemon through `@bridgething/client`.
5
-
6
- ## The device
7
-
8
- The screen is 800x480, landscape, and never resizes. The kiosk shows one webapp,
9
- so build in-app views rather than tabs or windows. Add an on-screen keyboard if
10
- the app needs text entry.
11
-
12
- Listen with a `keydown` handler and a `wheel` handler on `window`.
13
-
14
- | Control | Event |
15
- | ------------ | ------------------------------------- |
16
- | Preset 1-4 | `keydown` key `"1"` `"2"` `"3"` `"4"` |
17
- | Mode | `keydown` key `"m"` |
18
- | Back | `keydown` key `"Escape"` |
19
- | Rotary wheel | `wheel` with horizontal `deltaX` |
20
- | Touch | pointer and touch events |
21
-
22
- Make horizontal wheel scroll move through the main list. Five fast presses of
23
- Mode returns to the launcher.
24
-
25
- ## The client
26
-
27
- ```ts
28
- import { BridgethingClient } from '@bridgething/client';
29
- import { useMemo } from 'react';
30
-
31
- import { daemonUrl } from './daemon';
32
-
33
- const client = useMemo(() => new BridgethingClient({ url: daemonUrl() }), []);
34
- ```
35
-
36
- Construct it once and reuse it. It connects and reconnects on its own. Call
37
- `daemonUrl()` instead of a literal `ws://` address.
38
-
39
- Now-playing and library data come from the phone's Spotify, so render a
40
- placeholder when no phone is connected. Fetch artwork with `client.asset.get`
41
- using the opaque id on the track.
42
-
43
- Every surface: `player asset config store doc capabilities library audio
44
- notifications phone peer geo net hardware bluetooth system time voice lyrics
45
- webapp forward`. Each method is an event, a request, or a command.
46
-
47
- Methods, types, and examples: `.claude/skills/bridgething/reference/sdk.md`.
48
-
49
- ## `public/manifest.json`
50
-
51
- - `id` identifies this webapp on the device. Keep it.
52
- - `version` tells builds apart. Raise it before sharing an update.
53
- - `config` declares the settings the companion app edits and `client.config`
54
- reads.
55
- - `permissions` grants `geo` and `net.proxy`.
56
- - `art.heroPx` and `art.thumbPx` are the sizes artwork arrives at.
57
- - `settings` names the page built from `settings/`, capped at 1 MiB. It talks to
58
- the companion app through `@bridgething/client/settings`.
59
-
60
- ## Workflow
61
-
62
- - `bun run dev` serves at `http://localhost:5173/` against the connected Car
63
- Thing.
64
- - `bun run dev:device` shows that server on the device's own screen.
65
- - `bun run build` writes `dist/`.
66
- - `bun run push` builds and installs onto the connected device.
67
- - `bun run share` zips `dist/`.
68
- - `bun run update` brings the device to the latest bridgething release.
69
-
70
- Running and driving the app: `.claude/skills/bridgething/reference/develop.md`.
71
- Push, zip, update: `.claude/skills/bridgething/reference/ship.md`.
@@ -1,57 +0,0 @@
1
- # **PROJECT_NAME**
2
-
3
- A bridgething webapp scaffolded with `create-bridgething`. It runs full-screen in
4
- the chromium kiosk on a Spotify Car Thing and talks to the on-device daemon
5
- through [`@bridgething/client`](https://github.com/JoeyEamigh/bridgething).
6
-
7
- Stack: React 19, Vite, Tailwind v4, TypeScript strict.
8
-
9
- Open this folder with your coding agent. It reads `CLAUDE.md` or `AGENTS.md` and
10
- the `/bridgething` skill.
11
-
12
- ## Develop
13
-
14
- ```bash
15
- bun install
16
- bun run dev
17
- ```
18
-
19
- Vite serves at http://localhost:5173/ with hot reload, against the daemon on the
20
- Car Thing plugged in over USB. Set `SUPERBIRD_HOST` to target another device, or
21
- `BRIDGETHING_DAEMON_URL` to reach a daemon elsewhere.
22
-
23
- ```bash
24
- bun run dev:device
25
- ```
26
-
27
- The same server, shown on the Car Thing's own screen, hot reload included.
28
- Ctrl-C hands the screen back to the installed build.
29
-
30
- When the project ships an extension (`extension/main.ts`), both commands bundle
31
- it on every save and run it under Deno with the permissions the manifest
32
- declares.
33
-
34
- ## Push, share, update
35
-
36
- ```bash
37
- bun run push # build, copy to the Car Thing, switch the kiosk to it
38
- bun run build
39
- bun run share # write <name>-<version>.zip from dist/
40
- bun run update # bring the device to the latest bridgething release
41
- ```
42
-
43
- `push` targets `bridgething.local` over USB; pass a host or IP address for
44
- another device. Anyone with a bridgething Car Thing installs the zip from the
45
- companion app. For one device out of several,
46
- `bun run update -- --host ws://bridgething-<serial>.local:8892/`.
47
-
48
- ## Layout
49
-
50
- - `src/App.tsx` subscribes to `client.player.onSnapshot`, fetches artwork through
51
- `client.asset.get`, and draws transport controls.
52
- - `src/daemon.ts` returns the daemon URL.
53
- - `public/manifest.json` carries the webapp id, version, config schema, and
54
- permissions.
55
- - `settings/` is the settings page the companion app renders, built to
56
- `dist/settings.html`.
57
- - `index.html` and `vite.config.ts` fix the 800x480 viewport and the build target.