Skip to content

feat: restore informational landing, move deployer to /deploy#43

Merged
dskvr merged 18 commits into
mainfrom
feat/informational-landing
Jun 17, 2026
Merged

feat: restore informational landing, move deployer to /deploy#43
dskvr merged 18 commits into
mainfrom
feat/informational-landing

Conversation

@dskvr

@dskvr dskvr commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Now that NIP-5A (Static Websites / nsites) is merged, the web deployer no longer needs to be front-and-center. This restores the SPA root to an informational site while keeping the deployer fully reachable for people who still use it.

  • RoutingApp.svelte now does lightweight client-side routing (pushState + popstate): / serves the informational landing, /deploy serves the existing web-deployer flow. Deep-links and browser back/forward both work (gateway already falls back to index.html for unknown paths).
  • Landing (LandingPage.svelte) — above-the-fold hero centered in the viewport: a large nsite wordmark, a 2–3 sentence protocol explainer with an inline NIP-5A link, a prominent Open the web deployer CTA, and an animated Learn more nudge. Below the fold keeps the existing explainer sections (What are nsites / How it works / Why nostr / Tools & Resources) plus a closing deploy CTA.
  • Deploy view — gains a ← Back to nsite.run link and drops the now-duplicated explainer content and the old "What is an nsite?" scroll nudge.
  • Document title updated to reflect the informational framing.

Note: the goal mentioned "NIP-5D", but only NIP-5A exists in the nostr/nips repo (5D.md 404s), so the inline link points to NIP-5A — the spec nsite implements and the one the banner celebrates.

Verification

  • npm run build — succeeds (pre-existing unrelated SuccessPanel unused-prop warning).
  • npm test — 120/120 pass.
  • Manually verified in a preview build: landing renders, Open the web deployer navigates to /deploy (client-side), direct deep-link to /deploy loads, and Back to nsite.run returns to /.

🤖 Generated with Claude Code

dskvr and others added 18 commits June 17, 2026 15:13
- New file packages/stealthis/src/styles.ts exports named STYLES: string
- Body is byte-identical to packages/stealthis/src/styles.css (11323 bytes)
- Replaces the Vite-only ?inline virtual-module import pattern that JSR rejects
- Named export, no default; widget.ts will switch to named import in Task 2
- styles.css and css.d.ts are deleted in Task 3 after build verification

Unblocks JSR publishing by removing the forbidden '?' path character from
the source tree. Runtime behaviour unchanged — STYLES is still a string.
- Replace line 1: import STYLES from "./styles.css?inline" (Vite virtual)
- With:           import { STYLES } from "./styles" (standards TS module)
- No file extension in specifier — matches in-package convention
- Usage at render() unchanged: <style>${STYLES}</style> still produces
  byte-identical shadow-DOM output since STYLES is still a string

Build verified:
- npx tsc --noEmit -p tsconfig.json → exit 0
- pnpm run build → dist/stealthis.{mjs,js} produced (171604, 118689 bytes)
- grep -c nd-trigger dist/stealthis.mjs → 15 (CSS survived bundling)
- grep -c 'styles.css?inline' dist/stealthis.mjs → 0 (no Vite specifier leaked)
- Remove packages/stealthis/src/styles.css (content now lives in styles.ts)
- Remove packages/stealthis/src/css.d.ts (the ambient 'declare module' for
  the old virtual-module specifier — slow-types trigger, no longer needed)
