graview 0.1.20 → 0.1.22
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/README.md +22 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/dist/preview/chunk.2F7OKRDK.js +9 -0
- package/dist/preview/chunk.3HEJZPJM.js +1040 -0
- package/dist/preview/chunk.3MLQ3Q5X.js +1 -0
- package/dist/preview/chunk.4CDEIDKB.js +1 -0
- package/dist/preview/chunk.4HGBVU5B.js +1 -0
- package/dist/preview/chunk.4JSMCNF7.js +1 -0
- package/dist/preview/chunk.4UQLZ7VW.js +1 -0
- package/dist/preview/chunk.5JNXQHN4.js +1 -0
- package/dist/preview/chunk.5MAMCKVU.js +1 -0
- package/dist/preview/chunk.6C7SJJQO.js +1 -0
- package/dist/preview/chunk.6CLHFNDM.js +321 -0
- package/dist/preview/chunk.6KJSFIO7.js +1 -0
- package/dist/preview/chunk.75WDSWXL.js +20 -0
- package/dist/preview/chunk.7YC34AIK.js +1 -0
- package/dist/preview/chunk.7YCQZJGB.js +1 -0
- package/dist/preview/chunk.ACZGK7LQ.js +1 -0
- package/dist/preview/chunk.AHDOKM4O.js +1 -0
- package/dist/preview/chunk.AJZBJBMO.js +1 -0
- package/dist/preview/chunk.AZG6V3PF.js +1 -0
- package/dist/preview/chunk.AZYJTNSM.js +107 -0
- package/dist/preview/chunk.BQV62QEL.js +61 -0
- package/dist/preview/chunk.CJQL7AHT.js +3 -0
- package/dist/preview/chunk.DAKED3WK.js +1 -0
- package/dist/preview/chunk.DJ26NOOW.js +1 -0
- package/dist/preview/chunk.DN4D4HGX.js +1 -0
- package/dist/preview/chunk.DO4P2UK4.js +1 -0
- package/dist/preview/chunk.ELEHYYCN.js +1 -0
- package/dist/preview/chunk.ENMNLR73.js +2 -0
- package/dist/preview/chunk.EQOU4POV.js +1 -0
- package/dist/preview/chunk.FLDFRFDH.js +23 -0
- package/dist/preview/chunk.FLJP3BGP.js +1 -0
- package/dist/preview/chunk.G4JJXA63.js +1 -0
- package/dist/preview/chunk.HCK6IHGP.js +1 -0
- package/dist/preview/chunk.IKT7JQUW.js +14 -0
- package/dist/preview/chunk.JE4VH767.js +16 -0
- package/dist/preview/chunk.K7UJG5II.js +1 -0
- package/dist/preview/chunk.KFLY4MAT.js +1 -0
- package/dist/preview/chunk.KWYU5NPM.js +1 -0
- package/dist/preview/chunk.L5G5DTFX.js +1 -0
- package/dist/preview/chunk.LGUV2J6Q.js +1 -0
- package/dist/preview/chunk.LSLFKW4M.js +1 -0
- package/dist/preview/chunk.LZQZP2PD.js +2 -0
- package/dist/preview/chunk.M4XNUM2A.js +6 -0
- package/dist/preview/chunk.MRK6QJV5.js +25 -0
- package/dist/preview/chunk.NOXC454O.js +1 -0
- package/dist/preview/chunk.ONDILMIX.js +1 -0
- package/dist/preview/chunk.OR6ZWN76.js +1 -0
- package/dist/preview/chunk.PC6FAJF5.js +1 -0
- package/dist/preview/chunk.Q5WEOX3Q.js +1 -0
- package/dist/preview/chunk.Q7WQ5UIE.js +1 -0
- package/dist/preview/chunk.R5K7NK4U.js +1 -0
- package/dist/preview/chunk.SCLIBKLS.js +1 -0
- package/dist/preview/chunk.SQD7ZPEJ.js +1 -0
- package/dist/preview/chunk.THBP5EES.js +1 -0
- package/dist/preview/chunk.UNRYIETM.js +1 -0
- package/dist/preview/chunk.VNC6H6IM.js +1 -0
- package/dist/preview/chunk.VRXWNUDR.js +1 -0
- package/dist/preview/chunk.VVZ2Z7OS.js +29 -0
- package/dist/preview/chunk.WGNF4E67.js +1 -0
- package/dist/preview/chunk.WTF3CP76.js +1 -0
- package/dist/preview/chunk.WWRWXFYR.js +0 -0
- package/dist/preview/chunk.XEJS2VS5.js +8 -0
- package/dist/preview/chunk.XYZ7KAMZ.js +1 -0
- package/dist/preview/chunk.Y235YZSZ.js +8 -0
- package/dist/preview/chunk.YAONM74M.js +19 -0
- package/dist/preview/chunk.YSYT3ASK.js +1 -0
- package/dist/preview/chunk.YU64JSAL.js +1 -0
- package/dist/preview/chunk.ZFUQA3KT.js +1 -0
- package/dist/preview/chunk.ZKUXPS44.js +2 -0
- package/dist/preview/chunk.ZQZ557VR.js +1 -0
- package/dist/preview/index.html +13 -0
- package/dist/preview/page.js +34 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -16,9 +16,18 @@ graview serve ./dist/domain/app.js # the store behind HTTP, data in a folder
|
|
|
16
16
|
graview mcp ./dist/domain/app.js # the same store, for an agent over MCP (stdio)
|
|
17
17
|
graview apply ./dist/domain/app.js --call <act> --args '{...}' # one act, from a shell
|
|
18
18
|
graview sync-seed ./dist/domain/app.js --seed ./seed.json # default content, moved without a wipe
|
|
19
|
+
graview preview app.json --seed seed.json # the store AND the scene and Pages over it, no product needed
|
|
20
|
+
graview shots app.json --seed seed.json --places home,overview # named places, headless, to PNGs
|
|
21
|
+
graview doctor # one Graview release in package.json, the lockfile, node_modules, the documents, React's pair
|
|
19
22
|
graview skills install . # the authoring skills, for Claude Code and Codex
|
|
20
23
|
```
|
|
21
24
|
|
|
25
|
+
`preview` is `serve` with Graview's own faces over the store: a JSON
|
|
26
|
+
document and a snapshot, looked at with nothing built and nothing else
|
|
27
|
+
installed — the page ships in this package. `shots` photographs the same
|
|
28
|
+
page headless; it needs Playwright, which you install beside the project
|
|
29
|
+
(`npm i -D playwright && npx playwright install chromium`).
|
|
30
|
+
|
|
22
31
|
`serve`, `mcp`, `apply` and `sync-seed` share one store: `--data <dir>` (a
|
|
23
32
|
folder of readable JSON, the default), `--sqlite <file>`, or — for `mcp` and
|
|
24
33
|
`apply` — `--remote-url <url>` against a running `graview serve`. `--as` and
|
|
@@ -29,8 +38,17 @@ A project made by `graview create` has this package as a devDependency, so
|
|
|
29
38
|
`npm run check`, `npm run docs` and `npm run skills` reach the same version
|
|
30
39
|
of the tool the project was scaffolded with.
|
|
31
40
|
|
|
41
|
+
Inside a pnpm workspace, run the project's own `graview`
|
|
42
|
+
(`node_modules/.bin/graview`, or `pnpm exec graview`) rather than `npx -y
|
|
43
|
+
graview@<version>`: when the workspace already holds that release in its
|
|
44
|
+
hidden hoist, npx skips the install and then finds no bin, and says
|
|
45
|
+
`sh: graview: command not found`. `graview doctor` says when the release you
|
|
46
|
+
run is not the one the project pins.
|
|
47
|
+
|
|
32
48
|
Every subcommand is implemented in the package whose concern it is:
|
|
33
|
-
`create`, `check`, `docs`, `describe`, `lens` and `
|
|
34
|
-
`@graview/core`, `serve
|
|
35
|
-
`apply` in `@graview/tools`, `skills` in
|
|
36
|
-
dispatches and
|
|
49
|
+
`create`, `check`, `docs`, `describe`, `lens`, `figure` and `doctor` in
|
|
50
|
+
`@graview/core`, `serve`, `sync-seed`, `preview` and `shots` in
|
|
51
|
+
`@graview/ship`, `mcp` and `apply` in `@graview/tools`, `skills` in
|
|
52
|
+
`@graview/skills`, `view` in `@graview/guest`. This package dispatches, and
|
|
53
|
+
carries the page `preview` serves (`dist/preview/`, built with the
|
|
54
|
+
framework) so that no product has to.
|
package/dist/index.d.ts
CHANGED
|
@@ -5,10 +5,13 @@
|
|
|
5
5
|
* is the tool a person installs: `npx graview create my-app` from nothing,
|
|
6
6
|
* or `graview check` from inside a project that has it as a devDependency.
|
|
7
7
|
* It owns no logic. Every subcommand lives in the package whose concern it
|
|
8
|
-
* is — the generator
|
|
9
|
-
*
|
|
10
|
-
* dispatches to it, so a
|
|
11
|
-
* create` and one made by calling core's own
|
|
8
|
+
* is — the generator, the checker and `doctor` in core, `serve`,
|
|
9
|
+
* `sync-seed`, `preview` and `shots` in ship, `mcp` and `apply` in tools,
|
|
10
|
+
* `skills` in skills, `view` in guest — and this dispatches to it, so a
|
|
11
|
+
* project made with `graview create` and one made by calling core's own
|
|
12
|
+
* CLI are the same project. What it carries is the page `preview` serves,
|
|
13
|
+
* built into `dist/preview/` at the framework's build: the tool's to ship,
|
|
14
|
+
* never a product's runtime dependency's.
|
|
12
15
|
*
|
|
13
16
|
* `serve` and `skills` are imported when asked for, not before: `graview
|
|
14
17
|
* check` should not load an HTTP server, and a bundler that ever sees this
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,IAAI,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAmCpE"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fileURLToPath } from "node:url";
|
|
1
2
|
import { main as core, USAGE as CORE_USAGE } from "@graview/core/cli";
|
|
2
3
|
/**
|
|
3
4
|
* `graview` — the one command line.
|
|
@@ -6,10 +7,13 @@ import { main as core, USAGE as CORE_USAGE } from "@graview/core/cli";
|
|
|
6
7
|
* is the tool a person installs: `npx graview create my-app` from nothing,
|
|
7
8
|
* or `graview check` from inside a project that has it as a devDependency.
|
|
8
9
|
* It owns no logic. Every subcommand lives in the package whose concern it
|
|
9
|
-
* is — the generator
|
|
10
|
-
*
|
|
11
|
-
* dispatches to it, so a
|
|
12
|
-
* create` and one made by calling core's own
|
|
10
|
+
* is — the generator, the checker and `doctor` in core, `serve`,
|
|
11
|
+
* `sync-seed`, `preview` and `shots` in ship, `mcp` and `apply` in tools,
|
|
12
|
+
* `skills` in skills, `view` in guest — and this dispatches to it, so a
|
|
13
|
+
* project made with `graview create` and one made by calling core's own
|
|
14
|
+
* CLI are the same project. What it carries is the page `preview` serves,
|
|
15
|
+
* built into `dist/preview/` at the framework's build: the tool's to ship,
|
|
16
|
+
* never a product's runtime dependency's.
|
|
13
17
|
*
|
|
14
18
|
* `serve` and `skills` are imported when asked for, not before: `graview
|
|
15
19
|
* check` should not load an HTTP server, and a bundler that ever sees this
|
|
@@ -23,6 +27,12 @@ export async function main(given) {
|
|
|
23
27
|
const { serve } = await import("@graview/ship/cli");
|
|
24
28
|
return serve(rest);
|
|
25
29
|
}
|
|
30
|
+
if (command === "preview" || command === "shots") {
|
|
31
|
+
// The page they serve is built into this package (`dist/preview/`, by scripts/build-preview-page.mjs): it is the tool's to carry, not a product's dependency's.
|
|
32
|
+
const { preview, shots } = await import("@graview/ship/cli");
|
|
33
|
+
const page = fileURLToPath(new URL("./preview/", import.meta.url));
|
|
34
|
+
return command === "preview" ? preview(rest, { page }) : shots(rest, { page });
|
|
35
|
+
}
|
|
26
36
|
if (command === "sync-seed") {
|
|
27
37
|
const { syncSeed } = await import("@graview/ship/cli");
|
|
28
38
|
return syncSeed(rest);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEtE
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{a as Y}from"./chunk.L5G5DTFX.js";import{a as V,c as H,e as _,f as B}from"./chunk.HCK6IHGP.js";import"./chunk.VRXWNUDR.js";import"./chunk.SCLIBKLS.js";import"./chunk.ACZGK7LQ.js";import"./chunk.AHDOKM4O.js";import{E as W,ca as w,d as M,ua as G,xa as E}from"./chunk.4JSMCNF7.js";import{I as O,L as I,P as T}from"./chunk.Y235YZSZ.js";import{a as U,b as k}from"./chunk.MRK6QJV5.js";import{b as y}from"./chunk.AJZBJBMO.js";function P(t){return{minHeight:24,padding:"3px 10px",borderRadius:6,fontSize:"0.875rem",borderWidth:1,borderStyle:"solid",borderColor:t?"transparent":"var(--graview-edge)",color:t?"var(--graview-ink)":"var(--graview-ink-muted)",fontWeight:t?600:400,background:t?"color-mix(in srgb, var(--graview-accent) 16%, transparent)":"transparent"}}var A=y(k(),1);function j(){let{seats:t,principal:r,takeSeat:o}=w();return t.length<2?null:(0,A.jsxs)("div",{role:"group","aria-label":"Seat","data-testid":"seats",style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:6,rowGap:4},children:[(0,A.jsx)("span",{style:{fontSize:"0.75rem",letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},children:"As"}),t.map(a=>{let l=q(r,a.principal);return(0,A.jsx)("button",{type:"button","aria-pressed":l,"data-testid":`seat-${a.principal.id??a.label}`,title:`Sit down as ${a.label}: the acts, the kinds and the pages narrow to what this seat may do`,onClick:()=>o(a.principal),style:{...P(l),whiteSpace:"nowrap"},children:a.label},a.principal.id??a.label)})]})}function q(t,r){return t.kind===r.kind&&t.id===r.id}var R=y(U(),1),s=y(k(),1),J=`
|
|
2
|
+
.graview-here{display:flex;flex:none}
|
|
3
|
+
.graview-here>button{display:inline-flex;align-items:center;gap:4px;height:30px;margin:0;padding:0 4px;border:1px solid transparent;border-radius:8px;background:none;box-shadow:none;font:inherit;font-size:.75rem;color:var(--graview-ink-muted);cursor:pointer}
|
|
4
|
+
.graview-here-mark{display:inline-flex;align-items:center;justify-content:center;flex:none;box-sizing:border-box;width:24px;height:24px;border-radius:50%;border:1.5px solid hsl(var(--graview-hue) 50% 48%);background:var(--graview-panel-muted);color:var(--graview-ink);font-size:.75rem;font-weight:600;box-shadow:0 0 0 2px var(--graview-bar)}
|
|
5
|
+
.graview-here-mark+.graview-here-mark{margin-left:-10px}
|
|
6
|
+
.graview-here-mark[data-agent]{border-radius:5px}
|
|
7
|
+
.graview-here-mark[data-counted]{--graview-hue:0;border-color:var(--graview-edge)}
|
|
8
|
+
.graview-here small{display:block;font-size:.75rem;color:var(--graview-ink-muted)}
|
|
9
|
+
.graview-bar[data-finding] .graview-here{display:none}`,Q={position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"};function X(t,r){let o=r.id===void 0?null:`${r.kind}:${r.id}`,a=new Map;for(let l of t.values()){let i=l.participant.slice(0,l.participant.lastIndexOf(":"));if(i===o)continue;let u=i.endsWith(":")?l.participant:i,p=a.get(u);(!p||p.at<l.at)&&a.set(u,l)}return[...a.values()]}var D=t=>t.name&&t.onBehalfOfName?`${t.name}, for ${t.onBehalfOfName}`:t.name??"",K=t=>t===1?"1 viewer":`${t} viewers`;function Z(t){let r=t.map(D).filter(Boolean),o=r.length<t.length?[...r,K(t.length-r.length)]:r,a=o.pop();return`${o.length>0?`${o.join(", ")} and ${a}`:a} ${t.length===1?"is":"are"} here`}function ee(t,r){let{store:o,hidden:a,pictures:l}=r,i=M(t),u=o.kindsKeptFrom(r.principal),p=g=>!a.has(g)&&!u.has(g)&&!o.modules.disabledKinds.has(g),c=l.find(g=>g.as===i.within?.view&&p(g.kind));if(c)return c.title;if(!i.focusId)return i.overview?"the whole thing":null;let h=W(i.focusId);if(h.length>0)return h.every(p)?h.map(g=>T(o.schema,g)).join(" and "):null;let m=o.graph.getNode(i.focusId);return m&&p(m.kind)?O(o.schema.tryDefinition(m.kind),m):null}function te({scene:t,compact:r}){let{who:o,principal:a,store:l,views:i,hiddenKinds:u,follow:p}=w(),c=E("here"),h=X(o,a),m=h.length===0?"":Z(h),[g,N]=(0,R.useState)("");if((0,R.useEffect)(()=>N(m),[m]),h.length===0)return null;let S=h.filter(d=>d.name),f=S.slice(0,r?2:3),v=h.length-f.length,b=h.length-S.length,n=i.places();return(0,s.jsxs)("div",{className:"graview-here","data-testid":"here",children:[(0,s.jsx)("style",{children:J}),(0,s.jsx)("span",{role:"status","aria-live":"polite",style:Q,children:g}),(0,s.jsxs)("button",{type:"button","data-testid":"here-open",...c.trigger,onClick:c.toggle,"aria-label":`${m} \u2014 who and where`,title:m,children:[f.length>0?(0,s.jsx)("span",{style:{display:"flex"},children:f.map(d=>(0,s.jsx)(z,{one:d},d.participant))}):(0,s.jsx)(z,{count:v}),f.length>0&&v>0?(0,s.jsxs)("span",{"aria-hidden":"true",children:["+",v]}):null]}),(0,s.jsxs)("ul",{...c.pane,"aria-label":"Who is here","data-testid":"here-list",hidden:!c.open,className:"graview-bar-list",style:G,children:[S.map(d=>{let x=ee(d.stop,{store:l,principal:a,hidden:u,pictures:n}),L=D(d);return(0,s.jsx)("li",{children:(0,s.jsxs)(t?"button":"span",{className:"graview-bar-item","data-testid":"here-one",...t?{type:"button",title:`Go where ${L} is`,onClick:()=>{c.setOpen(!1),p(d.participant)}}:{style:{cursor:"default"}},children:[(0,s.jsx)(z,{one:d}),(0,s.jsxs)("span",{children:[L,x?(0,s.jsxs)("small",{children:["On ",x]}):null]})]})},d.participant)}),b>0?(0,s.jsx)("li",{children:(0,s.jsxs)("span",{className:"graview-bar-item","data-testid":"here-viewers",style:{cursor:"default"},children:[(0,s.jsx)(z,{count:b}),(0,s.jsxs)("span",{children:[K(b),(0,s.jsx)("small",{children:"Not signed in"})]})]})}):null]})]})}function z({one:t,count:r}){return(0,s.jsx)("span",{className:"graview-here-mark","aria-hidden":"true",...t?{style:{"--graview-hue":Math.round(t.hue)}}:{"data-counted":""},...t?.kind==="agent"?{"data-agent":""}:{},children:t?(t.name??"").trim().charAt(0).toUpperCase():r})}var e=y(k(),1);function ye({violations:t,pick:r}){let{store:o,brand:a}=w(),l=V(o,t);return(0,e.jsx)(e.Fragment,{children:l.map((i,u)=>{let p=B(i),c=i.repairs.length>0?`${i.repairs.length} ${i.repairs.length===1?"way":"ways"} to fix`:"";return(0,e.jsx)("li",{style:{borderTop:u===0?"none":"1px solid var(--graview-edge)"},children:(0,e.jsxs)("button",{type:"button",onClick:()=>r(i),...H(i)!==void 0?{title:H(i)}:{},style:{width:"100%",textAlign:"left",fontSize:"0.8125rem",lineHeight:1.4,padding:"7px 8px",border:"1px solid transparent",background:"none",boxShadow:"none",borderRadius:7},children:[i.line?(0,e.jsx)(_,{line:i.line,schema:o.schema,...a?{brand:a}:{},stacked:!0,style:{display:"block",color:"var(--graview-ink)"}}):(0,e.jsx)("span",{style:{display:"block",color:"var(--graview-ink)"},children:i.message}),p||c?(0,e.jsx)("span",{style:{color:"var(--graview-ink-faint)",fontSize:"0.75rem"},children:[p,c].filter(Boolean).join(" \xB7 ")}):null]})},`${i.invariant}:${u}`)})})}function we({name:t,me:r,scheme:o,onScheme:a,profileHref:l,hostActions:i,close:u,part:p,signature:c=!1}){let{principal:h,seats:m,settings:g,settingValues:N,chooseSetting:S,sharing:f}=w(),v=h.roles??[],b={setOpen:n=>u()};return(0,e.jsx)(e.Fragment,{children:p==="top"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{style:{display:"grid",gap:3},children:[(0,e.jsx)("span",{style:C,children:"Signed in as"}),(0,e.jsx)("strong",{style:{fontSize:"1rem",fontWeight:550},children:t}),(0,e.jsx)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:v.length>0?v.map(n=>I(n)).join(", "):r===void 0?"This app has no sign-in; everything here is yours.":"No role in particular"}),r!==void 0&&l!==void 0?(0,e.jsx)("a",{href:l(r.id),"data-testid":"profile-record",style:{display:"inline-flex",alignItems:"center",minHeight:24,justifySelf:"start",fontSize:"0.875rem",color:"var(--graview-accent)"},children:"Your record \u2197"}):null,f?(0,e.jsxs)("span",{"data-testid":"profile-seen-as",style:{fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:["Seen by others as ",f.name]}):null]}),i.length>0?(0,e.jsx)("ul",{role:"list","aria-label":"From the host","data-testid":"host-actions",style:{...$,margin:0,paddingLeft:0,listStyle:"none",display:"grid",gap:2},children:i.map(n=>(0,e.jsx)("li",{children:n.href!==void 0?(0,e.jsx)("a",{href:n.href,"data-testid":"host-action",className:"graview-host-action",...n.target?{target:n.target,rel:"noopener"}:{},onClick:()=>{n.onSelect?.(),b.setOpen(!1)},style:F,children:n.label}):(0,e.jsx)("button",{type:"button","data-testid":"host-action",className:"graview-host-action",onClick:()=>{b.setOpen(!1),n.onSelect?.()},style:{...F,width:"100%",textAlign:"left",border:"none",background:"none",boxShadow:"none",font:"inherit",cursor:"pointer"},children:n.label})},n.label))}):null]}):(0,e.jsxs)(e.Fragment,{children:[m.length>1?(0,e.jsxs)("div",{style:{display:"grid",gap:6,...$},children:[(0,e.jsx)("span",{style:C,children:"Sit as somebody else"}),(0,e.jsx)(j,{})]}):null,g.length>0?(0,e.jsx)("div",{style:{display:"grid",gap:10,...$},children:g.map(n=>(0,e.jsxs)("fieldset",{"data-testid":`setting-${n.name}`,style:{border:0,margin:0,padding:0,display:"grid",gap:5},children:[(0,e.jsx)("legend",{style:{...C,padding:0},children:n.title}),n.description?(0,e.jsx)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:n.description}):null,(0,e.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:n.options.map(d=>{let x=(N[n.name]??n.initial)===d.value;return(0,e.jsx)("button",{type:"button","aria-pressed":x,"data-testid":`setting-${n.name}-${d.value}`,onClick:()=>S(n.name,d.value),style:P(x),children:d.label},d.value)})})]},n.name))}):null,o!==void 0&&a!==void 0?(0,e.jsxs)("div",{style:{display:"grid",gap:5,...$},children:[(0,e.jsx)("span",{style:C,children:"Scheme"}),(0,e.jsx)("div",{style:{display:"flex",gap:4},children:["light","dark"].map(n=>(0,e.jsx)("button",{type:"button","aria-pressed":o===n,"data-testid":`profile-scheme-${n}`,onClick:()=>a(n),style:P(o===n),children:n==="light"?"\u2600 Light":"\u263E Dark"},n))})]}):null,c?(0,e.jsxs)("p",{"data-testid":"graview-signature",style:{...$,margin:0,display:"flex",alignItems:"center",gap:6,fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:["Built with",(0,e.jsxs)("a",{href:"https://graview.dev",target:"_blank",rel:"noopener",style:{display:"inline-flex",alignItems:"center",gap:4,minHeight:24,color:"var(--graview-ink-muted)",fontWeight:600,textDecoration:"none"},children:[(0,e.jsx)("span",{"data-testid":"graview-mark",style:{display:"inline-flex",lineHeight:0},dangerouslySetInnerHTML:{__html:ne}}),"Graview"]})]}):null]})})}var ne='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="14" height="14" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.4" stroke-linejoin="round"><path d="M13 11 L3 8 L14 3 H29 L21 9"/><path d="M10 18 L3 23 L16.5 28 L29 21 L22 19"/><path d="M16.5 18.5 V23.5" stroke-linecap="round"/></g><circle cx="16.5" cy="13.5" r="2" fill="var(--graview-mark-point, currentColor)"/></svg>',F={display:"flex",alignItems:"center",minHeight:28,padding:"2px 8px",borderRadius:7,fontSize:"0.875rem",color:"var(--graview-ink)",textDecoration:"none"},C={fontSize:"0.75rem",letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},$={paddingTop:10,borderTop:"1px solid var(--graview-edge)"};export{Y as ActivityRail,te as Here,ye as ProblemRows,we as ProfilePane};
|