tosijs-ui 1.6.20 → 1.6.21

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/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "1.6.20";
1
+ export declare const version = "1.6.21";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const version = '1.6.20';
1
+ export const version = '1.6.21';
package/llms.txt CHANGED
@@ -1,4 +1,4 @@
1
- # tosijs-ui v1.6.20
1
+ # tosijs-ui v1.6.21
2
2
 
3
3
  Simple, robust web-components for use with tosijs or anything else.
4
4
 
@@ -10,6 +10,13 @@ Simple, robust web-components for use with tosijs or anything else.
10
10
 
11
11
  Full documentation, with live code examples, is at the links below.
12
12
 
13
+ Live examples run inline on the shared page by default (not sandboxed):
14
+ each has its own `preview` element, but they share one tosijs module, so
15
+ `tosi()` state singletons are shared across every example on a page. This is
16
+ deliberate (it shows tosi isolation and lets you drive demos via the global
17
+ singleton). Namespace example state with unique top-level keys so examples
18
+ don't clobber each other; the `iframe` attribute isolates DOM/CSS, not state.
19
+
13
20
  ## Pages
14
21
 
15
22
  - https://ui.tosijs.net/babylon-3d/ — 3d
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tosijs-ui",
3
- "version": "1.6.20",
3
+ "version": "1.6.21",
4
4
  "description": "simple robust web-components for use with tosijs or anything else",
5
5
  "scripts": {
6
6
  "start": "bun --watch bin/dev.ts",
@@ -42,7 +42,7 @@
42
42
  "happy-dom": "^20.7.0",
43
43
  "playwright": "^1.58.2",
44
44
  "prettier": "^2.8.8",
45
- "tjs-lang": "0.8.7",
45
+ "tjs-lang": "0.9.0",
46
46
  "tosijs": "^1.6.6",
47
47
  "typescript": "^5.9.3",
48
48
  "typescript-eslint": "^8"
@@ -51,7 +51,7 @@
51
51
  "@resvg/resvg-js": "^2.6.2",
52
52
  "happy-dom": "^20.7.0",
53
53
  "marked": "^16.4.2",
54
- "tjs-lang": "^0.8.7",
54
+ "tjs-lang": "^0.9.0",
55
55
  "tosijs": "^1.6.6"
56
56
  },
57
57
  "peerDependenciesMeta": {
@@ -50,22 +50,38 @@ fi
50
50
  # Trust the local CA (idempotent — safe to run every time).
51
51
  mkcert -install
52
52
 
53
- # Bonjour/mDNS name of this machine, so the same cert works when another
54
- # device on the LAN hits https://<name>.local:8787.
53
+ # Bonjour/mDNS name of this machine, so the same cert works when another device
54
+ # on the LAN hits https://<name>.local:8787. On macOS the advertised name is the
55
+ # LocalHostName (`scutil --get LocalHostName`), e.g. "Persiflex" → persiflex.local.
56
+ #
57
+ # Hardened: lowercase it (the mDNS convention, and dodges any case-sensitive
58
+ # client), strip a `.local` the source may already carry (no `foo.local.local`),
59
+ # and only add it when we actually have a usable name — so a machine with no
60
+ # LocalHostName never gets a bare ".local" SAN.
55
61
  if [[ "$(uname)" == "Darwin" ]]; then
56
- LOCAL_NAME="$(scutil --get LocalHostName 2>/dev/null || hostname -s).local"
62
+ MDNS="$(scutil --get LocalHostName 2>/dev/null || true)"
63
+ [[ -z "$MDNS" ]] && MDNS="$(hostname -s 2>/dev/null || true)"
57
64
  else
58
- LOCAL_NAME="$(hostname -s).local"
65
+ MDNS="$(hostname -s 2>/dev/null || true)"
66
+ fi
67
+ MDNS="$(printf '%s' "$MDNS" | tr '[:upper:]' '[:lower:]' | sed -E 's/\.local$//')"
68
+
69
+ NAMES=(localhost 127.0.0.1 ::1)
70
+ LOCAL_NAME=""
71
+ if [[ -n "$MDNS" && "$MDNS" != "localhost" ]]; then
72
+ LOCAL_NAME="${MDNS}.local"
73
+ NAMES+=("$LOCAL_NAME")
59
74
  fi
60
75
 
61
- mkcert \
62
- -key-file key.pem \
63
- -cert-file certificate.pem \
64
- localhost 127.0.0.1 ::1 "$LOCAL_NAME"
76
+ mkcert -key-file key.pem -cert-file certificate.pem "${NAMES[@]}"
65
77
 
66
78
  echo
67
79
  echo "Wrote tls/key.pem and tls/certificate.pem"
68
- echo "Valid for: localhost, 127.0.0.1, ::1, $LOCAL_NAME"
80
+ echo "Valid for: ${NAMES[*]}"
81
+ if [[ -z "$LOCAL_NAME" ]]; then
82
+ echo "(No Bonjour/.local name detected — set one in System Settings > Sharing"
83
+ echo " > Local hostname, then re-run to cover https://<name>.local.)"
84
+ fi
69
85
  echo
70
86
  echo "Local browsers: no warnings."
71
87
  echo "Other devices (phone, another laptop): copy the CA root to each and trust it —"