- Rewrite styles.ts JSDoc to not reference the forbidden query-suffix string
  literally, so the src/ tree contains zero matches for ?inline|?raw|?url
  (Phase 24 Success Criterion #2)

Clean-rebuild verification:
- rm -rf dist && pnpm run build → dist/stealthis.{mjs,js} produced
- grep -c nd-trigger dist/stealthis.mjs → 15
- npx tsc --noEmit → exit 0
- grep -rn '?inline|?raw|?url' packages/stealthis/src/ → 0 matches
- grep -rn 'styles\.css' packages/stealthis/src/ vite.config.ts → 0 matches
- grep -rn 'declare module .*\.css' packages/stealthis/src/ → 0 matches

styles.ts is now the sole CSS source of truth for the widget.
- Add "isolatedDeclarations": true to compilerOptions
- Add "declaration": true (required by TS 5.5+ when isolatedDeclarations is on, even with noEmit)
- Surfaces the slow-types error list that drives tasks 2-5

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Introduce named NostrConnectHandle interface (uri + connect method) matching
  the current prepareNostrConnect return shape
- Annotate prepareNostrConnect with explicit : NostrConnectHandle return type
- Replaces the ReturnType<typeof prepareNostrConnect> slow-types pattern that
  widget.ts consumes (addressed in Task 3)
- JSDoc on interface pre-empts DOCS-02 work in Plan 25-02
- Fixes TS9016 on signer.ts:76 under isolatedDeclarations

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…oyButton

- Import NostrConnectHandle as type-only from signer
- static observedAttributes -> readonly with readonly string[] type
- Every private field now has explicit type annotation (13 fields)
- ncConnect: NostrConnectHandle | null replaces ReturnType<typeof prepareNostrConnect>
- Every sync method annotated with : void (11 methods, incl. attributeChangedCallback)
- Every async method annotated with : Promise<void> (8 methods)
- Fixes TS9008 on widget.ts:114 and TS9017 on widget.ts:26 under isolatedDeclarations

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add export keyword to the RelayEvent interface (line 109)
- One edit fixes four slow-types triggers simultaneously:
  - fetchManifest return type (line 212)
  - extractMuses parameter (line 270)
  - createDeployEvent source parameter (line 281)
  - DittoTheme event field (line 448)
- JSDoc block pre-empts DOCS-02 work in Plan 25-02
- npubEncode re-export (line 66) did not require the alias fix — upstream
  type signature is nameable under isolatedDeclarations
- Verified: npx tsc --noEmit exits 0 with zero errors across all stealthis sources

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…index.ts

- Add module-level /** @module */ JSDoc block as the first thing in the file
  (JSR allEntrypointsDocs scoring requirement)
- Add `export { NsiteDeployButton } from './widget';` named re-export so JSR
  has a symbol surface to measure doc coverage against (DOCS-01)
- Preserve customElements.define + autoInject DOMContentLoaded side-effect
  behaviour unchanged
- Add `: void` return type to autoInject() for isolatedDeclarations
- Class-level JSDoc describing the web component's purpose, theming
  attributes, and ditto-theme integration
- JSDoc on static observedAttributes listing each attribute with semantics
  (mirrors README documentation for consistency)
- JSDoc on the public dittoTheme getter
- JSDoc on attributeChangedCallback lifecycle method
- Private members left undocumented by design (JSR excludes them from
  coverage count)
- EventTemplate, SignedEvent, Signer interfaces
- DEFAULT_NIP46_RELAY const
- hasExtension, extensionSigner, bunkerConnect, prepareNostrConnect functions
- NostrConnectHandle JSDoc preserved from Plan 25-01
- Private `wrap` helper and `declare global Window.nostr` block left
  undocumented by design (outside JSR's coverage scope)
- 7 interfaces: NsiteContext, Muse, MuseProfile, DittoThemeFont,
  DittoThemeBg, DittoTheme (RelayEvent already had JSDoc from Plan 25-01)
- 15 functions and the npubEncode re-export
- Covers the full public surface reachable from index.ts via the
  NsiteDeployButton type graph
- Eliminates the temp-revert dance used in Phase 24/25 dry-runs
- deno publish / jsr publish now accepts packages/stealthis as workspace member
- fmt/lint/test excludes left unchanged (stealthis is pnpm-managed TS)
- JSR manifest with $schema, name @nsite/stealthis, version 0.7.0, MIT license
- exports: ./src/index.ts (JSR publishes TS source)
- imports maps @libs/qrcode to jsr:@libs/qrcode@^3.0.1 (deno publish resolver)
- publish.include: src TS, README, LICENSE, jsr.json, package.json
- publish.exclude: dist/**, node_modules/**, pnpm-lock.yaml, test files
- Version 0.7.0 matches package.json for now; 0.8.0 lockstep bump is Plan 26-02
- Standard SPDX MIT text, copyright 2025 nsite.run contributors
- Closes missing-license error from Phase 25 Plan 03 dry-run
- Paired with license: MIT field in jsr.json (Task 2 of this plan);
  matching package.json license field lands in Plan 26-02
…json

- Split exports.import to ./dist/stealthis.mjs (DIST-01 fix — npm ESM consumers now receive built ESM, not raw .ts)
- Add license: "MIT" matching jsr.json (DOCS-05 matched pair)
- Add publishConfig { access: public, provenance: true } for npm Trusted Publisher (DIST-02)
- Add files allowlist ["dist","src","README.md","LICENSE"] (DIST-02)
- Add check-version-sync npm script pointing at ../../scripts/check-version-sync.mjs (DIST-05)
- Bump version 0.7.0 -> 0.8.0 (DIST-04, lockstep with jsr.json in same plan)
Lockstep bump with package.json.version (Task 1) — enforces the
single-commit-both-files discipline documented in research/PITFALLS.md
"#6 Version drift between package.json and jsr.json" (DIST-04).

All other jsr.json fields preserved byte-identically from Plan 26-01.
Node ESM script (no deps, built-ins only) that asserts
package.json.version === jsr.json.version, and when GITHUB_REF is set to
a refs/tags/stealthis-v<X> tag additionally asserts the tag equals both
JSON versions. Exits 0 on sync, 1 on any drift.

Wired to `pnpm --filter @nsite/stealthis run check-version-sync` via
Task 1's npm script. Phase 28 CI-02 will invoke this as the pre-publish
gate in publish-stealthis.yml.

Closes DIST-05. Defensive measure against research/PITFALLS.md "#6 —
Version drift between package.json and jsr.json".
Turn the SPA root back into an informational site now that NIP-5A is
merged. The web deployer is no longer front-and-center but remains
reachable for existing users.

- Add client-side routing in App.svelte: '/' -> informational landing,
  '/deploy' -> the existing web deployer flow (pushState + popstate).
- New LandingPage.svelte: above-the-fold hero with a large "nsite"
  wordmark, a 2-3 sentence protocol explainer with an inline NIP-5A
  link, a prominent "Open the web deployer" CTA, and an animated
  "Learn more" nudge. Below the fold keeps the existing explainer
  sections (What are nsites / How it works / Why nostr / Tools &
  Resources) plus a closing deploy CTA.
- Deploy view gains a "Back to nsite.run" link and drops the now-
  duplicated explainer content and old "What is an nsite?" nudge.
- Update document title to reflect the informational framing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Bundle Size Report

Bundle Base PR Delta Status
relay 126.5 KB 126.5 KB +0.0 KB ✅ OK
blossom 64.3 KB 64.3 KB +0.0 KB ✅ OK
gateway 235.1 KB 235.1 KB +0.0 KB ✅ OK

Generated by CI — hard limit 1MB, warning at 750KB.

@dskvr dskvr merged commit 0fdc2b0 into main Jun 17, 2026
6 checks passed
@dskvr dskvr deleted the feat/informational-landing branch June 17, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant