@ifc-lite/viewer 1.19.0 → 1.19.1

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.
Files changed (42) hide show
  1. package/.turbo/turbo-build.log +15 -14
  2. package/.turbo/turbo-typecheck.log +1 -1
  3. package/CHANGELOG.md +8 -0
  4. package/dist/assets/basketViewActivator-CA2CTcVo.js +71 -0
  5. package/dist/assets/{bcf-DOG9_WPX.js → bcf-4K724hw0.js} +18 -18
  6. package/dist/assets/{exporters-BraHBeoi.js → exporters-xbXqEDlO.js} +53 -46
  7. package/dist/assets/ids-2WdONLlu.js +2033 -0
  8. package/dist/assets/index-BXeEKqJG.css +1 -0
  9. package/dist/assets/{index-BOi3BuUI.js → index-D8Epw-e7.js} +48072 -30928
  10. package/dist/assets/{native-bridge-CpBeOPQa.js → native-bridge-DKmx1z95.js} +2 -2
  11. package/dist/assets/{sandbox-Baez7n-t.js → sandbox-tccwm5Bo.js} +547 -529
  12. package/dist/assets/{server-client-BB6cMAXE.js → server-client-LoWPK1N2.js} +1 -1
  13. package/dist/assets/three-CDRZThFA.js +4057 -0
  14. package/dist/assets/{wasm-bridge-CAYCUHbE.js → wasm-bridge-BsJGgPMs.js} +1 -1
  15. package/dist/index.html +8 -7
  16. package/dist/samples/building-architecture.ifc +453 -0
  17. package/dist/samples/hello-wall.ifc +1054 -0
  18. package/dist/samples/infra-bridge.ifc +962 -0
  19. package/package.json +7 -2
  20. package/public/samples/building-architecture.ifc +453 -0
  21. package/public/samples/hello-wall.ifc +1054 -0
  22. package/public/samples/infra-bridge.ifc +962 -0
  23. package/src/App.tsx +37 -3
  24. package/src/components/mcp/HeroScene.tsx +876 -0
  25. package/src/components/mcp/McpLanding.tsx +1318 -0
  26. package/src/components/mcp/McpPlayground.tsx +524 -0
  27. package/src/components/mcp/PlaygroundChat.tsx +1097 -0
  28. package/src/components/mcp/PlaygroundViewer.tsx +815 -0
  29. package/src/components/mcp/README.md +171 -0
  30. package/src/components/mcp/data.ts +659 -0
  31. package/src/components/mcp/playground-dispatcher.ts +1649 -0
  32. package/src/components/mcp/playground-files.ts +107 -0
  33. package/src/components/mcp/playground-uploads.ts +122 -0
  34. package/src/components/mcp/types.ts +65 -0
  35. package/src/components/mcp/use-mcp-page.ts +109 -0
  36. package/src/components/viewer/MainToolbar.tsx +19 -0
  37. package/src/components/viewer/ViewportContainer.tsx +35 -4
  38. package/src/generated/mcp-catalog.json +82 -0
  39. package/vite.config.ts +6 -0
  40. package/dist/assets/basketViewActivator-RZy5c3Td.js +0 -1
  41. package/dist/assets/ids-DQ5jY0E8.js +0 -1
  42. package/dist/assets/index-0XpVr_S5.css +0 -1
