@volter/teams 0.2.17 → 0.2.19

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/board-name.mjs ADDED
@@ -0,0 +1,14 @@
1
+ // A board's name, the last part of its address (sc:<machine>:board:<name>): the one rule both the board (which names
2
+ // itself) and a machine's daemon (which finds a board among the homes registered with it) read. A home's own board is
3
+ // named for the folder that owns the home (`…/volter-org/home` is `volter-org`), a named board of it `<that>/<board>`;
4
+ // any character other than A-Z a-z 0-9 _ . - in the name becomes `-`.
5
+ import { basename, dirname } from 'node:path';
6
+
7
+ /** The board's label as people read it: `volter-org`, or `volter-org/<board>` for a named board. */
8
+ export function boardLabel(root, slug) {
9
+ const home = basename(root) === 'home' ? basename(dirname(root)) : basename(root);
10
+ return slug && slug !== 'default' ? `${home}/${slug}` : home;
11
+ }
12
+
13
+ /** The label as an address carries it. */
14
+ export const boardName = (label) => label.replace(/[^A-Za-z0-9_.-]/g, '-');
@@ -218,6 +218,7 @@ export function browserHarnessTransport(channel) {
218
218
  const text = new TextDecoder();
219
219
  let pending = '';
220
220
  current.on('data', (chunk) => {
221
+ if (stream !== current) return; // a replaced stream's late lines are not the client's
221
222
  pending += typeof chunk === 'string' ? chunk : text.decode(chunk, { stream: true });
222
223
  let end;
223
224
  while ((end = pending.indexOf('\n')) >= 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/teams",
3
- "version": "0.2.17",
3
+ "version": "0.2.19",
4
4
  "type": "module",
5
5
  "description": "Volter Teams, the neutral team plane: machine identity and daemon core, the local door and server link, admission from machine grants, product doors, and the Teams server's neutral routes (company RFC 0008).",
6
6
  "license": "MIT",
@@ -53,7 +53,8 @@
53
53
  "./redact": {
54
54
  "default": "./redact.mjs"
55
55
  },
56
- "./checkout": "./checkout.mjs"
56
+ "./checkout": "./checkout.mjs",
57
+ "./board-name": "./board-name.mjs"
57
58
  },
58
59
  "files": [
59
60
  "LICENSE-MIT",
@@ -11,9 +11,10 @@
11
11
  * `brand(<role>)`; scripts/build-styles.mjs expands each to
12
12
  * `var(--volter-<role>, <brand value>)`, colours as light-dark(). A host
13
13
  * that sets `--volter-*` (the brand's tokens.css) or `--scui-*` governs.
14
- * The scheme follows `--scui-color-scheme`
15
- * (default `light dark`, i.e. the OS), or the host's own `color-scheme`
16
- * when it sets `--scui-color-scheme: inherit`.
14
+ * The scheme follows `--scui-color-scheme` (default `light dark`, i.e.
15
+ * the OS). A host with its own theme sets it to `light` or `dark` with
16
+ * that theme: `inherit` there inherits the custom property itself, not
17
+ * the host's `color-scheme`, and leaves the OS's scheme in force.
17
18
  * 2. Component tokens (`--scui-user-bg`, `--scui-envelope-radius`, ...) are
18
19
  * never declared: each is read with its default as a fallback at the use
19
20
  * site, so the default tracks the primitives wherever they are overridden.