@@ -0,0 +1,171 @@
1
+ # `/mcp` landing — three alternatives
2
+
3
+ This folder holds three production-quality landing-page candidates for the
4
+ `@ifc-lite/mcp` marketing surface, plus the data and shells they share. Each
5
+ variant is a single self-contained `.tsx` that reads the same catalog +
6
+ recipes + install configs from `./data.ts` so the **content** is identical
7
+ across all three; only the **design language** changes.
8
+
9
+ ```text
10
+ data.ts — shared content (catalog, clients, recipes, snippets)
11
+ types.ts — typed shapes for the shared content
12
+ use-mcp-page.ts — useFonts / useCopy / useDocumentMeta helpers
13
+ McpLandingA.tsx — Variant A · "Atelier" (editorial dev-tool)
14
+ McpLandingB.tsx — Variant B · "Stage" (cinematic dark)
15
+ McpLandingC.tsx — Variant C · "Drafting Room" (BIM craft)
16
+ McpLandingChooser.tsx — flips between A/B/C via ?variant=
17
+ ```
18
+
19
+ The catalog is read from
20
+ `apps/viewer/src/generated/mcp-catalog.json`, currently hand-seeded with the
21
+ real shape of the v0.1 surface. A future build step
22
+ (`node packages/mcp/dist/cli.js --dump-tools`) will overwrite that file at
23
+ release time without changing the page code.
24
+
25
+ ---
26
+
27
+ ## Compare them
28
+
29
+ ```text
30
+ /mcp → Variant A (default)
31
+ /mcp?variant=a → Variant A
32
+ /mcp?variant=b → Variant B
33
+ /mcp?variant=c → Variant C
34
+ ```
35
+
36
+ A small floating chip in the bottom-right also lets you switch without
37
+ touching the URL. The chip is explicitly temporary and gets removed once a
38
+ winner is picked.
39
+
40
+ ---
41
+
42
+ ## Variant A — "Atelier"
43
+
44
+ > *Editorial dev-tool. Lineage: Stripe / Linear / JetBrains docs.*
45
+
46
+ | Aspect | Choice |
47
+ |---|---|
48
+ | Background | Warm paper `#fafaf6` (intentionally light-only) |
49
+ | Display | **Newsreader** — variable serif, optical sizes 6–72 |
50
+ | Body & code | **JetBrains Mono** for everything technical, Newsreader at small sizes for prose |
51
+ | Accent | Forest green `#1f4d35` for live elements, amber `#b8742a` for editorial markers |
52
+ | Layout | Narrow content column (`max-w-[68rem]`), 12-col internal grid, sticky-left tool nav |
53
+ | Distinctive moves | Numbered `§01–§03` sections · dropped capitals on the lede · margin "Marginal" notes (Issue · Filed under · Surface · Transports) · hairline filigree dividers · API-reference-style tool rows with `(required, fields)` parameter signatures |
54
+
55
+ **Strongest when:** the audience is engineers who scan tools/list pages
56
+ forensically and want signal density. The page reads like a printed
57
+ specimen — restrained, opinionated, deeply technical.
58
+
59
+ **Trade-offs:** the page is cool, not warm. Doesn't market the "agent
60
+ driving a building" feeling — the tool catalog is the centrepiece, not the
61
+ demo. Light-only feels deliberate but loses the developer dark-mode crowd.
62
+
63
+ ---
64
+
65
+ ## Variant B — "Stage"
66
+
67
+ > *Cinematic dark, demo-driven. Lineage: Linear marketing / Vercel AI / Apple keynote slides.*
68
+
69
+ | Aspect | Choice |
70
+ |---|---|
71
+ | Background | Deep ink `#0a0a0c` with a fractal-noise grain at 8% mix-overlay |
72
+ | Display | **Instrument Serif** with italic flex for the headlines |
73
+ | Body | **Bricolage Grotesque** (variable, weights 300–700) |
74
+ | Code | **JetBrains Mono** |
75
+ | Accent | Hi-vis chartreuse `#d6ff3f` (construction safety hint) + magenta `#ff5cdc` for interactions |
76
+ | Layout | Full-bleed sections, generous whitespace, oversized cards, horizontal recipe carousel |
77
+ | Distinctive moves | Hero contains a **live SVG IFC wireframe** that progressively colorises through 7 transcript steps (`viewer_color_by_storey` → `viewer_isolate(IfcWall)` → `viewer_colorize(...)`) so the visitor sees the agent driving the model · install grid as oversized cards with hover-glow · recipes as a horizontally scrollable transcript carousel with family-coloured headers · big italic numerals as section markers |
78
+
79
+ **Strongest when:** the goal is to make people *feel* the product before
80
+ they read about it. This is the "land on Twitter and screenshot" version —
81
+ the wireframe-in-motion is the kind of thing other dev-tool sites don't have.
82
+
83
+ **Trade-offs:** highest implementation surface (animation state, carousel,
84
+ gradients). The hero animation has to land flawlessly or it looks cheap.
85
+ Dark-only by design, which slightly clashes with the rest of the SPA's
86
+ light/dark toggle.
87
+
88
+ ---
89
+
90
+ ## Variant C — "Drafting Room"
91
+
92
+ > *BIM craft. Lineage: architectural section drawings, title blocks, Le Corbusier sketches.*
93
+
94
+ | Aspect | Choice |
95
+ |---|---|
96
+ | Background | Drafting-paper cream `#f4f1e8` over a hairline 8mm + 80mm grid |
97
+ | Display | **EB Garamond** (with italics for the "now drives an LLM" moments) |
98
+ | Body | **EB Garamond** (prose) + **JetBrains Mono** (every datum) |
99
+ | Annotations | **Caveat** — a hand-drafted face used for callouts, leader text, and pencil notes |
100
+ | Accent | Drafting-pencil red `#a8332d` for annotations, drafting blue `#4a6fa5` for live links |
101
+ | Layout | Title-block header (Sheet / Scale / Date / Drawn / Status / Version) · dimension-line section dividers with end-ticks and labelled spans |
102
+ | Distinctive moves | Hero figure is an **isometric IFC entity stack** (project → site → building → storey → wall) with leader-line callouts identifying live tool effects (`IfcWall #262 · painted via MCP`) · install rows formatted like a door-schedule (`I-01`, `I-02`, …) with Mark / Host / Spec / Type / Sht. columns · tool catalog renders as a **building schedule** with mark numbers (`01.07`), R/W/X scope chips, and a sticky storey-style legend · recipes as detail callouts with bubble + leader + "Sht. R-04" reference · north arrow + scale bar at the foot of the hero · sheet-footer pretends the page is a single drawing printed at 1:1 |
103
+
104
+ **Strongest when:** the audience is architects, structural engineers,
105
+ contractors. Nobody else in dev-tool marketing has shipped a landing that
106
+ respects the AEC craft tradition — the page itself reads as a drawing,
107
+ which is a pun the target audience will get and the LLM crowd will at
108
+ least notice. Strong word-of-mouth potential inside buildingSMART /
109
+ ifc-rs / IfcOpenShell circles.
110
+
111
+ **Trade-offs:** highest "design point of view" but smallest
112
+ "approachable for any LLM dev" surface. Someone unfamiliar with IFC may
113
+ read the page as a quirky theme rather than a marketing site. Light-only,
114
+ so dark-mode users see a flash on entry.
115
+
116
+ ---
117
+
118
+ ## How to pick
119
+
120
+ The three differ on **three axes**, not just colour:
121
+
122
+ | | Variant A | Variant B | Variant C |
123
+ |---|---|---|---|
124
+ | Centrepiece | Tool catalogue | Hero animation | Domain craft |
125
+ | Type discipline | Editorial | Cinematic | Technical drawing |
126
+ | Audience peak | Senior dev / docs reader | Founder / "show me the future" | AEC native / BIM circles |
127
+ | Risk if wrong | Feels too dry | Feels overproduced | Reads as gimmick |
128
+ | Permanence | High — easy to age well | Medium — animations age fastest | High — drafting visuals are timeless |
129
+
130
+ If the goal is **maximum reach across LLM developers**, B reads loudest.
131
+ If the goal is **lasting authority** with both engineers and AEC pros,
132
+ A is the safest. If the goal is **distinctive positioning** — the only
133
+ MCP landing that visibly came out of an architecture toolkit — C is the
134
+ strongest single-shot.
135
+
136
+ ---
137
+
138
+ ## Implementation notes
139
+
140
+ * All three variants share the same JSON snippet generator
141
+ (`makeConfigSnippet`) so the install dialogs stay in lockstep — change
142
+ it in one place when the bin gets renamed.
143
+ * All three call `useFonts(...)` which injects Google Fonts `<link>`
144
+ stylesheets while mounted, and refcounts them so flipping between
145
+ variants doesn't double-load. Fonts are intentionally NOT added to
146
+ `index.html` so the main viewer keeps its existing first-paint budget.
147
+ * `useDocumentMeta(title, themeColor)` keeps the browser tab and theme
148
+ colour aligned to whichever variant is mounted.
149
+ * The chooser writes `?variant=…` to the URL via `pushState`, so back
150
+ button works and direct deep-links to a variant are possible.
151
+ * Tool rows are deep-linkable: `/mcp#viewer_get_selection`. All three
152
+ variants honour this anchor.
153
+ * Recipes use `data.ts:RECIPES` and emit `data-uses` chips that
154
+ link directly into the catalog anchors — single source of truth.
155
+
156
+ ## Known follow-ups (not blocking the choice)
157
+
158
+ 1. **Generated catalog**: replace `apps/viewer/src/generated/mcp-catalog.json`
159
+ with output from `node packages/mcp/dist/cli.js --dump-tools` (CLI flag
160
+ to be added). The current file is hand-seeded with the real v0.1
161
+ surface so the page renders as production would.
162
+ 2. **Playground link**: all three CTA the `/mcp/playground` route, which
163
+ is now wired (see `McpPlayground.tsx`, the dispatcher, the inline
164
+ Three.js viewer, and the BYOK Anthropic chat). The whole read+write
165
+ tool surface — including BCF authoring, IDS validation, exports, and
166
+ mutations — runs against an in-browser parsed IFC. No backend.
167
+ 3. **Fonts**: Google Fonts is fine for design comparison; production may
168
+ want to self-host (woff2) for COOP/COEP compliance and stable
169
+ first-paint.
170
+ 4. **Remove the chooser chip** and replace this folder's exports with a
171
+ single `McpLanding` once the winner is picked.