dev-process-kit 0.0.11 → 0.0.13
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/THIRD_PARTY_LICENSES.md +46 -0
- package/dist/chunks/{shared-CrE-y5oF.js → shared-0MFKKPnB.js} +165 -96
- package/dist/chunks/shared-B2YRwZ0P.js +2062 -0
- package/dist/chunks/{shared-OGH3pSVq.js → shared-B4Mwapvi.js} +89 -63
- package/dist/chunks/shared-BDUe3aT-.js +1 -0
- package/dist/chunks/{shared-DGI_sFo5.js → shared-C1KQ5iU8.js} +55 -32
- package/dist/chunks/{shared-BgCDocVX.js → shared-CQG0dnvb.js} +17 -7
- package/dist/chunks/shared-CSC14I4g.js +2370 -0
- package/dist/chunks/shared-Cd8A5TjZ.js +2428 -0
- package/dist/chunks/shared-CirHYajF.js +30 -0
- package/dist/chunks/shared-D4K7KsfJ.js +1 -0
- package/dist/chunks/{shared-TW6kWbUL.js → shared-D7poXZ0z.js} +17 -9
- package/dist/chunks/shared-DO0pUSjw.js +571 -0
- package/dist/chunks/shared-DdefS1nG.js +1 -0
- package/dist/chunks/{shared-BSFZSMH5.js → shared-DjmQsa0n.js} +1 -1
- package/dist/chunks/{shared-DZfXwU7f.js → shared-DklLt1Sc.js} +1 -1
- package/dist/chunks/{shared-CHaHI5X3.js → shared-DrMSORn-.js} +34 -11
- package/dist/chunks/shared-DxAiavwJ.js +1102 -0
- package/dist/chunks/shared-aDPp8Vry.js +1 -0
- package/dist/components.js +1 -1
- package/dist/index.js +1 -1
- package/dist/templates/delegation-poker.js +1 -1
- package/dist/templates/event-storming.js +1 -1
- package/dist/templates/example-mapping.js +1 -1
- package/dist/templates/grill.js +1 -1
- package/dist/templates/plain.js +1 -1
- package/dist/templates/prototype.js +1 -1
- package/dist/templates/slides.js +1 -1
- package/dist/templates/task-board.js +1 -1
- package/dist/templates/usm.js +1 -1
- package/dist/templates/whiteboard.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/shared-B4ewpBuM.js +0 -30
- package/dist/chunks/shared-B9OVJ7XA.js +0 -556
- package/dist/chunks/shared-BHRhwgui.js +0 -1252
- package/dist/chunks/shared-B_MMP97h.js +0 -2402
- package/dist/chunks/shared-CxFItadP.js +0 -1094
- package/dist/chunks/shared-DIJgMVpY.js +0 -2239
- package/dist/chunks/shared-xrCdgpNS.js +0 -1
|
@@ -1,2239 +0,0 @@
|
|
|
1
|
-
import{ah as x,aI as hr,ac as R,aw as P,ay as f,af as u,ad as L,ag as ae,ab as vr,aJ as Ke,aK as fr,ae as M,ai as E,ao as gr,p as w,aq as m,v as de,av as J,P as br,e as wr,a0 as mr,h as Xe,N as Se,V,U as yr,R as y,a4 as d,a3 as c,aL as Te,aM as Ie,aC as Ae,a5 as kr,z as pe,aB as Je,l as xr,J as Ze,aN as $r,a6 as Z,A as Qe,aa as Er,a9 as Sr,a2 as Tr,T as et,a1 as Ir,aO as Ar,C as Pr}from"./shared-B_MMP97h.js";import{p as _r,r as Rr,P as Dr,c as Or,b as Cr}from"./shared-B4ewpBuM.js";import{i as tt}from"./shared-BSFZSMH5.js";const rt=["browser","native","mail","plain"],it=["mobile","tablet","desktop","fluid"],G=e=>"screen"in e,Lr=R({from:f(u()),to:f(u()),cc:f(u()),subject:f(u()),date:f(u())}),Mr={id:P,kind:L(ae(rt),"browser"),viewport:L(ae(it),"fluid"),label:f(u()),url:f(u()),mail:f(Lr)},Pe=x(R(Mr),hr(e=>e.mail===void 0||e.kind==="mail",'a preview `mail` envelope needs `"kind": "mail"`')),nt=gr([R({screen:P,preview:f(P)}),R({material:Pe})]),Nr=R({id:P,name:x(u(),E(1)),description:f(u()),actor:f(x(u(),E(1))),situation:f(x(u(),E(1))),panes:L(M(nt),[])}),Vr=R({id:P,name:x(u(),E(1)),description:f(u()),actor:f(x(u(),E(1))),steps:L(M(Nr),[])}),zr=R({id:P,name:x(u(),E(1)),description:f(u()),actor:f(x(u(),E(1))),stories:L(M(Vr),[])}),Yr=R({id:P,title:x(u(),E(1)),description:f(u()),previews:L(M(Pe),[])}),Ur=R({id:P,name:x(u(),E(1)),description:f(u()),actor:f(x(u(),E(1))),screens:L(M(Yr),[])}),ot=R({title:f(u()),baseUrl:f(u()),apps:L(M(Ur),[]),activities:L(M(zr),[])}),st=e=>e.flatMap(t=>G(t)?[]:[t.material]),Wr=e=>{const t=new Set,r=s=>{for(const a of s){if(t.has(a.id))return`duplicate preview id "${a.id}": preview ids are global, they name a light DOM slot`;t.add(a.id)}return null},i=new Set,n=new Set;for(const s of e.apps){if(i.has(s.id))return`duplicate app id "${s.id}"`;i.add(s.id);for(const a of s.screens){if(n.has(a.id))return`duplicate screen id "${a.id}": screen ids are global`;n.add(a.id);const p=r(a.previews);if(p!==null)return p}}const o=new Set;for(const s of e.activities){if(o.has(s.id))return`duplicate activity id "${s.id}"`;o.add(s.id);const a=new Set;for(const p of s.stories){if(a.has(p.id))return`duplicate story id "${p.id}" in activity "${s.id}"`;a.add(p.id);const l=new Set;for(const b of p.steps){if(l.has(b.id))return`duplicate step id "${b.id}" in story "${p.id}"`;l.add(b.id);const h=r(st(b.panes));if(h!==null)return h}}}return null},at=(e,t)=>{const r=new Map;for(const i of t.panes){if(!G(i))continue;const n=e(i.screen);if(n===void 0)return`unknown screen "${i.screen}" on step "${t.id}": declare it under \`apps[].screens\``;if(i.preview!==void 0&&!n.includes(i.preview))return`preview "${i.preview}" on step "${t.id}" is not a rendition of screen "${i.screen}"`;const o=r.get(i.screen)??[];if(o.length>0&&(i.preview===void 0||o.includes(i.preview)||o.includes(void 0)))return`screen "${i.screen}" is shown twice on step "${t.id}": give each pane a different \`preview\``;r.set(i.screen,[...o,i.preview])}return null},Br=e=>{const t=new Map(e.apps.flatMap(r=>r.screens.map(i=>[i.id,i.previews.map(n=>n.id)])));for(const r of e.activities.flatMap(i=>i.stories.flatMap(n=>n.steps))){const i=at(n=>t.get(n),r);if(i!==null)return i}return null},Gr=(e,t)=>at(r=>D(e,r)?.screen.previews.map(i=>i.id),t),Q="ui",dt=e=>{const t=e.text?.replaceAll('"',"'");return`${e.previewId}/${e.selector}${t===void 0?"":` "${t}"`}`},_e=e=>{const t=e.indexOf("/");if(t<=0)return;const r=e.slice(0,t);if(!fr(P,r))return;const i=e.slice(t+1),n=/ "([^"]*)"$/.exec(i),o=(n?i.slice(0,n.index):i).trim();if(o!=="")return n?.[1]===void 0?{previewId:r,selector:o}:{previewId:r,selector:o,text:n[1]}},pt=e=>{const t=vr(ot,e),r=Wr(t)??Br(t);if(r!==null)throw new Error(r);return t},lt=()=>({apps:[],activities:[]}),z=e=>e.apps.flatMap(t=>t.screens.map(r=>({app:t,screen:r}))),D=(e,t)=>{if(t!==void 0)return z(e).find(r=>r.screen.id===t)},le=(e,t)=>t.panes.flatMap(r=>{const i=G(r)?D(e,r.screen):void 0;return i?[i]:[]}),H=e=>st(e.panes),Hr=(e,t)=>e.panes.some(r=>G(r)&&r.screen===t),O=(e,t)=>{if(t!==void 0)return e.activities.find(r=>r.id===t)},C=(e,t)=>`${e}.${t}`,$=(e,t)=>{if(t===void 0)return;const r=Ke(t,2);if(r){const[n,o]=r;if(n===void 0||o===void 0)return;const s=e.activities.find(p=>p.id===n),a=s?.stories.find(p=>p.id===o);return s&&a?{activity:s,story:a}:void 0}if(t.includes("."))return;const i=e.activities.flatMap(n=>n.stories.filter(o=>o.id===t).map(o=>({activity:n,story:o})));return i.length===1?i[0]:void 0},ct=e=>{const t=e.lastIndexOf(".");return t>=0?e.slice(t+1):e},ce=e=>`${e.activity.id}.${e.story.id}.${e.step.id}`,ue=(e,t,r)=>`${e.id}.${t.id}.${r.id}`,k=(e,t)=>{if(t===void 0)return;const r=Ke(t,3);if(r){const[n,o,s]=r;if(n===void 0||o===void 0||s===void 0)return;const a=e.activities.find(h=>h.id===n),p=a?.stories.find(h=>h.id===o),l=p?p.steps.findIndex(h=>h.id===s):-1,b=p&&l>=0?p.steps[l]:void 0;return a&&p&&b?{activity:a,story:p,step:b,stepIndex:l}:void 0}if(t.includes("."))return;const i=Y(e).filter(n=>n.step.id===t);return i.length===1?i[0]:void 0},T=(e,t)=>{if(t!==void 0){for(const r of z(e)){const i=r.screen.previews.find(n=>n.id===t);if(i)return{owner:{kind:"screen",...r},preview:i}}for(const r of Y(e)){const i=H(r.step).find(n=>n.id===t);if(i)return{owner:{kind:"step",...r},preview:i}}}},Y=e=>e.activities.flatMap(t=>t.stories.flatMap(r=>r.steps.map((i,n)=>({activity:t,story:r,step:i,stepIndex:n})))),ut=e=>Y(e).map(t=>t.step.id),g={SET_ACTIVITY_NAME:w("SET_ACTIVITY_NAME","activity",m({name:x(u(),E(1))})),SET_ACTIVITY_DESCRIPTION:w("SET_ACTIVITY_DESCRIPTION","activity",m({description:u()})),SET_STORY_NAME:w("SET_STORY_NAME","story",m({name:x(u(),E(1))})),SET_STORY_DESCRIPTION:w("SET_STORY_DESCRIPTION","story",m({description:u()})),SET_STEP_NAME:w("SET_STEP_NAME","step",m({name:x(u(),E(1))})),SET_STEP_DESCRIPTION:w("SET_STEP_DESCRIPTION","step",m({description:u()})),SET_PREVIEW_KIND:w("SET_PREVIEW_KIND","preview",m({kind:ae(rt)})),SET_PREVIEW_VIEWPORT:w("SET_PREVIEW_VIEWPORT","preview",m({viewport:ae(it)})),SET_PREVIEW_LABEL:w("SET_PREVIEW_LABEL","preview",m({label:u()})),REORDER_ACTIVITY:w("REORDER_ACTIVITY","activity",m({after:J(u())}),{mode:"sequence"}),REORDER_STORY:w("REORDER_STORY","story",m({after:J(u())}),{mode:"sequence"}),REORDER_STEP:w("REORDER_STEP","step",m({after:J(u())}),{mode:"sequence"}),MOVE_STORY:w("MOVE_STORY","story",m({toActivity:x(u(),E(1)),after:J(u())}),{mode:"sequence"}),MOVE_STEP:w("MOVE_STEP","step",m({toStory:x(u(),E(1)),after:J(u())}),{mode:"sequence"}),ADD_ACTIVITY:w("ADD_ACTIVITY","page",m({id:P,name:x(u(),E(1)),description:f(u())}),{dedupeKey:de}),ADD_STORY:w("ADD_STORY","activity",m({id:P,name:x(u(),E(1)),description:f(u())}),{dedupeKey:de}),ADD_STEP:w("ADD_STEP","story",m({id:P,name:x(u(),E(1)),description:f(u()),panes:f(M(nt))}),{dedupeKey:de}),ADD_PREVIEW:w("ADD_PREVIEW","step",Pe,{dedupeKey:de}),DELETE_ACTIVITY:w("DELETE_ACTIVITY","activity",m({})),DELETE_STORY:w("DELETE_STORY","story",m({})),DELETE_STEP:w("DELETE_STEP","step",m({})),DELETE_PREVIEW:w("DELETE_PREVIEW","preview",m({}))},ee={setActivityName:(e,t)=>({type:"SET_ACTIVITY_NAME",target:{type:"activity",id:e},payload:{name:t}}),setActivityDescription:(e,t)=>({type:"SET_ACTIVITY_DESCRIPTION",target:{type:"activity",id:e},payload:{description:t}}),setStoryName:(e,t)=>({type:"SET_STORY_NAME",target:{type:"story",id:e},payload:{name:t}}),setStoryDescription:(e,t)=>({type:"SET_STORY_DESCRIPTION",target:{type:"story",id:e},payload:{description:t}}),setStepName:(e,t)=>({type:"SET_STEP_NAME",target:{type:"step",id:e},payload:{name:t}}),setStepDescription:(e,t)=>({type:"SET_STEP_DESCRIPTION",target:{type:"step",id:e},payload:{description:t}}),setPreviewViewport:(e,t)=>({type:"SET_PREVIEW_VIEWPORT",target:{type:"preview",id:e},payload:{viewport:t}}),setPreviewKind:(e,t)=>({type:"SET_PREVIEW_KIND",target:{type:"preview",id:e},payload:{kind:t}}),setPreviewLabel:(e,t)=>({type:"SET_PREVIEW_LABEL",target:{type:"preview",id:e},payload:{label:t}}),reorderActivity:(e,t)=>({type:"REORDER_ACTIVITY",target:{type:"activity",id:e},payload:{after:t}}),reorderStory:(e,t)=>({type:"REORDER_STORY",target:{type:"story",id:e},payload:{after:t}}),reorderStep:(e,t)=>({type:"REORDER_STEP",target:{type:"step",id:e},payload:{after:t}}),moveStep:(e,t,r)=>({type:"MOVE_STEP",target:{type:"step",id:e},payload:{toStory:t,after:r}}),moveStory:(e,t,r)=>({type:"MOVE_STORY",target:{type:"story",id:e},payload:{toActivity:t,after:r}}),addActivity:(e,t,r)=>({type:"ADD_ACTIVITY",target:{type:"page",id:"prototype"},payload:{id:e,name:t,...r===void 0?{}:{description:r}}}),addStory:(e,t,r,i)=>({type:"ADD_STORY",target:{type:"activity",id:e},payload:{id:t,name:r,...i===void 0?{}:{description:i}}}),addStep:(e,t,r,i)=>({type:"ADD_STEP",target:{type:"story",id:e},payload:{id:t,name:r,...i===void 0?{}:{panes:i}}}),addPreview:(e,t)=>({type:"ADD_PREVIEW",target:{type:"step",id:e},payload:{...t}}),deleteActivity:e=>({type:"DELETE_ACTIVITY",target:{type:"activity",id:e},payload:{}}),deleteStory:e=>({type:"DELETE_STORY",target:{type:"story",id:e},payload:{}}),deleteStep:e=>({type:"DELETE_STEP",target:{type:"step",id:e},payload:{}}),deletePreview:e=>({type:"DELETE_PREVIEW",target:{type:"preview",id:e},payload:{}})},ht=(e,t)=>{const r=br(g,t);if(r===null)return null;const i=r.target.id;switch(r.type){case"SET_ACTIVITY_NAME":return U(e,i,n=>({...n,name:r.payload.name}));case"SET_ACTIVITY_DESCRIPTION":return U(e,i,n=>({...n,description:r.payload.description}));case"SET_STORY_NAME":return W(e,i,n=>({...n,name:r.payload.name}));case"SET_STORY_DESCRIPTION":return W(e,i,n=>({...n,description:r.payload.description}));case"SET_STEP_NAME":return he(e,i,n=>({...n,name:r.payload.name}));case"SET_STEP_DESCRIPTION":return he(e,i,n=>({...n,description:r.payload.description}));case"SET_PREVIEW_KIND":return De(e,i,n=>({...n,kind:r.payload.kind}));case"SET_PREVIEW_VIEWPORT":return De(e,i,n=>({...n,viewport:r.payload.viewport}));case"SET_PREVIEW_LABEL":return De(e,i,n=>({...n,label:r.payload.label}));case"REORDER_ACTIVITY":{const{after:n}=r.payload,o=te(e.activities,i,n);return o===null?null:{...e,activities:o}}case"REORDER_STORY":{const{after:n}=r.payload,o=$(e,i);if(!o)return null;const s=n===null?null:$(e,n);if(n!==null&&(!s||s.activity!==o.activity))return null;const a=te(o.activity.stories,o.story.id,s?.story.id??null);return a===null?null:U(e,o.activity.id,p=>({...p,stories:a}))}case"REORDER_STEP":{const{after:n}=r.payload,o=k(e,i);if(!o)return null;const s=n===null?null:k(e,n);if(n!==null&&(!s||s.story!==o.story))return null;const a=te(o.story.steps,o.step.id,s?.step.id??null);return a===null?null:W(e,C(o.activity.id,o.story.id),p=>({...p,steps:a}))}case"MOVE_STORY":{const{toActivity:n,after:o}=r.payload,s=$(e,i);if(!s)return null;const a=e.activities.find(h=>h.id===n);if(!a)return null;const p=o===null?null:$(e,o);if(o!==null&&(!p||p.activity!==a))return null;const l=p?.story.id??null;if(s.activity.id===n){const h=te(s.activity.stories,s.story.id,l);return h===null?null:U(e,n,v=>({...v,stories:h}))}if(a.stories.some(h=>h.id===s.story.id))return null;const b=Oe(a.stories,s.story,l);return Re(e,h=>h.id===s.activity.id?{...h,stories:h.stories.filter(v=>v.id!==ct(i))}:h.id===n?{...h,stories:b}:h)}case"MOVE_STEP":{const{toStory:n,after:o}=r.payload,s=k(e,i);if(!s)return null;const a=$(e,n);if(!a)return null;const p=o===null?null:k(e,o);if(o!==null&&(!p||p.story!==a.story))return null;const l=p?.step.id??null;if(s.story===a.story){const h=te(s.story.steps,s.step.id,l);return h===null?null:W(e,n,v=>({...v,steps:h}))}if(a.story.steps.some(h=>h.id===s.step.id))return null;const b=Oe(a.story.steps,s.step,l);return Re(e,h=>({...h,stories:h.stories.map(v=>v===s.story?{...v,steps:v.steps.filter(I=>I.id!==ct(i))}:v===a.story?{...v,steps:b}:v)}))}case"ADD_ACTIVITY":{const n=r.payload;if(e.activities.some(s=>s.id===n.id))return e;const o={id:n.id,name:n.name,...n.description===void 0?{}:{description:n.description},stories:[]};return{...e,activities:[...e.activities,o]}}case"ADD_STORY":{const n=r.payload,o=e.activities.find(a=>a.id===i);if(!o)return null;if(o.stories.some(a=>a.id===n.id))return e;const s={id:n.id,name:n.name,...n.description===void 0?{}:{description:n.description},steps:[]};return U(e,i,a=>({...a,stories:[...a.stories,s]}))}case"ADD_STEP":{const n=r.payload,o=$(e,i)?.story;if(!o)return null;if(o.steps.some(p=>p.id===n.id))return e;const s=n.panes??[],a={id:n.id,name:n.name,...n.description===void 0?{}:{description:n.description},panes:s};return jr(e,a)?W(e,i,p=>({...p,steps:[...p.steps,a]})):null}case"ADD_PREVIEW":{const n=r.payload,o=k(e,i)?.step;return o?H(o).some(s=>s.id===n.id)?e:T(e,n.id)?null:he(e,i,s=>({...s,panes:[...s.panes,{material:n}]})):null}case"DELETE_ACTIVITY":{const n=i;return e.activities.some(o=>o.id===n)?{...e,activities:e.activities.filter(o=>o.id!==n)}:null}case"DELETE_STORY":{const n=$(e,i);return n?U(e,n.activity.id,o=>({...o,stories:o.stories.filter(s=>s.id!==n.story.id)})):null}case"DELETE_STEP":{const n=k(e,i);return n?W(e,C(n.activity.id,n.story.id),o=>({...o,steps:o.steps.filter(s=>s.id!==n.step.id)})):null}case"DELETE_PREVIEW":{const n=T(e,i);return n?vt(e,n.owner,o=>o.filter(s=>s.id!==n.preview.id)):null}default:return wr(r)}},Re=(e,t)=>({...e,activities:e.activities.map(t)}),U=(e,t,r)=>{const i=t;return e.activities.some(n=>n.id===i)?Re(e,n=>n.id===i?r(n):n):null},W=(e,t,r)=>{const i=$(e,t);if(!i)return null;const n=i.story.id;return U(e,i.activity.id,o=>({...o,stories:o.stories.map(s=>s.id===n?r(s):s)}))},he=(e,t,r)=>{const i=k(e,t);if(!i)return null;const n=i.step.id;return W(e,C(i.activity.id,i.story.id),o=>({...o,steps:o.steps.map(s=>s.id===n?r(s):s)}))},De=(e,t,r)=>{const i=T(e,t);if(!i)return null;const n=i.preview.id;return vt(e,i.owner,o=>o.map(s=>s.id===n?r(s):s))},jr=(e,t)=>{const r=H(t).map(i=>i.id);return Gr(e,t)===null&&new Set(r).size===r.length&&!r.some(i=>T(e,i))},vt=(e,t,r)=>{if(t.kind==="step")return he(e,ce(t),n=>{const o=new Map(r([...H(n)]).map(s=>[s.id,s]));return{...n,panes:n.panes.flatMap(s=>{if(G(s))return[s];const a=o.get(s.material.id);return a?[{material:a}]:[]})}});const i=t.screen.id;return{...e,apps:e.apps.map(n=>n.id===t.app.id?{...n,screens:n.screens.map(o=>o.id===i?{...o,previews:r(o.previews)}:o)}:n)}},te=(e,t,r)=>{const i=e.findIndex(s=>s.id===t);if(i<0||r!==null&&!e.some(s=>s.id===r))return null;if(t===r)return[...e];const n=e[i];if(n===void 0)return null;const o=e.filter(s=>s.id!==t);return Oe(o,n,r)},Oe=(e,t,r)=>{const i=[...e],n=r===null?-1:i.findIndex(o=>o.id===r);return i.splice(n+1,0,t),i},ve=mr({en:{renameActivity:"Rename Activity",updateActivityDescription:"Update Activity description",renameStory:"Rename UserStory",updateStoryDescription:"Update UserStory description",renameStep:"Rename Step",updateStepDescription:"Update Step description",changePreviewKind:"Change Preview kind",changePreviewViewport:"Change Preview viewport",changePreviewLabel:"Change Preview label",moveStory:"Move UserStory",moveStep:"Move Step",deleteTitle:"Delete",reorderTitle:e=>`Reorder ${e}`,addTitle:e=>`Add ${e}`,toFront:"\u2192 To the front",afterName:e=>`\u2192 Right after "${e}"`,unknownTarget:"(unknown target)",activityGroup:"Activity",storyGroup:"UserStory",stepGroup:"Step",screenGroup:"Screen",openInApp:"Open this screen in the app view",previewGroup:"Preview",pageGroup:"Page",uiGroup:"UI",targetLabel:(e,t)=>`${e} \xB7 ${t}`,targetMissing:(e,t)=>`${e} \xB7 ${t} (missing)`,noActivityBefore:"There are no Activities yet. Add ",noActivityAfter:" to the base JSON, or ask the agent.",deleteStepAria:"Delete step",addStepButton:"+ Step",stepNameLabel:"Step name",descriptionLabel:"Description",descriptionPlaceholder:"What happens in this Step (click to edit)",newStepName:"New step",viewLabel:"View",viewScenario:"Scenario",viewApp:"App",viewScenarioHint:"Follow one user story step by step",viewAppHint:"Use the UI as one app, whatever the scenario",appScreens:"Screens",appScreensHint:"Pick a screen to start from, then move around through the UI itself.",appSelectLabel:"App",appOutsideBrowser:"Outside the browser",noStepBefore:"There are no Steps yet. A Prototype has the meaning structure ",noStepAfter:" \u2014 one Step is one moment of the story: the screen the user is on and what they have at hand. Add a Step to the base JSON, and its screen will appear here.",noScreens:"This product has no screens yet. Declare its apps and their screens under apps[].screens in the base JSON, and they will appear here.",noPreviewMetadata:"No preview metadata \u2014 ask the agent to add it.",storyWithoutSteps:"This UserStory has no Steps yet, so there is no screen to show. Add one with + Step, or ask the agent to prototype it.",pageActor:e=>`Used by ${e}`,maximize:"Maximize",restore:"Restore size",maximizeHint:"Show the preview alone across the tab \xB7 Esc to restore",situation:"Situation",uiComment:"Comment on UI",uiCommentHint:"Click any part of the preview to comment on it \xB7 Esc to finish",uiCommentPin:(e,t)=>`Comment ${e}: ${t}`,mailFrom:"From",mailTo:"To",mailCc:"Cc",mailDate:"Date",demo:"Demo",demoHint:"Use the app in a browser across the tab, with nothing else on screen \xB7 Esc to finish",exitDemo:"Exit demo",browserBack:"Back",browserForward:"Forward",browserReload:"Reload",browserAddress:"Address",browserTabs:"Tabs",newTab:"New tab",closeTab:"Close tab",browserProfile:e=>`Profile: ${e}`,browserGuest:"Guest",newTabShortcuts:"Pages of this app",unreachableTitle:"This site can\u2019t be reached",unreachableBody:"No page of the prototype has this address."},ja:{renameActivity:"Activity \u540D\u3092\u5909\u66F4",updateActivityDescription:"Activity \u306E\u8AAC\u660E\u3092\u66F4\u65B0",renameStory:"UserStory \u540D\u3092\u5909\u66F4",updateStoryDescription:"UserStory \u306E\u8AAC\u660E\u3092\u66F4\u65B0",renameStep:"Step \u540D\u3092\u5909\u66F4",updateStepDescription:"Step \u306E\u8AAC\u660E\u3092\u66F4\u65B0",changePreviewKind:"Preview \u306E\u7A2E\u5225\u3092\u5909\u66F4",changePreviewViewport:"Preview \u306E\u30D3\u30E5\u30FC\u30DD\u30FC\u30C8\u3092\u5909\u66F4",changePreviewLabel:"Preview \u306E\u30E9\u30D9\u30EB\u3092\u5909\u66F4",moveStory:"UserStory \u3092\u79FB\u52D5",moveStep:"Step \u3092\u79FB\u52D5",deleteTitle:"\u524A\u9664",reorderTitle:e=>`${e} \u306E\u9806\u5E8F\u3092\u5909\u66F4`,addTitle:e=>`${e} \u3092\u8FFD\u52A0`,toFront:"\u2192 \u5148\u982D\u3078",afterName:e=>`\u2192 "${e}" \u306E\u76F4\u5F8C\u3078`,unknownTarget:"(unknown target)",activityGroup:"Activity",storyGroup:"UserStory",stepGroup:"Step",screenGroup:"\u753B\u9762",openInApp:"\u3053\u306E\u753B\u9762\u3092\u30A2\u30D7\u30EA\u30D3\u30E5\u30FC\u3067\u958B\u304F",previewGroup:"Preview",pageGroup:"Page",uiGroup:"UI",targetLabel:(e,t)=>`${e} \xB7 ${t}`,targetMissing:(e,t)=>`${e} \xB7 ${t} (missing)`,noActivityBefore:"Activity \u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002base JSON \u306E ",noActivityAfter:" \u3092\u8FFD\u52A0\u3059\u308B\u304B\u3001Agent \u306B\u4F9D\u983C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",deleteStepAria:"\u30B9\u30C6\u30C3\u30D7\u3092\u524A\u9664",addStepButton:"+ Step",stepNameLabel:"Step \u540D",descriptionLabel:"\u8AAC\u660E",descriptionPlaceholder:"\u3053\u306E Step \u3067\u4F55\u304C\u8D77\u304D\u308B\u304B\uFF08\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u7DE8\u96C6\uFF09",newStepName:"\u65B0\u3057\u3044\u30B9\u30C6\u30C3\u30D7",viewLabel:"\u8868\u793A",viewScenario:"\u30B7\u30CA\u30EA\u30AA",viewApp:"\u30A2\u30D7\u30EA",viewScenarioHint:"\u30E6\u30FC\u30B6\u30FC\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u6CBF\u3063\u3066 Step \u3092\u9806\u306B\u305F\u3069\u308B",viewAppHint:"\u30B7\u30CA\u30EA\u30AA\u306B\u95A2\u4FC2\u306A\u304F\u3001UI \u3092 1 \u3064\u306E\u30A2\u30D7\u30EA\u3068\u3057\u3066\u89E6\u308B",appScreens:"\u753B\u9762",appScreensHint:"\u8D77\u70B9\u306B\u3059\u308B\u753B\u9762\u3092\u9078\u3073\u3001\u3042\u3068\u306F UI \u306E\u30EA\u30F3\u30AF\u3067\u79FB\u52D5\u3057\u307E\u3059\u3002",appSelectLabel:"\u30A2\u30D7\u30EA",appOutsideBrowser:"\u30D6\u30E9\u30A6\u30B6\u4EE5\u5916",noStepBefore:"Step \u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002Prototype \u306F ",noStepAfter:" \u306E\u610F\u5473\u69CB\u9020\u3092\u6301\u3061\u30011 Step = \u30B7\u30CA\u30EA\u30AA\u306E 1 \u5834\u9762\uFF08\u30E6\u30FC\u30B6\u30FC\u304C\u3044\u308B\u753B\u9762\u3068\u3001\u624B\u5143\u306B\u3042\u308B\u3082\u306E\uFF09\u3067\u3059\u3002base JSON \u306B Step \u3092\u8FFD\u52A0\u3059\u308B\u3068\u3001\u3053\u3053\u306B\u305D\u306E\u753B\u9762\u304C\u73FE\u308C\u307E\u3059\u3002",noScreens:"\u3053\u306E\u30D7\u30ED\u30C0\u30AF\u30C8\u306B\u306F\u307E\u3060\u753B\u9762\u304C\u3042\u308A\u307E\u305B\u3093\u3002base JSON \u306E apps[].screens \u306B\u30A2\u30D7\u30EA\u3068\u753B\u9762\u3092\u5BA3\u8A00\u3059\u308B\u3068\u3001\u3053\u3053\u306B\u73FE\u308C\u307E\u3059\u3002",noPreviewMetadata:"preview metadata \u304C\u3042\u308A\u307E\u305B\u3093 \u2014 \u8FFD\u52A0\u306F Agent \u306B\u4F9D\u983C\u3057\u3066\u304F\u3060\u3055\u3044",storyWithoutSteps:"\u3053\u306E UserStory \u306B\u306F\u307E\u3060 Step \u304C\u306A\u304F\u3001\u898B\u305B\u308B\u753B\u9762\u304C\u3042\u308A\u307E\u305B\u3093\u3002+ Step \u3067\u8FFD\u52A0\u3059\u308B\u304B\u3001Agent \u306B\u30D7\u30ED\u30C8\u30BF\u30A4\u30D7\u3092\u4F9D\u983C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",pageActor:e=>`\u5229\u7528\u8005: ${e}`,maximize:"\u6700\u5927\u5316",restore:"\u5143\u306E\u30B5\u30A4\u30BA\u306B\u623B\u3059",maximizeHint:"\u30D7\u30EC\u30D3\u30E5\u30FC\u3060\u3051\u3092\u30BF\u30D6\u3044\u3063\u3071\u3044\u306B\u8868\u793A \xB7 Esc \u3067\u623B\u308B",situation:"\u72B6\u6CC1",uiComment:"UI \u306B\u30B3\u30E1\u30F3\u30C8",uiCommentHint:"\u30D7\u30EC\u30D3\u30E5\u30FC\u306E\u8981\u7D20\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30B3\u30E1\u30F3\u30C8 \xB7 Esc \u3067\u7D42\u4E86",uiCommentPin:(e,t)=>`\u30B3\u30E1\u30F3\u30C8 ${e}: ${t}`,mailFrom:"\u5DEE\u51FA\u4EBA",mailTo:"\u5B9B\u5148",mailCc:"Cc",mailDate:"\u65E5\u6642",demo:"\u30C7\u30E2",demoHint:"\u307B\u304B\u306B\u4F55\u3082\u51FA\u3055\u305A\u3001\u30BF\u30D6\u3044\u3063\u3071\u3044\u306E\u30D6\u30E9\u30A6\u30B6\u3067\u30A2\u30D7\u30EA\u3092\u89E6\u308B \xB7 Esc \u3067\u7D42\u4E86",exitDemo:"\u30C7\u30E2\u3092\u7D42\u4E86",browserBack:"\u623B\u308B",browserForward:"\u9032\u3080",browserReload:"\u518D\u8AAD\u307F\u8FBC\u307F",browserAddress:"\u30A2\u30C9\u30EC\u30B9",browserTabs:"\u30BF\u30D6",newTab:"\u65B0\u3057\u3044\u30BF\u30D6",closeTab:"\u30BF\u30D6\u3092\u9589\u3058\u308B",browserProfile:e=>`\u30D7\u30ED\u30D5\u30A3\u30FC\u30EB: ${e}`,browserGuest:"\u30B2\u30B9\u30C8",newTabShortcuts:"\u3053\u306E\u30A2\u30D7\u30EA\u306E\u30DA\u30FC\u30B8",unreachableTitle:"\u3053\u306E\u30B5\u30A4\u30C8\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093",unreachableBody:"\u30D7\u30ED\u30C8\u30BF\u30A4\u30D7\u306B\u3053\u306E\u30A2\u30C9\u30EC\u30B9\u306E\u30DA\u30FC\u30B8\u306F\u3042\u308A\u307E\u305B\u3093\u3002"}}),qr=["scenario","app"],B="view",re=e=>e[B]==="app"?"app":"scenario",ft=e=>({[B]:e==="app"?"app":null}),ie=(e,t)=>e===void 0?`\u2192 "${t}"`:`"${e}" \u2192 "${t}"`,Fr=e=>({SET_ACTIVITY_NAME:(t,r)=>({title:e.renameActivity,tone:"update",body:ie(O(r,t.target.id)?.name,y(g.SET_ACTIVITY_NAME,t).name)}),SET_ACTIVITY_DESCRIPTION:(t,r)=>({title:e.updateActivityDescription,tone:"update",body:Ce(O(r,t.target.id)?.description,y(g.SET_ACTIVITY_DESCRIPTION,t).description)}),SET_STORY_NAME:(t,r)=>({title:e.renameStory,tone:"update",body:ie($(r,t.target.id)?.story.name,y(g.SET_STORY_NAME,t).name)}),SET_STORY_DESCRIPTION:(t,r)=>({title:e.updateStoryDescription,tone:"update",body:Ce($(r,t.target.id)?.story.description,y(g.SET_STORY_DESCRIPTION,t).description)}),SET_STEP_NAME:(t,r)=>({title:e.renameStep,tone:"update",body:ie(k(r,t.target.id)?.step.name,y(g.SET_STEP_NAME,t).name)}),SET_STEP_DESCRIPTION:(t,r)=>({title:e.updateStepDescription,tone:"update",body:Ce(k(r,t.target.id)?.step.description,y(g.SET_STEP_DESCRIPTION,t).description)}),SET_PREVIEW_KIND:(t,r)=>({title:e.changePreviewKind,tone:"update",body:ie(T(r,t.target.id)?.preview.kind,y(g.SET_PREVIEW_KIND,t).kind)}),SET_PREVIEW_VIEWPORT:(t,r)=>({title:e.changePreviewViewport,tone:"update",body:ie(T(r,t.target.id)?.preview.viewport,y(g.SET_PREVIEW_VIEWPORT,t).viewport)}),SET_PREVIEW_LABEL:t=>({title:e.changePreviewLabel,tone:"update",body:`\u2192 "${y(g.SET_PREVIEW_LABEL,t).label}"`}),REORDER_ACTIVITY:t=>Le(e,e.activityGroup,y(g.REORDER_ACTIVITY,t).after),REORDER_STORY:t=>Le(e,e.storyGroup,y(g.REORDER_STORY,t).after),REORDER_STEP:t=>Le(e,e.stepGroup,y(g.REORDER_STEP,t).after),MOVE_STORY:(t,r)=>({title:e.moveStory,tone:"move",body:`\u2192 ${O(r,y(g.MOVE_STORY,t).toActivity)?.name??y(g.MOVE_STORY,t).toActivity}`}),MOVE_STEP:(t,r)=>({title:e.moveStep,tone:"move",body:`\u2192 ${$(r,y(g.MOVE_STEP,t).toStory)?.story.name??y(g.MOVE_STEP,t).toStory}`}),ADD_ACTIVITY:t=>fe(e,e.activityGroup,y(g.ADD_ACTIVITY,t).name),ADD_STORY:t=>fe(e,e.storyGroup,y(g.ADD_STORY,t).name),ADD_STEP:t=>fe(e,e.stepGroup,y(g.ADD_STEP,t).name),ADD_PREVIEW:t=>fe(e,e.previewGroup,y(g.ADD_PREVIEW,t).label??y(g.ADD_PREVIEW,t).id),DELETE_ACTIVITY:(t,r)=>ge(e,O(r,t.target.id)?.name),DELETE_STORY:(t,r)=>ge(e,$(r,t.target.id)?.story.name),DELETE_STEP:(t,r)=>ge(e,k(r,t.target.id)?.step.name),DELETE_PREVIEW:(t,r)=>ge(e,T(r,t.target.id)?.preview.label)}),Ce=(e,t)=>{const r=t.length>90?`${t.slice(0,90)}\u2026`:t;return e===void 0||e===""?`\u2192 "${r}"`:`"${Kr(e)}" \u2192 "${r}"`},Kr=e=>e.length>60?`${e.slice(0,60)}\u2026`:e,Le=(e,t,r)=>({title:e.reorderTitle(t),tone:"move",body:r===null?e.toFront:e.afterName(r)}),fe=(e,t,r)=>({title:e.addTitle(t),tone:"create",body:`+ "${r}"`}),ge=(e,t)=>({title:e.deleteTitle,tone:"delete",body:t===void 0?e.unknownTarget:`\u2212 "${t}"`}),gt=(e,t,r,i)=>{const n=Fr(e),o=Object.hasOwn(n,t.type)?n[t.type]:void 0,s=o?o(t,i??r):{title:t.type,tone:"meta"};return{title:s.title,targetLabel:wt(e,r,t.target),tone:s.tone,...s.body===void 0?{}:{summary:s.body}}},bt=e=>`${e.type} ${V(e.target)} ${JSON.stringify(e.payload)}`,wt=(e,t,r)=>{switch(r.type){case"activity":{const i=O(t,r.id);return i?e.targetLabel(e.activityGroup,i.name):e.targetMissing(e.activityGroup,r.id)}case"story":{const i=$(t,r.id)?.story;return i?e.targetLabel(e.storyGroup,i.name):e.targetMissing(e.storyGroup,r.id)}case"step":{const i=k(t,r.id)?.step;return i?e.targetLabel(e.stepGroup,i.name):e.targetMissing(e.stepGroup,r.id)}case"screen":{const i=D(t,r.id)?.screen;return i?e.targetLabel(e.screenGroup,i.title):e.targetMissing(e.screenGroup,r.id)}case"preview":{const i=T(t,r.id)?.preview;return i?e.targetLabel(e.previewGroup,i.label??i.id):e.targetMissing(e.previewGroup,r.id)}case"page":return e.targetLabel(e.pageGroup,Ve(t));case Q:{const i=_e(r.id),n=i?T(t,i.previewId)?.preview:void 0;return i&&n?e.targetLabel(e.uiGroup,mt(n,i)):e.targetMissing(e.uiGroup,r.id)}default:return e.targetLabel(r.type,r.id)}},mt=(e,t)=>{const r=t.text===void 0?t.selector:`"${t.text}"`;return`${e.label??e.id} \u203A ${r}`},yt=(e,t)=>{const r=[];for(const i of e){if(i.target.type!==Q)continue;const n=_e(i.target.id);!n||!t.includes(n.previewId)||r.push({id:i.id,previewId:n.previewId,selector:n.selector,number:r.length+1,body:Xe(i)})}return r},kt=(e,t)=>yt(e,t).length,Xr=/^[a-z][a-z0-9+.-]*:/i,Jr=e=>{const t=e.baseUrl?.trim(),r=yr(e.title??"");return`${(t?t.startsWith("http")?t:`https://${t}`:`https://${r==="item"?"page":r}.example.com`).replace(/\/+$/,"")}/`},be=(e,t)=>{const r=Jr(e);if(!t.url)return`${r}${t.id}`;if(Xr.test(t.url))return t.url;try{return decodeURI(new URL(t.url,r).href)}catch{return t.url}},Me=",",xt=e=>e.preview?.split(Me)??[],Zr=(e,t)=>e.kind===t.kind&&e.viewport===t.viewport,$t=(e,t,r)=>{const i=t.find(o=>r.includes(o.id));if(i)return i;const n=r.flatMap(o=>T(e,o)?.preview??[]);return t.find(o=>n.some(s=>Zr(o,s)))??t[0]},Et=(e,t,r,i)=>{const n=t.screen.previews,o=r===void 0?$t(e,n,xt(i)):n.find(a=>a.id===r);if(!o)return;const s=r===void 0&&n.length>1;return{kind:"screen",screen:t,preview:o,pinned:r!==void 0,tabs:s?n:[]}},St=e=>({layout:e.length>1?"side-by-side":"single",panes:e,shown:e.map(t=>t.preview)}),Tt=(e,t,r)=>t.panes.flatMap(i=>{if(!G(i))return[{kind:"material",preview:i.material}];const n=D(e,i.screen),o=n&&Et(e,n,i.preview,r);return o?[o]:[]}),Ne=(e,t,r)=>{if(t.kind==="screen"){const i=Et(e,t,void 0,r);return St(i?[i]:[])}return St(Tt(e,t.step,r))},Qr=(e,t)=>e.panes.flatMap(r=>r.kind!=="screen"||r.tabs.length===0?[]:[r.tabs.some(i=>i.id===t)?t:r.preview.id]).join(Me),ei=(e,t)=>[...H(t),...le(e,t).flatMap(r=>r.screen.previews)],ti=["activity","story","step","screen","preview"],ri=(e,t,r)=>{switch(t){case"activity":return O(e,r)!==void 0;case"story":return $(e,r)!==void 0||e.activities.some(i=>i.stories.some(n=>n.id===r));case"step":return k(e,r)!==void 0||Y(e).some(i=>i.step.id===r);case"screen":return D(e,r)!==void 0;case"preview":return T(e,r)!==void 0;default:return!1}},ii=(e,t)=>{let r;if(t.navigate!==null)r=t.navigate.includes("=")?t.navigate:`step=${t.navigate}`;else{const o=t.href?.trim()??"";if(o===""||o==="#"||o.toLowerCase().startsWith("javascript:"))return"no-destination";if(!o.startsWith("#"))return null;r=o}const i=Se(r),n=ti.filter(o=>i[o]!==void 0);return n.length===0?t.navigate===null?null:"unknown-target":n.every(o=>ri(e,o,i[o]??""))?null:"unknown-target"},ni=(e,t)=>{const r=t.mail??{},i=[{label:e.mailFrom,value:r.from},{label:e.mailTo,value:r.to},{label:e.mailCc,value:r.cc},{label:e.mailDate,value:r.date}].flatMap(s=>s.value===void 0||s.value.trim()===""?[]:[{label:s.label,value:s.value}]),n=r.from?.replace(/<[^>]*>/g,"").replace(/["']/g,"").trim()||r.from?.trim(),o=n?Array.from(n)[0]?.toUpperCase():void 0;return{...r.subject===void 0||r.subject.trim()===""?{}:{subject:r.subject},...n?{sender:n}:{},...o===void 0?{}:{initial:o},rows:i}},It=(e,t)=>{const r=[];for(const i of t.activities){r.push({value:V({type:"activity",id:i.id}),label:i.name,group:e.activityGroup});for(const n of i.stories){r.push({value:V({type:"story",id:C(i.id,n.id)}),label:`${i.name} \u203A ${n.name}`,group:e.storyGroup});for(const o of n.steps)r.push({value:V({type:"step",id:ue(i,n,o)}),label:`${n.name} \u203A ${o.name}`,group:e.stepGroup})}}for(const{app:i,screen:n}of z(t))r.push({value:V({type:"screen",id:n.id}),label:`${i.name} \u203A ${n.title}`,group:e.screenGroup});return r},oi=(e,t,r)=>{const i=j(t,r);if(i?.kind==="screen"){const{screen:n}=i;return{value:V({type:"screen",id:n.id}),label:n.title,group:e.screenGroup}}return i?.kind!=="step"?null:{value:V({type:"step",id:ce(i)}),label:i.step.name,group:e.stepGroup}},j=(e,t)=>{if(re(t)==="app"){const o=D(e,t.screen);return o?{kind:"screen",...o}:void 0}const r=k(e,t.step);if(r)return{kind:"step",...r};const i=O(e,t.activity),n=i?.stories.find(o=>o.id===t.story||C(i.id,o.id)===t.story);return i&&n?{kind:"story",activity:i,story:n}:void 0},At=(e,t)=>{const r=(p,l)=>l===void 0?{title:p}:{actor:l,title:p};if(t.kind==="screen")return r(t.screen.title,t.app.actor);const{activity:i,story:n,step:o}=t,s=le(e,o),a=s.length===1?s[0]:void 0;return r(a?.screen.title??o.name,o.actor??n.actor??i.actor??a?.app.actor)},si=(e,t)=>{const r=t.actor??e.actor;return r===void 0?{title:t.name}:{actor:r,title:t.name}},Ve=e=>e.title??"UX Prototype",Pt=(e,t)=>(t?e.preview=t:delete e.preview,e),ai=(e,t,r)=>{if(!t)return;const i=Tt(e,t,r).flatMap(n=>n.kind==="screen"&&!n.pinned?[n.preview.id]:[]);return i.length===0?void 0:i.join(Me)},_t=(e,t)=>{const r=()=>{if(t.step===void 0&&t.story===void 0)return;const o=Rt(e,{...t,[B]:""}),s=k(e,o.step);return s&&le(e,s.step)[0]},i=D(e,t.screen)??r()??z(e)[0],n={...t,[B]:"app"};for(const o of["activity","story","step"])delete n[o];return i?n.screen=i.screen.id:delete n.screen,Pt(n,i&&$t(e,i.screen.previews,xt(t))?.id)},di=(e,t,r)=>{const i=s=>Hr(s.step,t);if(r&&i(r))return r;const n=r?.story.steps??[],o=s=>{const a=n[s];return r&&a?{...r,step:a,stepIndex:s}:void 0};for(let s=(r?.stepIndex??0)+1;s<n.length;s+=1){const a=o(s);if(a&&i(a))return a}for(let s=(r?.stepIndex??0)-1;s>=0;s-=1){const a=o(s);if(a&&i(a))return a}return Y(e).find(i)},Rt=(e,t)=>{const r=O(e,t.activity),i=t.story,n=r?.stories.find(N=>N.id===i||C(r.id,N.id)===i),o=n&&r?{activity:r,story:n}:$(e,i),s=t.step,p=(o&&s?k(e,`${C(o.activity.id,o.story.id)}.${s}`):void 0)??k(e,s),l=t.screen,b=l===void 0?void 0:di(e,l,p);if(l!==void 0&&!b&&D(e,l))return _t(e,{...t,[B]:"app"});const h=b??p,v=h?.activity??o?.activity??r??e.activities[0],I=h?.story??(o&&o.activity===v?o.story:void 0)??v?.stories[0],_=h?.step??I?.steps[0],S={...t};return delete S.screen,v?S.activity=v.id:delete S.activity,I&&v?S.story=$(e,I.id)?I.id:C(v.id,I.id):delete S.story,_&&I&&v?S.step=k(e,_.id)?_.id:ue(v,I,_):delete S.step,delete S[B],Pt(S,ai(e,_,t))},pi=["activity","story","step","screen"],we=(e,t)=>re(t)==="app"?_t(e,t):Rt(e,t),li=(e,t)=>{const r=t.screen.previews.find(o=>o.kind==="browser");if(!r)return;let i;try{i=new URL(be(e,r),"https://page.example.com")}catch{return}const n=i.pathname.split("/").filter(o=>o!=="").map(o=>{try{return decodeURIComponent(o)}catch{return o}});return{origin:i.origin,segments:n}},Dt=()=>({screens:[],children:new Map}),ze=(e,t,r)=>{const[i,...n]=e.children.entries();if(e.screens.length===0&&i&&n.length===0&&r!=="/"){const[o,s]=i;return ze(s,`${t}/${o}`,`${r}/${o}`)}return{segment:t,path:r,screens:e.screens,children:[...e.children.entries()].map(([o,s])=>ze(s,`/${o}`,`${r==="/"?"":r}/${o}`))}},ci=e=>{const t=new Map;for(const[r,i]of e){const n=t.get(i.origin)??Dt();t.set(i.origin,n);let o=n;for(const s of i.segments){const a=o.children.get(s)??Dt();o.children.set(s,a),o=a}o.screens.push(r)}return[...t.entries()].map(([r,i])=>({origin:r,root:ze(i,"/","/")}))},ui=(e,t)=>{const r=t.screens.map(o=>({app:t,screen:o})),i=[],n=[];for(const o of r){const s=li(e,o);s?i.push([o,s]):n.push(o)}return{app:t,screens:r,trees:ci(i),others:n}},Ot=e=>e.apps.map(t=>ui(e,t)).filter(t=>t.screens.length>0),Ct=(e,t)=>t?.kind!=="screen"?e[0]:e.find(r=>r.app.id===t.app.id)??e[0],hi=(e,t)=>{switch(t.type){case"activity":return O(e,t.id)!==void 0;case"story":return $(e,t.id)!==void 0;case"step":return k(e,t.id)!==void 0;case"screen":return D(e,t.id)!==void 0;case"preview":return T(e,t.id)!==void 0;case"page":return!0;case Q:{const r=_e(t.id);return r!==void 0&&T(e,r.previewId)!==void 0}default:return!1}},Lt=e=>{const t=ve(e);return{name:"prototype",label:"UX Prototype",parseBase:pt,emptyBase:lt,actions:g,apply:ht,hasTarget:hi,canonicalTarget:(r,i)=>{if(i.type==="step"){const n=k(r,i.id);return n?{...i,id:ce(n)}:i}if(i.type==="story"){const n=$(r,i.id);return n?{...i,id:C(n.activity.id,n.story.id)}:i}if(i.type==="preview"){const n=T(r,i.id);return n?{...i,id:n.preview.id}:i}return i},describe:(r,i,n)=>gt(t,r,i,n),serialize:bt,resolveNavigation:we,navigationHierarchy:pi,commentTargets:(r,i)=>It(t,r),currentTarget:(r,i)=>oi(t,r,i),title:Ve}},me="data-dpk-modal",vi=e=>{try{return e.matches(":modal")}catch{return!1}},Mt=e=>{e.setAttribute(me,""),e.open||e.show()},Nt=e=>{Object.hasOwn(e,"showModal")||Object.defineProperty(e,"showModal",{configurable:!0,value:()=>Mt(e)})},Vt=(e,t)=>{if(!vi(t))return;const r=i=>{i.target===t&&(i.stopImmediatePropagation(),e.removeEventListener("close",r,!0))};e.addEventListener("close",r,!0),t.close(),Mt(t)},fi='a, button, input, select, textarea, label, summary, [role="button"], [role="link"], [role="tab"]',zt=/^-?[A-Za-z_][\w-]*$/,Yt=40,gi=(e,t)=>{const r=e.closest(fi);return r!==null&&r!==t&&t.contains(r)?r:e},ye=e=>{const t=e.replace(/\s+/g," ").trim();if(t==="")return;const r=Array.from(t);return r.length>Yt?`${r.slice(0,Yt).join("")}\u2026`:t},bi=e=>{const t=e.getAttribute("aria-label")??e.getAttribute("title");if(t)return ye(t);const r=e.tagName.toLowerCase();return ye(r==="input"||r==="textarea"||r==="select"?e.getAttribute("placeholder")??e.getAttribute("name")??"":r==="img"?e.getAttribute("alt")??"":e.textContent??"")},wi=e=>{const t=e.getAttribute("id");if(t&&zt.test(t))return`#${t}`;const r=e.tagName.toLowerCase(),i=Array.from(e.classList).filter(a=>zt.test(a)).slice(0,2).map(a=>`.${a}`).join(""),n=e.parentElement,o=n?Array.from(n.children).filter(a=>a.tagName===e.tagName):[],s=o.length>1?`:nth-of-type(${o.indexOf(e)+1})`:"";return`${r}${i}${s}`},mi=(e,t,r)=>{try{const i=e.querySelectorAll(t);return i.length===1&&i[0]===r}catch{return!1}},yi=(e,t)=>{const r=[];let i=e;for(;i!==null&&i!==t;){const o=wi(i);if(r.unshift(o),o.startsWith("#")||mi(t,r.join(" > "),e))break;i=i.parentElement}const n=bi(e);return{selector:r.length===0?":scope":r.join(" > "),tag:e.tagName.toLowerCase(),...n===void 0?{}:{text:n}}},ki=(e,t)=>{if(t===":scope")return e;try{return e.querySelector(t)}catch{return null}},xi=["screen","preview"],ne=e=>JSON.stringify(xi.map(t=>e[t]??null)),Ut=(e,t)=>e?.kind==="page"&&ne(e.page)===t,ke=e=>`tab-${e}`,$i=e=>({tabs:[{id:ke(1),history:[{kind:"page",page:e}],index:0}],activeId:ke(1),seen:ne(e),nextId:2}),Ei={id:"",history:[],index:0},q=e=>e.tabs.find(t=>t.id===e.activeId)??e.tabs[0]??Ei,oe=e=>{const t=q(e);return t.history[t.index]},Si=e=>q(e).index>0,Ti=e=>{const t=q(e);return t.index<t.history.length-1},Wt=(e,t)=>({...e,tabs:e.tabs.map(r=>r.id===e.activeId?t(r):r)}),Ye=(e,t)=>Wt(e,r=>({...r,history:[...r.history.slice(0,r.index+1),t],index:r.index+1})),xe=e=>{const t=oe(e);return t?.kind==="page"?{...e,seen:ne(t.page)}:e},Bt=(e,t)=>{const r=q(e),i=r.index+t;return i<0||i>=r.history.length?e:xe(Wt(e,n=>({...n,index:i})))},Gt=(e,t,r)=>{const i=ke(e.nextId),n=e.tabs.findIndex(o=>o.id===e.activeId)+1;return xe({...e,tabs:[...e.tabs.slice(0,n),{id:i,history:[t],index:0},...e.tabs.slice(n)],activeId:r?e.activeId:i,nextId:e.nextId+1})},Ii=(e,t)=>{const r=e.tabs.findIndex(o=>o.id===t);if(r<0)return e;if(e.tabs.length===1){const o=ke(e.nextId);return{...e,tabs:[{id:o,history:[{kind:"new-tab"}],index:0}],activeId:o,nextId:e.nextId+1}}const i=e.tabs.filter(o=>o.id!==t);if(t!==e.activeId)return{...e,tabs:i};const n=i[r]??i[r-1];return xe({...e,tabs:i,activeId:n?.id??e.activeId})},Ai=(e,t)=>{const r=t===null?null:ne(t);if(r===e.seen)return e;const i={...e,seen:r};return t===null||r===null||Ut(oe(e),r)?i:Ye(i,{kind:"page",page:t})},Pi=(e,t)=>{const r=ne(t);return Ut(oe(e),r)?e.seen===r?e:{...e,seen:r}:Ye({...e,seen:r},{kind:"page",page:t})},Ht=(e,t)=>{switch(t.kind){case"observe":return Ai(e,t.page);case"visit":return Pi(e,t.page);case"back":return Bt(e,-1);case"forward":return Bt(e,1);case"open-tab":return Gt(e,t.entry,t.background);case"new-tab":return Gt(e,{kind:"new-tab"},!1);case"unreachable":return Ye(e,{kind:"unreachable",url:t.url});case"activate":return e.tabs.some(r=>r.id===t.id)&&t.id!==e.activeId?xe({...e,activeId:t.id}):e;case"close-tab":return Ii(e,t.id);default:return e}},jt=(e,t)=>{const r=we(e,t),i=j(e,r);if(i?.kind!=="screen")return null;const[n]=Ne(e,i,r).shown;return n?.kind!=="browser"?null:{screen:i.screen.id,preview:n.id}},$e=(e,t)=>{const r=j(e,we(e,{[B]:"app",...t}));return r?.kind==="screen"?r:void 0},qt=(e,t)=>{const r=e.trim();if(r==="")return null;try{return r.startsWith("/")?new URL(r,t):new URL(/^[a-z][a-z0-9+.-]*:\/\//i.test(r)?r:`https://${r}`)}catch{return null}},Ft=e=>`${e.origin}${e.pathname.replace(/\/+$/,"")}`,_i=(e,t,r)=>{const i=qt(t,r);if(i===null)return null;const n=Ft(i);for(const{screen:o}of z(e))for(const s of o.previews){if(s.kind!=="browser")continue;const a=qt(be(e,s),r);if(a!==null&&Ft(a)===n)return{screen:o.id,preview:s.id}}return null},Kt=e=>{try{return new URL(e).host||e}catch{return e}},Ri=(e,t,r)=>t===void 0||t.kind==="new-tab"?r.newTab:t.kind==="unreachable"?Kt(t.url):$e(e,t.page)?.screen.title??r.newTab,Xt=(e,t)=>{if(t===void 0||t.kind==="new-tab")return"";if(t.kind==="unreachable")return t.url;const r=$e(e,t.page)?.screen.previews.find(i=>i.id===t.page.preview);return r===void 0?"":be(e,r)},Jt=e=>{const t=q(e);for(let r=t.index;r>=0;r-=1){const i=t.history[r];if(i?.kind==="page")return i.page}for(const r of e.tabs){const i=r.history[r.index];if(i?.kind==="page")return i.page}},Di=(e,t)=>t===void 0?void 0:$e(e,t)?.app.actor,Zt=(e,t,r,i=null)=>{const n=q(t),o=n.history[n.index],s=Di(e,Jt(t)??i??void 0);return{tabs:t.tabs.map(a=>({id:a.id,title:Ri(e,a.history[a.index],r),url:Xt(e,a.history[a.index]),active:a.id===n.id})),entry:o,url:Xt(e,o),canBack:Si(t),canForward:Ti(t),...s===void 0?{}:{profile:s}}},Oi=e=>Jt(e)??null,Ci=(e,t)=>{const r=t===null?void 0:$e(e,t),i=Ct(Ot(e),r),n=[],o=(s,a)=>{for(const{screen:p}of a.screens){const l=p.previews.find(b=>b.kind==="browser");l!==void 0&&n.push({title:p.title,url:`${s}${a.path==="/"?"":a.path}`,page:{screen:p.id,preview:l.id}})}for(const p of a.children)o(s,p)};for(const s of i?.trees??[])o(Kt(s.origin),s.root);return n},Qt=(e,t)=>{const{state:r,navigation:i}=e,n=j(r,i),o=re(i);return d`
|
|
2
|
-
<div class="nav">
|
|
3
|
-
${Ni(e,t,o)}
|
|
4
|
-
${o==="app"?Vi(e,t,n):n!==void 0&&n.kind!=="screen"?Ui(e,t,n):d`<p class="nav-empty">${t.noActivityBefore}<code>activities</code>${t.noActivityAfter}</p>`}
|
|
5
|
-
</div>
|
|
6
|
-
`},Li={scenario:"viewScenario",app:"viewApp"},Mi={scenario:"viewScenarioHint",app:"viewAppHint"},Ni=(e,t,r)=>d`<nav class="view-switch" aria-label=${t.viewLabel}>
|
|
7
|
-
${qr.map(i=>d`<a
|
|
8
|
-
class="view-option"
|
|
9
|
-
href=${e.hashFor(ft(i))}
|
|
10
|
-
title=${t[Mi[i]]}
|
|
11
|
-
aria-current=${i===r?"page":c}
|
|
12
|
-
data-view=${i}
|
|
13
|
-
>${t[Li[i]]}</a
|
|
14
|
-
>`)}
|
|
15
|
-
</nav>`,Vi=(e,t,r)=>{const i=r?.kind==="screen"?r:void 0,n=Ot(e.state),o=Ct(n,r),s={context:e,currentId:i?.screen.id},a=o?.others??[];return d`
|
|
16
|
-
${n.length>1&&o?zi(e,t,n,o):c}
|
|
17
|
-
${n.length===1&&o?.app.description?d`<p class="app-description">${o.app.description}</p>`:c}
|
|
18
|
-
<div class="steps-head">
|
|
19
|
-
<span class="dpk-label">${t.appScreens}</span>
|
|
20
|
-
<span class="dpk-label">${o?.screens.length??0}</span>
|
|
21
|
-
</div>
|
|
22
|
-
<p class="app-hint">${t.appScreensHint}</p>
|
|
23
|
-
${o?.trees.map(p=>d`<section class="app-tree">
|
|
24
|
-
<h3 class="app-origin">${Yi(p.origin)}</h3>
|
|
25
|
-
<ul class="tree">
|
|
26
|
-
${er(s,p.root,0)}
|
|
27
|
-
</ul>
|
|
28
|
-
</section>`)}
|
|
29
|
-
${a.length===0?c:d`<section class="app-group">
|
|
30
|
-
${(o?.trees.length??0)>0?d`<h3 class="app-group-heading">${t.appOutsideBrowser}</h3>`:c}
|
|
31
|
-
<ul class="steps app-screens">
|
|
32
|
-
${a.map(p=>{const l=tr(s,p);return d`<li class="step-row" data-current=${String(l)}>
|
|
33
|
-
<a class="step-link" href=${ir(e,p)} aria-current=${l?"page":c}>
|
|
34
|
-
<span class="step-name">${p.screen.title}</span>
|
|
35
|
-
${nr(e,p)}
|
|
36
|
-
</a>
|
|
37
|
-
</li>`})}
|
|
38
|
-
</ul>
|
|
39
|
-
</section>`}
|
|
40
|
-
${i?.screen.description?d`<div class="detail">
|
|
41
|
-
<div class="screen-description dpk-prose">${Te(Ie(i.screen.description))}</div>
|
|
42
|
-
</div>`:c}
|
|
43
|
-
`},zi=(e,t,r,i)=>d`<div class="field">
|
|
44
|
-
<span class="dpk-label">${t.appSelectLabel}</span>
|
|
45
|
-
<select
|
|
46
|
-
class="dpk-select"
|
|
47
|
-
aria-label=${t.appSelectLabel}
|
|
48
|
-
@change=${Ae(n=>{const o=r[Number(n)]?.screens[0];o&&e.navigate(rr(o))})}
|
|
49
|
-
>
|
|
50
|
-
${r.map((n,o)=>d`<option value=${String(o)} ?selected=${n===i}>${n.app.name}</option>`)}
|
|
51
|
-
</select>
|
|
52
|
-
${i.app.description?d`<p class="app-description">${i.app.description}</p>`:c}
|
|
53
|
-
</div>`,er=(e,t,r)=>d`<li
|
|
54
|
-
class="tree-node"
|
|
55
|
-
>
|
|
56
|
-
${t.screens.length===0&&r===0?c:t.screens.length===0?d`<div class="tree-row" data-depth=${String(r)} data-current="false">
|
|
57
|
-
<span class="tree-link" title=${t.path}><code class="tree-path">${t.segment}</code></span>
|
|
58
|
-
</div>`:t.screens.map(i=>{const n=tr(e,i);return d`<div class="tree-row" data-depth=${String(r)} data-current=${String(n)}>
|
|
59
|
-
<a
|
|
60
|
-
class="tree-link"
|
|
61
|
-
href=${ir(e.context,i)}
|
|
62
|
-
title=${t.path}
|
|
63
|
-
aria-current=${n?"page":c}
|
|
64
|
-
>
|
|
65
|
-
<code class="tree-path">${t.segment}</code>
|
|
66
|
-
<span class="tree-title">${i.screen.title}</span>
|
|
67
|
-
${nr(e.context,i)}
|
|
68
|
-
</a>
|
|
69
|
-
</div>`})}
|
|
70
|
-
${t.children.length>0?d`<ul class="tree">
|
|
71
|
-
${t.children.map(i=>er(e,i,r+1))}
|
|
72
|
-
</ul>`:c}
|
|
73
|
-
</li>`,tr=(e,t)=>t.screen.id===e.currentId,rr=e=>({screen:e.screen.id,preview:null}),ir=(e,t)=>e.hashFor(rr(t)),nr=(e,t)=>{const r=e.commentCount({type:"screen",id:t.screen.id})+kt(e.comments,t.screen.previews.map(i=>i.id));return r>0?d`<span class="step-note">${r}</span>`:c},Yi=e=>e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,""),Ui=(e,t,r)=>{const{state:i}=e,{activity:n,story:o}=r,s=o.steps,a=r.kind==="step"?r.step:void 0,p=r.kind==="step"?ce(r):void 0;return d`
|
|
74
|
-
<div class="field">
|
|
75
|
-
<span class="dpk-label">Activity</span>
|
|
76
|
-
<select
|
|
77
|
-
class="dpk-select"
|
|
78
|
-
aria-label="Activity"
|
|
79
|
-
@change=${Ae(l=>e.navigate({activity:l,story:null,step:null}))}
|
|
80
|
-
>
|
|
81
|
-
${i.activities.map(l=>d`<option value=${l.id} ?selected=${l.id===n.id}>${l.name}</option>`)}
|
|
82
|
-
</select>
|
|
83
|
-
</div>
|
|
84
|
-
<div class="field">
|
|
85
|
-
<span class="dpk-label">User Story</span>
|
|
86
|
-
<select
|
|
87
|
-
class="dpk-select"
|
|
88
|
-
aria-label="User Story"
|
|
89
|
-
@change=${Ae(l=>e.navigate({activity:n.id,story:l,step:null}))}
|
|
90
|
-
>
|
|
91
|
-
${n.stories.map(l=>d`<option value=${l.id} ?selected=${l.id===o.id}>${l.name}</option>`)}
|
|
92
|
-
</select>
|
|
93
|
-
</div>
|
|
94
|
-
<div class="steps-head">
|
|
95
|
-
<span class="dpk-label">Step</span>
|
|
96
|
-
<span class="dpk-label">${s.length}</span>
|
|
97
|
-
</div>
|
|
98
|
-
<ol class="steps">
|
|
99
|
-
${kr(s,l=>ue(n,o,l),(l,b)=>{const h=ue(n,o,l),v=e.commentCount({type:"step",id:h})+kt(e.comments,ei(i,l).map(I=>I.id));return d`
|
|
100
|
-
<li class="step-row" data-current=${String(l.id===a?.id)}>
|
|
101
|
-
<a class="step-link" href=${e.hashFor({activity:n.id,story:o.id,step:l.id})}>
|
|
102
|
-
<span class="step-index">${String(b+1).padStart(2,"0")}</span>
|
|
103
|
-
<span class="step-name">${l.name}</span>
|
|
104
|
-
${v>0?d`<span class="step-note">${v}</span>`:c}
|
|
105
|
-
</a>
|
|
106
|
-
<span class="row-tools">
|
|
107
|
-
<button
|
|
108
|
-
class="dpk-icon-btn"
|
|
109
|
-
type="button"
|
|
110
|
-
aria-label=${t.deleteStepAria}
|
|
111
|
-
@click=${()=>e.dispatch(ee.deleteStep(h))}
|
|
112
|
-
>
|
|
113
|
-
${pe()}
|
|
114
|
-
</button>
|
|
115
|
-
</span>
|
|
116
|
-
</li>
|
|
117
|
-
`})}
|
|
118
|
-
</ol>
|
|
119
|
-
<button class="dpk-btn" type="button" @click=${()=>Bi(e,t,C(n.id,o.id))}>
|
|
120
|
-
${t.addStepButton}
|
|
121
|
-
</button>
|
|
122
|
-
${a?tt(p,d`<div class="detail">
|
|
123
|
-
<div class="detail-row">
|
|
124
|
-
<span class="dpk-label">${t.stepNameLabel}</span>
|
|
125
|
-
<span class="detail-value">
|
|
126
|
-
<dpk-component-inline-edit
|
|
127
|
-
.value=${a.name}
|
|
128
|
-
.label=${t.stepNameLabel}
|
|
129
|
-
@dpk-commit=${Je(l=>e.dispatch(ee.setStepName(p??a.id,l)))}
|
|
130
|
-
></dpk-component-inline-edit>
|
|
131
|
-
</span>
|
|
132
|
-
</div>
|
|
133
|
-
<div class="detail-row">
|
|
134
|
-
<span class="dpk-label">${t.descriptionLabel}</span>
|
|
135
|
-
<span class="detail-value">
|
|
136
|
-
<dpk-component-inline-edit
|
|
137
|
-
multiline
|
|
138
|
-
markdown
|
|
139
|
-
.value=${a.description??""}
|
|
140
|
-
.placeholder=${t.descriptionPlaceholder}
|
|
141
|
-
.label=${t.descriptionLabel}
|
|
142
|
-
@dpk-commit=${Je(l=>e.dispatch(ee.setStepDescription(p??a.id,l)))}
|
|
143
|
-
></dpk-component-inline-edit>
|
|
144
|
-
</span>
|
|
145
|
-
</div>
|
|
146
|
-
${Wi(e,t,a)}
|
|
147
|
-
</div>`):c}
|
|
148
|
-
`},Wi=(e,t,r)=>{const i=le(e.state,r);return i.length===0?c:d`<div class="detail-row">
|
|
149
|
-
<span class="dpk-label">${t.screenGroup}</span>
|
|
150
|
-
<span class="detail-value">
|
|
151
|
-
${i.map(({app:n,screen:o})=>d`<div class="step-screen-entry">
|
|
152
|
-
<a
|
|
153
|
-
class="step-screen"
|
|
154
|
-
href=${e.hashFor({...ft("app"),screen:o.id})}
|
|
155
|
-
title=${t.openInApp}
|
|
156
|
-
>${n.name} › ${o.title}</a
|
|
157
|
-
>
|
|
158
|
-
${o.description?d`<div class="screen-description dpk-prose">
|
|
159
|
-
${Te(Ie(o.description))}
|
|
160
|
-
</div>`:c}
|
|
161
|
-
</div>`)}
|
|
162
|
-
</span>
|
|
163
|
-
</div>`},Bi=(e,t,r)=>{const i=xr("new-step",ut(e.state));e.dispatch(ee.addStep(r,i,t.newStepName)).ok&&e.navigate({story:r,step:i})},Ue={mobile:"390px",tablet:"834px",desktop:"1180px",fluid:"100%"},We={mobile:"620px",tablet:"640px",desktop:"520px",fluid:"420px"},se=e=>d`<svg
|
|
164
|
-
viewBox="0 0 16 16"
|
|
165
|
-
fill="none"
|
|
166
|
-
stroke="currentColor"
|
|
167
|
-
stroke-width="1.5"
|
|
168
|
-
stroke-linecap="round"
|
|
169
|
-
stroke-linejoin="round"
|
|
170
|
-
aria-hidden="true"
|
|
171
|
-
focusable="false"
|
|
172
|
-
>
|
|
173
|
-
${e}
|
|
174
|
-
</svg>`,Gi=()=>se(Z`<path d="M13 8H3.5M7.5 3.5 3 8l4.5 4.5" />`),Hi=()=>se(Z`<path d="M3 8h9.5M8.5 3.5 13 8l-4.5 4.5" />`),ji=()=>se(Z`<path d="M13 8a5 5 0 1 1-1.6-3.7" /><path d="M13 2.8v2.7h-2.7" />`),qi=()=>se(Z`<rect x="4" y="7" width="8" height="6" rx="1.4" /><path d="M5.8 7V5.3a2.2 2.2 0 0 1 4.4 0V7" />`),Be=()=>se(Z`<circle cx="8" cy="8" r="5.5" /><path d="M2.5 8h11M8 2.5c1.6 1.6 2.3 3.5 2.3 5.5S9.6 11.9 8 13.5M8 2.5C6.4 4.1 5.7 6 5.7 8s.7 3.9 2.3 5.5" />`),Fi=(e,t,r)=>{const i=t.length-1;if(e==="ArrowRight")return t[r===i?0:r+1];if(e==="ArrowLeft")return t[r===0?i:r-1];if(e==="Home")return t[0];if(e==="End")return t[i]},Ki=(e,t)=>{const{view:r,send:i}=t,n=o=>s=>{const a=r.tabs[o],p=s.key==="Enter"||s.key===" "?a:Fi(s.key,r.tabs,o);p!==void 0&&(s.preventDefault(),i({kind:"activate",id:p.id,focus:!0}))};return d`<div class="browser-tabs">
|
|
175
|
-
<div class="browser-tab-list" role="tablist" aria-label=${e.browserTabs}>
|
|
176
|
-
${r.tabs.map((o,s)=>d`<div
|
|
177
|
-
class="browser-tab"
|
|
178
|
-
role="tab"
|
|
179
|
-
tabindex=${o.active?"0":"-1"}
|
|
180
|
-
aria-selected=${o.active?"true":"false"}
|
|
181
|
-
title=${o.title}
|
|
182
|
-
@click=${()=>i({kind:"activate",id:o.id})}
|
|
183
|
-
@keydown=${n(s)}
|
|
184
|
-
>
|
|
185
|
-
<span class="browser-favicon">${Be()}</span>
|
|
186
|
-
<span class="browser-tab-title">${o.title}</span>
|
|
187
|
-
${or(e,t,o.id)}
|
|
188
|
-
</div>`)}
|
|
189
|
-
</div>
|
|
190
|
-
<button
|
|
191
|
-
class="browser-new-tab"
|
|
192
|
-
type="button"
|
|
193
|
-
aria-label=${e.newTab}
|
|
194
|
-
title=${e.newTab}
|
|
195
|
-
@click=${()=>i({kind:"new-tab"})}
|
|
196
|
-
>
|
|
197
|
-
${Ze()}
|
|
198
|
-
</button>
|
|
199
|
-
${t.onExitDemo===void 0?c:d`<button class="demo-exit" type="button" title=${e.exitDemo} @click=${t.onExitDemo}>
|
|
200
|
-
${pe()} ${e.exitDemo} <kbd>Esc</kbd>
|
|
201
|
-
</button>`}
|
|
202
|
-
</div>`},or=(e,t,r)=>d`<button
|
|
203
|
-
class="browser-tab-close"
|
|
204
|
-
type="button"
|
|
205
|
-
aria-label=${e.closeTab}
|
|
206
|
-
title=${e.closeTab}
|
|
207
|
-
@click=${i=>{i.stopPropagation(),t.send({kind:"close-tab",id:r})}}
|
|
208
|
-
>
|
|
209
|
-
${pe()}
|
|
210
|
-
</button>`,Xi={back:Gi,forward:Hi,reload:ji},F=(e,t,r)=>{const{view:i,send:n}=t,o={back:e.browserBack,forward:e.browserForward,reload:e.browserReload}[r],s={back:!i.canBack,forward:!i.canForward,reload:i.entry?.kind!=="page"}[r];return d`<button
|
|
211
|
-
class=${`browser-nav browser-${r}`}
|
|
212
|
-
type="button"
|
|
213
|
-
aria-label=${o}
|
|
214
|
-
title=${o}
|
|
215
|
-
?disabled=${s}
|
|
216
|
-
@click=${()=>n({kind:r})}
|
|
217
|
-
>
|
|
218
|
-
${Xi[r]()}
|
|
219
|
-
</button>`},Ji=(e,t,r)=>{const{view:i,send:n}=t,o=i.profile??e.browserGuest;return d`<div class="browser-toolbar">
|
|
220
|
-
${r?c:d`${F(e,t,"back")} ${F(e,t,"forward")} ${F(e,t,"reload")}`}
|
|
221
|
-
<form
|
|
222
|
-
class="browser-address-form"
|
|
223
|
-
@submit=${s=>{s.preventDefault();const a=s.currentTarget,p=a instanceof HTMLFormElement?a.querySelector("input"):null;!p||p.value.trim()===""||(p.blur(),n({kind:"address",input:p.value}))}}
|
|
224
|
-
>
|
|
225
|
-
<span class="browser-lock">${i.entry?.kind==="page"?qi():Be()}</span>
|
|
226
|
-
<input
|
|
227
|
-
class="browser-address"
|
|
228
|
-
type="text"
|
|
229
|
-
aria-label=${e.browserAddress}
|
|
230
|
-
spellcheck="false"
|
|
231
|
-
autocomplete="off"
|
|
232
|
-
.value=${$r(i.url)}
|
|
233
|
-
@focus=${s=>{s.currentTarget instanceof HTMLInputElement&&s.currentTarget.select()}}
|
|
234
|
-
@keydown=${s=>{if(s.key!=="Escape")return;s.preventDefault();const a=s.currentTarget;a instanceof HTMLInputElement&&(a.value=i.url,a.blur())}}
|
|
235
|
-
/>
|
|
236
|
-
</form>
|
|
237
|
-
<span class="browser-profile" title=${e.browserProfile(o)}>
|
|
238
|
-
<span class="browser-avatar" aria-hidden="true">${Array.from(o)[0]??""}</span>
|
|
239
|
-
${r?c:d`<span class="browser-profile-name">${o}</span>`}
|
|
240
|
-
</span>
|
|
241
|
-
</div>`},Zi=(e,t)=>{const{view:r,send:i}=t;return d`<div class="browser-bottom">
|
|
242
|
-
${F(e,t,"back")} ${F(e,t,"forward")}
|
|
243
|
-
<button
|
|
244
|
-
class="browser-nav browser-new-tab"
|
|
245
|
-
type="button"
|
|
246
|
-
aria-label=${e.newTab}
|
|
247
|
-
title=${e.newTab}
|
|
248
|
-
@click=${()=>i({kind:"new-tab"})}
|
|
249
|
-
>
|
|
250
|
-
${Ze()}
|
|
251
|
-
</button>
|
|
252
|
-
<button
|
|
253
|
-
class="browser-nav browser-tab-count"
|
|
254
|
-
type="button"
|
|
255
|
-
aria-label=${e.browserTabs}
|
|
256
|
-
title=${e.browserTabs}
|
|
257
|
-
aria-expanded=${t.switcher?"true":"false"}
|
|
258
|
-
@click=${()=>i({kind:"switcher",open:!t.switcher})}
|
|
259
|
-
>
|
|
260
|
-
<span class="browser-tab-count-box">${r.tabs.length}</span>
|
|
261
|
-
</button>
|
|
262
|
-
${F(e,t,"reload")}
|
|
263
|
-
</div>`},Qi=(e,t)=>{const{view:r,send:i}=t;return d`<div class="browser-switcher" role="dialog" aria-label=${e.browserTabs}>
|
|
264
|
-
${r.tabs.map(n=>d`<div class="browser-card" aria-current=${n.active?"true":c}>
|
|
265
|
-
<button class="browser-card-open" type="button" @click=${()=>i({kind:"activate",id:n.id})}>
|
|
266
|
-
<span class="browser-favicon">${Be()}</span>
|
|
267
|
-
<span class="browser-card-title">${n.title}</span>
|
|
268
|
-
<span class="browser-card-url">${n.url}</span>
|
|
269
|
-
</button>
|
|
270
|
-
${or(e,t,n.id)}
|
|
271
|
-
</div>`)}
|
|
272
|
-
</div>`},en=(e,t,r)=>d`<div class="browser-newtab">
|
|
273
|
-
<p class="browser-newtab-label">${t.newTabShortcuts}</p>
|
|
274
|
-
<div class="browser-shortcuts">
|
|
275
|
-
${r.shortcuts.map(i=>d`<a
|
|
276
|
-
class="browser-shortcut"
|
|
277
|
-
href=${e.hashFor(i.page)}
|
|
278
|
-
@click=${n=>{n.preventDefault(),r.send({kind:"visit",page:i.page})}}
|
|
279
|
-
>
|
|
280
|
-
<span class="browser-shortcut-icon" aria-hidden="true">${Array.from(i.title)[0]??""}</span>
|
|
281
|
-
<span class="browser-shortcut-title">${i.title}</span>
|
|
282
|
-
<span class="browser-shortcut-url">${i.url}</span>
|
|
283
|
-
</a>`)}
|
|
284
|
-
</div>
|
|
285
|
-
</div>`,tn=(e,t)=>d`<div class="browser-unreachable" role="alert">
|
|
286
|
-
<h3>${e.unreachableTitle}</h3>
|
|
287
|
-
<p>${e.unreachableBody}</p>
|
|
288
|
-
<code>${t}</code>
|
|
289
|
-
</div>`,rn=(e,t,r)=>{const{view:i,preview:n,viewport:o}=r,s=i.entry,a=o==="mobile";return d`<figure
|
|
290
|
-
class="frame browser"
|
|
291
|
-
data-kind="browser"
|
|
292
|
-
data-viewport=${o}
|
|
293
|
-
?data-loading=${r.loading}
|
|
294
|
-
?data-empty=${n!==void 0&&!r.hasContent}
|
|
295
|
-
style=${`--frame-width:${Ue[o]};--frame-min-height:${We[o]}`}
|
|
296
|
-
>
|
|
297
|
-
${a?c:Ki(t,r)} ${Ji(t,r,a)}
|
|
298
|
-
<div class="browser-progress" aria-hidden="true"></div>
|
|
299
|
-
<div class="viewport">
|
|
300
|
-
${a&&r.switcher?Qi(t,r):c}
|
|
301
|
-
${s?.kind==="unreachable"?tn(t,s.url):n===void 0?en(e,t,r):d`<slot name=${`preview:${n.id}`}></slot> ${r.hasContent?c:d`<div class="frame-placeholder">
|
|
302
|
-
<span class="dpk-label">light dom preview</span>
|
|
303
|
-
<code><div slot="preview" data-preview-id="${n.id}"></code>
|
|
304
|
-
</div>`}`}
|
|
305
|
-
</div>
|
|
306
|
-
${a?Zi(t,r):c}
|
|
307
|
-
</figure>`},nn=(e,t)=>{const r=t.mode.kind!=="off";return d`<button
|
|
308
|
-
class=${r?"dpk-btn dpk-btn--accent ui-comment-toggle":"dpk-btn ui-comment-toggle"}
|
|
309
|
-
type="button"
|
|
310
|
-
aria-pressed=${r?"true":"false"}
|
|
311
|
-
title=${e.uiCommentHint}
|
|
312
|
-
@click=${()=>t.send({kind:"toggle"})}
|
|
313
|
-
>
|
|
314
|
-
${Qe()} ${e.uiComment}
|
|
315
|
-
</button>`},on=(e,t)=>t.mode.kind==="off"?c:d`<p class="ui-comment-hint" role="status">${Qe()} ${e.uiCommentHint}</p>`,sn=(e,t)=>t.mode.kind==="off"?c:d`<div class="ui-layer" aria-hidden="true">
|
|
316
|
-
<div class="ui-catcher"></div>
|
|
317
|
-
<div class="ui-box ui-hover" hidden></div>
|
|
318
|
-
<div class="ui-box ui-picked" hidden></div>
|
|
319
|
-
${t.pins.map(r=>d`<span
|
|
320
|
-
class="ui-pin"
|
|
321
|
-
hidden
|
|
322
|
-
data-preview=${r.previewId}
|
|
323
|
-
data-selector=${r.selector}
|
|
324
|
-
title=${e.uiCommentPin(r.number,r.body)}
|
|
325
|
-
>${r.number}</span
|
|
326
|
-
>`)}
|
|
327
|
-
</div>`,an=e=>{const t=e.mode;if(t.kind!=="composing")return c;const r=_r(t.body,e.notes,{key:`ui:${t.target.previewId}/${t.target.selector}`,...e.targetLabel===void 0?{}:{label:e.targetLabel}});return d`${tt(`${t.target.previewId}/${t.target.selector}`,Rr(e.composer,r,i=>{i.kind==="input"?e.send({kind:"input",body:i.body}):i.kind==="comment"?e.submit(i.body):e.send({kind:"dismiss"})}))}`},sr=(e,t,r)=>{const{state:i,navigation:n}=e,o=j(i,n),s=o===void 0||o.kind==="story"?void 0:o,a=re(n)==="app",p=pr(i,[]);if(o?.kind==="story"){const{activity:A,story:Ee}=o;return d`
|
|
328
|
-
<div class="stage">
|
|
329
|
-
<section class="stage-story">
|
|
330
|
-
${ar(t,si(A,Ee))}
|
|
331
|
-
${Ee.description?d`<div class="story-description dpk-prose">${Te(Ie(Ee.description))}</div>`:c}
|
|
332
|
-
<p class="stage-empty">${t.storyWithoutSteps}</p>
|
|
333
|
-
</section>
|
|
334
|
-
${p}
|
|
335
|
-
</div>
|
|
336
|
-
`}if(!s)return d`
|
|
337
|
-
<div class="stage">
|
|
338
|
-
${a?d`<p class="stage-empty">${t.noScreens}</p>`:d`<p class="stage-empty">
|
|
339
|
-
${t.noStepBefore}<strong>Activity › UserStory › Step</strong>${t.noStepAfter}
|
|
340
|
-
</p>`}
|
|
341
|
-
${p}
|
|
342
|
-
</div>
|
|
343
|
-
`;const l=Ne(i,s,n),{layout:b,panes:h,shown:v}=l,[I]=b==="single"?h:[],_=r.uiComment,S=r.lift,N=S?.mode==="demo",K=r.browser,je=K!==null&&K.view.entry?.kind!=="page"?[]:v,[X]=je,qe=(X??v[0])?.viewport??"desktop",Fe=N&&K!==null&&qe!=="mobile";return d`
|
|
344
|
-
${S===null?c:d`<div class="stage-placeholder" style=${`height:${S.height}px`}></div>`}
|
|
345
|
-
<div
|
|
346
|
-
class=${S===null?"stage":N?"stage is-demo":"stage is-maximized"}
|
|
347
|
-
data-ui-comment=${_.mode.kind}
|
|
348
|
-
popover=${S===null?c:"manual"}
|
|
349
|
-
@wheel=${S===null?c:{handleEvent:r.onLiftedWheel,passive:!1}}
|
|
350
|
-
>
|
|
351
|
-
${N?Fe?c:d`<button class="demo-exit" type="button" title=${t.exitDemo} @click=${r.onToggleDemo}>
|
|
352
|
-
${pe()} ${t.exitDemo} <kbd>Esc</kbd>
|
|
353
|
-
</button>`:d`<div class="stage-bar">
|
|
354
|
-
${ar(t,At(i,s))}
|
|
355
|
-
<div class="stage-tools">
|
|
356
|
-
${I?.kind==="screen"&&I.tabs.length>0?dr(e,l,I):c}
|
|
357
|
-
${v.length>0?nn(t,_):c}
|
|
358
|
-
${v.length===0?c:a?ln(t,r.onToggleDemo):cn(t,S!==null,r.onToggleMaximize)}
|
|
359
|
-
</div>
|
|
360
|
-
</div>`}
|
|
361
|
-
${s.kind==="step"&&s.step.situation!==void 0?dn(t,s.step.situation):c}
|
|
362
|
-
${N?c:on(t,_)}
|
|
363
|
-
<div
|
|
364
|
-
class="canvas"
|
|
365
|
-
data-layout=${b}
|
|
366
|
-
@click=${{handleEvent:r.canvasEvents.click,capture:!0}}
|
|
367
|
-
@pointermove=${{handleEvent:r.canvasEvents.pointermove,capture:!0}}
|
|
368
|
-
@pointerleave=${r.canvasEvents.pointerleave}
|
|
369
|
-
@wheel=${{handleEvent:r.canvasEvents.wheel,passive:!1}}
|
|
370
|
-
@scroll=${{handleEvent:r.canvasEvents.scroll,capture:!0}}
|
|
371
|
-
>
|
|
372
|
-
${K!==null?rn(e,t,{...K,...X===void 0?{}:{preview:X},...Fe?{onExitDemo:r.onToggleDemo}:{},hasContent:X===void 0||r.hasPreviewContent(X.id),viewport:qe}):b==="side-by-side"?d`<div class="panes">
|
|
373
|
-
${h.map(A=>d`<div class="pane" data-viewport=${A.preview.viewport} data-pane=${A.kind}>
|
|
374
|
-
${pn(e,l,A)}
|
|
375
|
-
${Ge(e,t,A.preview,r.hasPreviewContent(A.preview.id))}
|
|
376
|
-
</div>`)}
|
|
377
|
-
</div>`:v.map(A=>Ge(e,t,A,r.hasPreviewContent(A.id)))}
|
|
378
|
-
${v.length===0?d`<p class="dpk-label">${t.noPreviewMetadata}</p>`:c}
|
|
379
|
-
${sn(t,_)}
|
|
380
|
-
</div>
|
|
381
|
-
${an(_)}
|
|
382
|
-
${pr(i,je.map(A=>A.id))}
|
|
383
|
-
</div>
|
|
384
|
-
`},ar=(e,t)=>d`<div class="page-head">
|
|
385
|
-
${t.actor===void 0?c:d`<span class="page-actor" role="note" aria-label=${e.pageActor(t.actor)}>
|
|
386
|
-
<svg viewBox="0 0 16 16" aria-hidden="true">
|
|
387
|
-
<circle cx="8" cy="5.2" r="2.7" />
|
|
388
|
-
<path d="M2.8 14c.5-3 2.6-4.6 5.2-4.6s4.7 1.6 5.2 4.6Z" />
|
|
389
|
-
</svg>
|
|
390
|
-
${t.actor}
|
|
391
|
-
</span>`}
|
|
392
|
-
<h2 class="page-title">${t.title}</h2>
|
|
393
|
-
</div>`,dn=(e,t)=>d`<aside class="situation">
|
|
394
|
-
<span class="situation-label">${e.situation}</span>
|
|
395
|
-
<p class="situation-text">${t}</p>
|
|
396
|
-
</aside>`,dr=(e,t,r)=>d`<div class="tabs" role="tablist">
|
|
397
|
-
${r.tabs.map(i=>{const n=i.id===r.preview.id;return d`<a
|
|
398
|
-
class="tab"
|
|
399
|
-
role="tab"
|
|
400
|
-
data-current=${String(n)}
|
|
401
|
-
aria-selected=${n?"true":"false"}
|
|
402
|
-
href=${e.hashFor({preview:Qr(t,i.id)})}
|
|
403
|
-
>${i.label??i.viewport}</a
|
|
404
|
-
>`})}
|
|
405
|
-
</div>`,pn=(e,t,r)=>r.kind==="material"?r.preview.label===void 0?c:d`<span class="pane-label">${r.preview.label}</span>`:d`<div class="pane-head">
|
|
406
|
-
<span class="pane-label">${r.screen.screen.title}</span>
|
|
407
|
-
${r.tabs.length>0?dr(e,t,r):c}
|
|
408
|
-
</div>`,ln=(e,t)=>d`<button class="dpk-btn stage-demo" type="button" title=${e.demoHint} @click=${t}>
|
|
409
|
-
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M5 3.5v9l7.5-4.5Z" fill="currentColor" /></svg>
|
|
410
|
-
${e.demo}
|
|
411
|
-
</button>`,cn=(e,t,r)=>d`<button
|
|
412
|
-
class="dpk-btn stage-maximize"
|
|
413
|
-
type="button"
|
|
414
|
-
aria-pressed=${t?"true":"false"}
|
|
415
|
-
title=${e.maximizeHint}
|
|
416
|
-
@click=${r}
|
|
417
|
-
>
|
|
418
|
-
${t?d`${Er()} ${e.restore}`:d`${Sr()} ${e.maximize}`}
|
|
419
|
-
</button>`,Ge=(e,t,r,i)=>d`
|
|
420
|
-
<figure
|
|
421
|
-
class="frame"
|
|
422
|
-
data-kind=${r.kind}
|
|
423
|
-
data-viewport=${r.viewport}
|
|
424
|
-
?data-empty=${!i}
|
|
425
|
-
style=${`--frame-width:${Ue[r.viewport]};--frame-min-height:${We[r.viewport]}`}
|
|
426
|
-
>
|
|
427
|
-
${r.kind==="browser"?d`<div class="chrome">
|
|
428
|
-
<span class="dots"><i></i><i></i><i></i></span>
|
|
429
|
-
<span class="url">${be(e.state,r)}</span>
|
|
430
|
-
</div>`:r.kind==="mail"?un(ni(t,r)):c}
|
|
431
|
-
<div class="viewport">
|
|
432
|
-
${r.kind==="native"?hn():c}
|
|
433
|
-
<slot name=${`preview:${r.id}`}></slot>
|
|
434
|
-
${i?c:d`<div class="frame-placeholder">
|
|
435
|
-
<span class="dpk-label">light dom preview</span>
|
|
436
|
-
<code><div slot="preview" data-preview-id="${r.id}"></code>
|
|
437
|
-
</div>`}
|
|
438
|
-
</div>
|
|
439
|
-
</figure>
|
|
440
|
-
`,un=e=>d`<header class="mail-head">
|
|
441
|
-
${e.subject===void 0?c:d`<h3 class="mail-subject">${e.subject}</h3>`}
|
|
442
|
-
<div class="mail-envelope">
|
|
443
|
-
${e.initial===void 0?c:d`<span class="mail-avatar" aria-hidden="true">${e.initial}</span>`}
|
|
444
|
-
<dl class="mail-meta">
|
|
445
|
-
${e.rows.map(t=>d`<div class="mail-row">
|
|
446
|
-
<dt>${t.label}</dt>
|
|
447
|
-
<dd>${t.value}</dd>
|
|
448
|
-
</div>`)}
|
|
449
|
-
</dl>
|
|
450
|
-
</div>
|
|
451
|
-
</header>`,hn=()=>d`<div class="status-bar">
|
|
452
|
-
<span class="status-time">9:41</span>
|
|
453
|
-
<span class="punch-hole" aria-hidden="true"></span>
|
|
454
|
-
<svg class="status-wifi" viewBox="0 0 16 12" aria-hidden="true">
|
|
455
|
-
<path d="M8 9.2a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z" />
|
|
456
|
-
<path
|
|
457
|
-
d="M4.7 7.4a4.8 4.8 0 0 1 6.6 0"
|
|
458
|
-
fill="none"
|
|
459
|
-
stroke="currentColor"
|
|
460
|
-
stroke-width="1.5"
|
|
461
|
-
stroke-linecap="round"
|
|
462
|
-
/>
|
|
463
|
-
<path
|
|
464
|
-
d="M2.1 4.7a8.4 8.4 0 0 1 11.8 0"
|
|
465
|
-
fill="none"
|
|
466
|
-
stroke="currentColor"
|
|
467
|
-
stroke-width="1.5"
|
|
468
|
-
stroke-linecap="round"
|
|
469
|
-
/>
|
|
470
|
-
</svg>
|
|
471
|
-
</div>`,pr=(e,t)=>{const i=[...z(e).flatMap(n=>n.screen.previews),...Y(e).flatMap(n=>H(n.step))].filter(n=>!t.includes(n.id));return i.length===0?d`${c}`:d`<div class="parked" aria-hidden="true">
|
|
472
|
-
${i.map(n=>d`<slot name=${`preview:${n.id}`}></slot>`)}
|
|
473
|
-
</div>`},vn=Tr`
|
|
474
|
-
:host {
|
|
475
|
-
--dpk-prototype-accent: var(--dpk-blue);
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
/* ---------------------------------------------------------------- sidebar */
|
|
479
|
-
|
|
480
|
-
.nav {
|
|
481
|
-
display: grid;
|
|
482
|
-
gap: 14px;
|
|
483
|
-
align-content: start;
|
|
484
|
-
min-width: 188px;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
.field {
|
|
488
|
-
display: grid;
|
|
489
|
-
gap: 5px;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
/* Scenario or app: a segmented control at the top of the sidebar. */
|
|
493
|
-
.view-switch {
|
|
494
|
-
display: flex;
|
|
495
|
-
gap: 3px;
|
|
496
|
-
padding: 3px;
|
|
497
|
-
border: 1px solid var(--dpk-rule);
|
|
498
|
-
border-radius: var(--dpk-radius);
|
|
499
|
-
background: var(--dpk-paper-inset);
|
|
500
|
-
box-shadow: inset 0 1px 2px var(--dpk-shade-1);
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
.view-option {
|
|
504
|
-
flex: 1 1 0;
|
|
505
|
-
padding: 6px 9px;
|
|
506
|
-
border: 1px solid transparent;
|
|
507
|
-
border-radius: var(--dpk-radius-sm);
|
|
508
|
-
color: var(--dpk-ink-soft);
|
|
509
|
-
font-size: 12px;
|
|
510
|
-
font-weight: 500;
|
|
511
|
-
text-align: center;
|
|
512
|
-
text-decoration: none;
|
|
513
|
-
transition:
|
|
514
|
-
background 140ms var(--dpk-ease),
|
|
515
|
-
color 140ms var(--dpk-ease),
|
|
516
|
-
box-shadow 140ms var(--dpk-ease);
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
.view-option:hover {
|
|
520
|
-
color: var(--dpk-ink);
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
.view-option[aria-current='page'] {
|
|
524
|
-
background: var(--dpk-paper-raised);
|
|
525
|
-
color: var(--dpk-ink);
|
|
526
|
-
font-weight: 600;
|
|
527
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
.view-option:focus-visible {
|
|
531
|
-
outline: none;
|
|
532
|
-
box-shadow: var(--dpk-focus);
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
.app-hint {
|
|
536
|
-
margin: -6px 0 0;
|
|
537
|
-
font-size: 11.5px;
|
|
538
|
-
line-height: 1.55;
|
|
539
|
-
color: var(--dpk-ink-faint);
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
.app-group {
|
|
543
|
-
display: grid;
|
|
544
|
-
gap: 4px;
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
.app-group-heading {
|
|
548
|
-
margin: 0;
|
|
549
|
-
padding-left: 9px;
|
|
550
|
-
font-size: 11px;
|
|
551
|
-
font-weight: 600;
|
|
552
|
-
color: var(--dpk-ink-soft);
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
.app-description {
|
|
556
|
-
margin: 2px 0 0;
|
|
557
|
-
font-size: 11.5px;
|
|
558
|
-
line-height: 1.5;
|
|
559
|
-
color: var(--dpk-ink-faint);
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
.step-screen {
|
|
563
|
-
color: var(--dpk-ink);
|
|
564
|
-
font-size: 12.5px;
|
|
565
|
-
font-weight: 550;
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
.screen-description {
|
|
569
|
-
font-size: 12.5px;
|
|
570
|
-
line-height: 1.6;
|
|
571
|
-
color: var(--dpk-ink);
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
.app-tree {
|
|
575
|
-
display: grid;
|
|
576
|
-
gap: 4px;
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
.app-origin {
|
|
580
|
-
margin: 0;
|
|
581
|
-
padding-left: 9px;
|
|
582
|
-
font-family: var(--dpk-mono);
|
|
583
|
-
font-size: 10.5px;
|
|
584
|
-
font-weight: 500;
|
|
585
|
-
color: var(--dpk-ink-faint);
|
|
586
|
-
overflow-wrap: anywhere;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
.tree {
|
|
590
|
-
list-style: none;
|
|
591
|
-
margin: 0;
|
|
592
|
-
padding: 0;
|
|
593
|
-
display: grid;
|
|
594
|
-
gap: 2px;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
/* A path below another one is indented under it, with a guide line. */
|
|
598
|
-
.tree .tree {
|
|
599
|
-
margin-left: 14px;
|
|
600
|
-
padding-left: 6px;
|
|
601
|
-
border-left: 1px solid var(--dpk-rule);
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
.tree-node {
|
|
605
|
-
display: grid;
|
|
606
|
-
gap: 2px;
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
.tree-row {
|
|
610
|
-
position: relative;
|
|
611
|
-
border-radius: var(--dpk-radius-sm);
|
|
612
|
-
transition: background 140ms ease;
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
.tree-row:has(a):hover {
|
|
616
|
-
background: var(--dpk-paper-inset);
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
.tree-row[data-current='true'] {
|
|
620
|
-
background: linear-gradient(
|
|
621
|
-
180deg,
|
|
622
|
-
color-mix(in srgb, var(--dpk-prototype-accent) 10%, var(--dpk-paper-raised)),
|
|
623
|
-
color-mix(in srgb, var(--dpk-prototype-accent) 5%, var(--dpk-paper-raised))
|
|
624
|
-
);
|
|
625
|
-
box-shadow:
|
|
626
|
-
inset 0 0 0 1px color-mix(in srgb, var(--dpk-prototype-accent) 22%, transparent),
|
|
627
|
-
var(--dpk-shadow-xs);
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
.tree-link {
|
|
631
|
-
display: flex;
|
|
632
|
-
align-items: baseline;
|
|
633
|
-
flex-wrap: wrap;
|
|
634
|
-
gap: 2px 8px;
|
|
635
|
-
padding: 6px 4px 6px 9px;
|
|
636
|
-
text-decoration: none;
|
|
637
|
-
color: var(--dpk-ink-soft);
|
|
638
|
-
font-size: 12.5px;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
.tree-path {
|
|
642
|
-
font-family: var(--dpk-mono);
|
|
643
|
-
font-size: 11.5px;
|
|
644
|
-
color: var(--dpk-ink);
|
|
645
|
-
overflow-wrap: anywhere;
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
span.tree-link .tree-path {
|
|
649
|
-
color: var(--dpk-ink-faint);
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
.tree-title {
|
|
653
|
-
min-width: 0;
|
|
654
|
-
color: var(--dpk-ink-soft);
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
.tree-row[data-current='true'] .tree-path,
|
|
658
|
-
.tree-row[data-current='true'] .tree-title {
|
|
659
|
-
color: var(--dpk-ink);
|
|
660
|
-
font-weight: 550;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
.tree-link .step-note {
|
|
664
|
-
align-self: center;
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
.tree-link:focus-visible {
|
|
668
|
-
outline: none;
|
|
669
|
-
border-radius: var(--dpk-radius-sm);
|
|
670
|
-
box-shadow: var(--dpk-focus);
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
.steps.app-screens {
|
|
674
|
-
max-height: none;
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
.steps-head {
|
|
678
|
-
display: flex;
|
|
679
|
-
align-items: baseline;
|
|
680
|
-
justify-content: space-between;
|
|
681
|
-
padding-bottom: 5px;
|
|
682
|
-
border-bottom: 1px solid var(--dpk-rule);
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
.steps {
|
|
686
|
-
list-style: none;
|
|
687
|
-
margin: 0;
|
|
688
|
-
padding: 0;
|
|
689
|
-
display: grid;
|
|
690
|
-
gap: 2px;
|
|
691
|
-
max-height: 38vh;
|
|
692
|
-
overflow: auto;
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
.step-row {
|
|
696
|
-
position: relative;
|
|
697
|
-
display: flex;
|
|
698
|
-
align-items: center;
|
|
699
|
-
gap: 4px;
|
|
700
|
-
padding: 0 4px 0 9px;
|
|
701
|
-
border-radius: var(--dpk-radius-sm);
|
|
702
|
-
transition:
|
|
703
|
-
background 140ms ease,
|
|
704
|
-
box-shadow 140ms ease;
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
.step-row:hover {
|
|
708
|
-
background: var(--dpk-paper-inset);
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
.step-row[data-current='true'] {
|
|
712
|
-
background: linear-gradient(
|
|
713
|
-
180deg,
|
|
714
|
-
color-mix(in srgb, var(--dpk-prototype-accent) 10%, var(--dpk-paper-raised)),
|
|
715
|
-
color-mix(in srgb, var(--dpk-prototype-accent) 5%, var(--dpk-paper-raised))
|
|
716
|
-
);
|
|
717
|
-
box-shadow:
|
|
718
|
-
inset 0 0 0 1px color-mix(in srgb, var(--dpk-prototype-accent) 22%, transparent),
|
|
719
|
-
var(--dpk-shadow-xs);
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
.step-row[data-current='true']::before {
|
|
723
|
-
content: '';
|
|
724
|
-
position: absolute;
|
|
725
|
-
left: 0;
|
|
726
|
-
top: 8px;
|
|
727
|
-
bottom: 8px;
|
|
728
|
-
width: 3px;
|
|
729
|
-
border-radius: var(--dpk-radius-xs);
|
|
730
|
-
background: linear-gradient(180deg, var(--dpk-blue), var(--dpk-blue-strong));
|
|
731
|
-
box-shadow: 0 0 8px color-mix(in srgb, var(--dpk-prototype-accent) 45%, transparent);
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
.step-link {
|
|
735
|
-
display: flex;
|
|
736
|
-
flex: 1;
|
|
737
|
-
min-width: 0;
|
|
738
|
-
align-items: center;
|
|
739
|
-
gap: 7px;
|
|
740
|
-
padding: 7px 0;
|
|
741
|
-
text-decoration: none;
|
|
742
|
-
color: var(--dpk-ink-soft);
|
|
743
|
-
font-size: 12.5px;
|
|
744
|
-
font-weight: 460;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
.step-row[data-current='true'] .step-link {
|
|
748
|
-
color: var(--dpk-ink);
|
|
749
|
-
font-weight: 550;
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
.step-index {
|
|
753
|
-
flex: 0 0 auto;
|
|
754
|
-
min-width: 17px;
|
|
755
|
-
padding: 1px 4px;
|
|
756
|
-
border-radius: var(--dpk-radius-xs);
|
|
757
|
-
background: var(--dpk-paper-inset);
|
|
758
|
-
font-family: var(--dpk-mono);
|
|
759
|
-
font-size: 9.5px;
|
|
760
|
-
font-variant-numeric: tabular-nums;
|
|
761
|
-
text-align: center;
|
|
762
|
-
color: var(--dpk-ink-faint);
|
|
763
|
-
transition:
|
|
764
|
-
background 140ms ease,
|
|
765
|
-
color 140ms ease;
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
.step-row[data-current='true'] .step-index {
|
|
769
|
-
background: linear-gradient(180deg, var(--dpk-blue), var(--dpk-blue-strong));
|
|
770
|
-
color: #fff;
|
|
771
|
-
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
.step-name {
|
|
775
|
-
min-width: 0;
|
|
776
|
-
overflow: hidden;
|
|
777
|
-
white-space: nowrap;
|
|
778
|
-
text-overflow: ellipsis;
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
.step-note {
|
|
782
|
-
margin-left: auto;
|
|
783
|
-
min-width: 16px;
|
|
784
|
-
padding: 1px 5px;
|
|
785
|
-
border-radius: 999px;
|
|
786
|
-
background: var(--dpk-accent);
|
|
787
|
-
color: var(--dpk-accent-ink);
|
|
788
|
-
font-family: var(--dpk-mono);
|
|
789
|
-
font-size: 9px;
|
|
790
|
-
font-variant-numeric: tabular-nums;
|
|
791
|
-
text-align: center;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
.row-tools {
|
|
795
|
-
display: flex;
|
|
796
|
-
gap: 0;
|
|
797
|
-
opacity: 0;
|
|
798
|
-
transition: opacity 120ms ease;
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
.step-row:hover .row-tools,
|
|
802
|
-
.step-row[data-current='true'] .row-tools {
|
|
803
|
-
opacity: 1;
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
.detail {
|
|
807
|
-
display: grid;
|
|
808
|
-
gap: 12px;
|
|
809
|
-
padding: 12px 12px 14px;
|
|
810
|
-
border: 1px solid var(--dpk-rule);
|
|
811
|
-
border-radius: var(--dpk-radius);
|
|
812
|
-
background: var(--dpk-paper-raised);
|
|
813
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-sm);
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
.detail-row {
|
|
817
|
-
display: grid;
|
|
818
|
-
gap: 4px;
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
.detail-value {
|
|
822
|
-
font-size: 12.5px;
|
|
823
|
-
color: var(--dpk-ink-soft);
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
.nav-empty {
|
|
827
|
-
font-size: 12px;
|
|
828
|
-
line-height: 1.6;
|
|
829
|
-
color: var(--dpk-ink-faint);
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
/* ------------------------------------------------------------------ stage */
|
|
833
|
-
|
|
834
|
-
.stage {
|
|
835
|
-
display: grid;
|
|
836
|
-
/* One column no wider than the main area: a wide row of panes scrolls inside the canvas. */
|
|
837
|
-
grid-template-columns: minmax(0, 1fr);
|
|
838
|
-
gap: 14px;
|
|
839
|
-
width: 100%;
|
|
840
|
-
min-width: 0;
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
.stage-bar {
|
|
844
|
-
display: flex;
|
|
845
|
-
align-items: center;
|
|
846
|
-
justify-content: space-between;
|
|
847
|
-
gap: 10px 16px;
|
|
848
|
-
min-width: 0;
|
|
849
|
-
flex-wrap: wrap;
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
/* ------------------------------------------------------------- page head */
|
|
853
|
-
|
|
854
|
-
.page-head {
|
|
855
|
-
display: flex;
|
|
856
|
-
align-items: center;
|
|
857
|
-
gap: 12px;
|
|
858
|
-
min-width: 0;
|
|
859
|
-
animation: dpk-page-head-in 260ms var(--dpk-ease) backwards;
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
@keyframes dpk-page-head-in {
|
|
863
|
-
from {
|
|
864
|
-
opacity: 0;
|
|
865
|
-
transform: translateY(4px);
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
.page-actor {
|
|
870
|
-
display: inline-flex;
|
|
871
|
-
flex: none;
|
|
872
|
-
align-items: center;
|
|
873
|
-
gap: 6px;
|
|
874
|
-
height: 26px;
|
|
875
|
-
padding: 0 11px 0 8px;
|
|
876
|
-
border-radius: 999px;
|
|
877
|
-
background: linear-gradient(
|
|
878
|
-
180deg,
|
|
879
|
-
color-mix(in srgb, var(--dpk-blue) 16%, var(--dpk-paper-raised)),
|
|
880
|
-
color-mix(in srgb, var(--dpk-blue) 9%, var(--dpk-paper-raised))
|
|
881
|
-
);
|
|
882
|
-
box-shadow:
|
|
883
|
-
var(--dpk-bevel),
|
|
884
|
-
inset 0 0 0 1px color-mix(in srgb, var(--dpk-blue) 32%, transparent),
|
|
885
|
-
var(--dpk-shadow-xs);
|
|
886
|
-
color: var(--dpk-blue);
|
|
887
|
-
font-size: 12px;
|
|
888
|
-
font-weight: 650;
|
|
889
|
-
letter-spacing: 0.01em;
|
|
890
|
-
white-space: nowrap;
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
.page-actor svg {
|
|
894
|
-
width: 13px;
|
|
895
|
-
height: 13px;
|
|
896
|
-
fill: currentColor;
|
|
897
|
-
opacity: 0.9;
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
.page-title {
|
|
901
|
-
margin: 0;
|
|
902
|
-
min-width: 0;
|
|
903
|
-
overflow: hidden;
|
|
904
|
-
font-size: 19px;
|
|
905
|
-
font-weight: 700;
|
|
906
|
-
line-height: 1.3;
|
|
907
|
-
letter-spacing: -0.02em;
|
|
908
|
-
color: var(--dpk-ink);
|
|
909
|
-
text-overflow: ellipsis;
|
|
910
|
-
white-space: nowrap;
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
.stage-tools {
|
|
914
|
-
display: flex;
|
|
915
|
-
align-items: center;
|
|
916
|
-
gap: 8px;
|
|
917
|
-
margin-left: auto;
|
|
918
|
-
}
|
|
919
|
-
|
|
920
|
-
.stage-maximize svg,
|
|
921
|
-
.stage-demo svg {
|
|
922
|
-
width: 13px;
|
|
923
|
-
height: 13px;
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
.stage-demo {
|
|
927
|
-
display: inline-flex;
|
|
928
|
-
align-items: center;
|
|
929
|
-
gap: 6px;
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
.tabs {
|
|
933
|
-
display: inline-flex;
|
|
934
|
-
gap: 2px;
|
|
935
|
-
padding: 3px;
|
|
936
|
-
border: 1px solid var(--dpk-rule);
|
|
937
|
-
border-radius: 999px;
|
|
938
|
-
background: var(--dpk-paper-sunken);
|
|
939
|
-
box-shadow: inset 0 1px 2px rgba(20, 28, 44, 0.04);
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
.tab {
|
|
943
|
-
padding: 4px 14px;
|
|
944
|
-
border-radius: 999px;
|
|
945
|
-
font-size: 12px;
|
|
946
|
-
font-weight: 500;
|
|
947
|
-
text-decoration: none;
|
|
948
|
-
color: var(--dpk-ink-soft);
|
|
949
|
-
white-space: nowrap;
|
|
950
|
-
transition:
|
|
951
|
-
background 120ms ease,
|
|
952
|
-
color 120ms ease;
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
.tab:hover {
|
|
956
|
-
color: var(--dpk-ink);
|
|
957
|
-
background: var(--dpk-paper-raised);
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
.tab[data-current='true'] {
|
|
961
|
-
background: var(--dpk-paper-raised);
|
|
962
|
-
color: var(--dpk-ink);
|
|
963
|
-
font-weight: 600;
|
|
964
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
.stage-empty {
|
|
968
|
-
max-width: 62ch;
|
|
969
|
-
padding: 16px 18px;
|
|
970
|
-
border: 1px dashed var(--dpk-rule-strong);
|
|
971
|
-
border-radius: var(--dpk-radius-lg);
|
|
972
|
-
background: var(--dpk-paper-sunken);
|
|
973
|
-
font-size: 13px;
|
|
974
|
-
line-height: 1.7;
|
|
975
|
-
color: var(--dpk-ink-soft);
|
|
976
|
-
}
|
|
977
|
-
|
|
978
|
-
/* A story that has no steps yet: its heading, what it is for, and why no frame. */
|
|
979
|
-
.stage-story {
|
|
980
|
-
display: grid;
|
|
981
|
-
gap: 12px;
|
|
982
|
-
justify-items: start;
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
.story-description {
|
|
986
|
-
max-width: 62ch;
|
|
987
|
-
margin: 0;
|
|
988
|
-
font-size: 14px;
|
|
989
|
-
line-height: 1.7;
|
|
990
|
-
color: var(--dpk-ink);
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
/* -------------------------------------------------------------- situation */
|
|
994
|
-
|
|
995
|
-
/*
|
|
996
|
-
* What is going on around the previews: a stage direction, read before them.
|
|
997
|
-
* The band spans the stage at any width (a maximized stage too); only the
|
|
998
|
-
* text keeps a readable line length.
|
|
999
|
-
*/
|
|
1000
|
-
.situation {
|
|
1001
|
-
display: flex;
|
|
1002
|
-
align-items: baseline;
|
|
1003
|
-
gap: 10px;
|
|
1004
|
-
margin: -4px 0 -2px;
|
|
1005
|
-
padding: 8px 14px 8px 10px;
|
|
1006
|
-
border: 1px solid color-mix(in srgb, var(--dpk-prototype-accent) 16%, var(--dpk-rule));
|
|
1007
|
-
border-radius: var(--dpk-radius);
|
|
1008
|
-
background: color-mix(in srgb, var(--dpk-prototype-accent) 5%, var(--dpk-paper-raised));
|
|
1009
|
-
box-shadow: var(--dpk-bevel);
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
.situation-label {
|
|
1013
|
-
flex: none;
|
|
1014
|
-
padding: 2px 8px;
|
|
1015
|
-
border-radius: 999px;
|
|
1016
|
-
background: color-mix(in srgb, var(--dpk-prototype-accent) 13%, transparent);
|
|
1017
|
-
font-size: 10.5px;
|
|
1018
|
-
font-weight: 650;
|
|
1019
|
-
letter-spacing: 0.06em;
|
|
1020
|
-
color: var(--dpk-prototype-accent);
|
|
1021
|
-
}
|
|
1022
|
-
|
|
1023
|
-
.situation-text {
|
|
1024
|
-
max-width: 90ch;
|
|
1025
|
-
margin: 0;
|
|
1026
|
-
min-width: 0;
|
|
1027
|
-
font-size: 13px;
|
|
1028
|
-
line-height: 1.65;
|
|
1029
|
-
color: var(--dpk-ink);
|
|
1030
|
-
white-space: pre-line;
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1033
|
-
/* ----------------------------------------------------------------- canvas */
|
|
1034
|
-
|
|
1035
|
-
/*
|
|
1036
|
-
* The work surface the frame sits on: a quiet dot lattice that reads as a
|
|
1037
|
-
* canvas rather than empty page background, giving the frame somewhere to
|
|
1038
|
-
* cast its shadow.
|
|
1039
|
-
*/
|
|
1040
|
-
.canvas {
|
|
1041
|
-
display: flex;
|
|
1042
|
-
justify-content: center;
|
|
1043
|
-
padding: 30px;
|
|
1044
|
-
border: 1px solid var(--dpk-rule);
|
|
1045
|
-
border-radius: var(--dpk-radius-xl);
|
|
1046
|
-
background: var(--dpk-dots), var(--dpk-paper-sunken);
|
|
1047
|
-
box-shadow: inset 0 1px 3px var(--dpk-shade-1);
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
/* ---------------------------------------------------------- comment on UI */
|
|
1051
|
-
|
|
1052
|
-
.ui-comment-toggle svg,
|
|
1053
|
-
.ui-comment-hint svg {
|
|
1054
|
-
width: 14px;
|
|
1055
|
-
height: 14px;
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
.ui-comment-toggle {
|
|
1059
|
-
display: inline-flex;
|
|
1060
|
-
align-items: center;
|
|
1061
|
-
gap: 6px;
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
.ui-comment-hint {
|
|
1065
|
-
display: flex;
|
|
1066
|
-
align-items: center;
|
|
1067
|
-
gap: 8px;
|
|
1068
|
-
margin: -4px 0 -2px;
|
|
1069
|
-
padding: 7px 12px;
|
|
1070
|
-
border-radius: var(--dpk-radius);
|
|
1071
|
-
background: var(--dpk-accent-soft);
|
|
1072
|
-
color: var(--dpk-accent-strong, var(--dpk-accent));
|
|
1073
|
-
font-size: 12.5px;
|
|
1074
|
-
font-weight: 550;
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
.canvas {
|
|
1078
|
-
position: relative;
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
.stage:not([data-ui-comment='off']) .canvas ::slotted(*) {
|
|
1082
|
-
cursor: crosshair;
|
|
1083
|
-
}
|
|
1084
|
-
|
|
1085
|
-
/* Sized to the canvas's scroll area by the element; the boxes and pins show through. */
|
|
1086
|
-
.ui-catcher {
|
|
1087
|
-
position: absolute;
|
|
1088
|
-
top: 0;
|
|
1089
|
-
left: 0;
|
|
1090
|
-
z-index: 4;
|
|
1091
|
-
cursor: crosshair;
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
/* Positioned against the canvas by the element, which measures the author's markup. */
|
|
1095
|
-
.ui-layer {
|
|
1096
|
-
display: contents;
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
.ui-box {
|
|
1100
|
-
position: absolute;
|
|
1101
|
-
z-index: 2;
|
|
1102
|
-
box-sizing: border-box;
|
|
1103
|
-
border-radius: 4px;
|
|
1104
|
-
pointer-events: none;
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
.ui-hover {
|
|
1108
|
-
outline: 2px solid var(--dpk-accent);
|
|
1109
|
-
outline-offset: 1px;
|
|
1110
|
-
background: color-mix(in srgb, var(--dpk-accent) 8%, transparent);
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
.ui-picked {
|
|
1114
|
-
outline: 2px solid var(--dpk-accent);
|
|
1115
|
-
outline-offset: 2px;
|
|
1116
|
-
background: color-mix(in srgb, var(--dpk-accent) 14%, transparent);
|
|
1117
|
-
box-shadow: 0 0 0 6px color-mix(in srgb, var(--dpk-accent) 18%, transparent);
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
.ui-pin {
|
|
1121
|
-
position: absolute;
|
|
1122
|
-
z-index: 3;
|
|
1123
|
-
display: grid;
|
|
1124
|
-
place-items: center;
|
|
1125
|
-
min-width: 20px;
|
|
1126
|
-
height: 20px;
|
|
1127
|
-
padding: 0 5px;
|
|
1128
|
-
box-sizing: border-box;
|
|
1129
|
-
transform: translate(-50%, -50%);
|
|
1130
|
-
border: 2px solid var(--dpk-paper-raised);
|
|
1131
|
-
border-radius: 999px 999px 999px 2px;
|
|
1132
|
-
background: var(--dpk-accent);
|
|
1133
|
-
color: var(--dpk-accent-ink);
|
|
1134
|
-
box-shadow: var(--dpk-shadow-sm);
|
|
1135
|
-
font-family: var(--dpk-mono);
|
|
1136
|
-
font-size: 10px;
|
|
1137
|
-
font-weight: 700;
|
|
1138
|
-
pointer-events: none;
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
.ui-box[hidden],
|
|
1142
|
-
.ui-pin[hidden] {
|
|
1143
|
-
display: none;
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
/*
|
|
1147
|
-
* Side by side: what the user sees together, in one row. A fixed viewport
|
|
1148
|
-
* keeps its width as long as the row allows it, a fluid one takes the rest;
|
|
1149
|
-
* a row wider than the canvas scrolls sideways instead of squeezing a device.
|
|
1150
|
-
*/
|
|
1151
|
-
.panes {
|
|
1152
|
-
display: flex;
|
|
1153
|
-
align-items: flex-start;
|
|
1154
|
-
justify-content: safe center;
|
|
1155
|
-
gap: 28px;
|
|
1156
|
-
width: 100%;
|
|
1157
|
-
min-width: 0;
|
|
1158
|
-
overflow-x: auto;
|
|
1159
|
-
padding-bottom: 4px;
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
/* A device shrinks at most to a width its layout still reads at, then the row scrolls. */
|
|
1163
|
-
.pane {
|
|
1164
|
-
display: grid;
|
|
1165
|
-
gap: 8px;
|
|
1166
|
-
flex: 0 1 var(--pane-width);
|
|
1167
|
-
min-width: min(var(--pane-width), 720px);
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
.pane[data-viewport='mobile'] {
|
|
1171
|
-
--pane-width: 390px;
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
.pane[data-viewport='tablet'] {
|
|
1175
|
-
--pane-width: 834px;
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
.pane[data-viewport='desktop'] {
|
|
1179
|
-
--pane-width: 1180px;
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
|
-
.pane[data-viewport='fluid'] {
|
|
1183
|
-
flex: 1 1 0;
|
|
1184
|
-
min-width: 240px;
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
.pane .frame {
|
|
1188
|
-
width: 100%;
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
.pane-head {
|
|
1192
|
-
display: flex;
|
|
1193
|
-
flex-wrap: wrap;
|
|
1194
|
-
align-items: center;
|
|
1195
|
-
justify-content: space-between;
|
|
1196
|
-
gap: 8px;
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
.pane-head .tabs {
|
|
1200
|
-
padding: 2px;
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
.pane-head .tab {
|
|
1204
|
-
padding: 3px 11px;
|
|
1205
|
-
font-size: 11.5px;
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
.pane-label {
|
|
1209
|
-
justify-self: start;
|
|
1210
|
-
padding: 2px 9px;
|
|
1211
|
-
border-radius: 999px;
|
|
1212
|
-
background: var(--dpk-paper-raised);
|
|
1213
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
|
|
1214
|
-
font-size: 11.5px;
|
|
1215
|
-
font-weight: 600;
|
|
1216
|
-
color: var(--dpk-ink-soft);
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
/*
|
|
1220
|
-
* Maximized: the stage covers the tab — the page head, the tabs and the canvas
|
|
1221
|
-
* alone. It is also a manual popover in the top layer, so the UA popover box
|
|
1222
|
-
* (fit-content, margin, border, padding, colors) is reset here. The canvas
|
|
1223
|
-
* scrolls instead of the page, and a browser preview is at least as tall as
|
|
1224
|
-
* the tab allows; a phone keeps its device shape. Whatever sits above the
|
|
1225
|
-
* canvas (the situation, the comment-on-UI hint) keeps its own height, and the
|
|
1226
|
-
* canvas takes the rest.
|
|
1227
|
-
*/
|
|
1228
|
-
.stage.is-maximized {
|
|
1229
|
-
position: fixed;
|
|
1230
|
-
inset: 0;
|
|
1231
|
-
z-index: 2147483000;
|
|
1232
|
-
display: flex;
|
|
1233
|
-
flex-direction: column;
|
|
1234
|
-
width: auto;
|
|
1235
|
-
height: auto;
|
|
1236
|
-
max-width: none;
|
|
1237
|
-
max-height: none;
|
|
1238
|
-
margin: 0;
|
|
1239
|
-
padding: 16px 20px 20px;
|
|
1240
|
-
border: 0;
|
|
1241
|
-
color: var(--dpk-ink);
|
|
1242
|
-
background: var(--dpk-paper);
|
|
1243
|
-
overflow: hidden;
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
.stage.is-maximized > * {
|
|
1247
|
-
flex: none;
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1250
|
-
.stage.is-maximized > .canvas {
|
|
1251
|
-
flex: 1 1 0;
|
|
1252
|
-
min-height: 0;
|
|
1253
|
-
align-items: flex-start;
|
|
1254
|
-
overflow: auto;
|
|
1255
|
-
overscroll-behavior: contain;
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
.stage.is-maximized .frame:not([data-kind='native'], [data-kind='plain']) {
|
|
1259
|
-
display: flex;
|
|
1260
|
-
flex-direction: column;
|
|
1261
|
-
min-height: 100%;
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
.stage.is-maximized .frame:not([data-kind='native'], [data-kind='plain']) .viewport {
|
|
1265
|
-
flex: 1 0 auto;
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
|
-
/*
|
|
1269
|
-
* Demo: the app view's browser alone across the tab, as if the reader were
|
|
1270
|
-
* using the app — no title, no tools, no canvas around it. The browser fills
|
|
1271
|
-
* the tab and its page scrolls inside the viewport; a phone stays phone wide.
|
|
1272
|
-
*/
|
|
1273
|
-
.stage.is-demo {
|
|
1274
|
-
position: fixed;
|
|
1275
|
-
inset: 0;
|
|
1276
|
-
z-index: 2147483000;
|
|
1277
|
-
display: flex;
|
|
1278
|
-
flex-direction: column;
|
|
1279
|
-
width: auto;
|
|
1280
|
-
height: auto;
|
|
1281
|
-
max-width: none;
|
|
1282
|
-
max-height: none;
|
|
1283
|
-
margin: 0;
|
|
1284
|
-
padding: 0;
|
|
1285
|
-
border: 0;
|
|
1286
|
-
color: var(--dpk-ink);
|
|
1287
|
-
background: var(--dpk-paper-sunken);
|
|
1288
|
-
overflow: hidden;
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
|
-
.stage.is-demo > .canvas {
|
|
1292
|
-
flex: 1 1 0;
|
|
1293
|
-
min-height: 0;
|
|
1294
|
-
padding: 0;
|
|
1295
|
-
border: 0;
|
|
1296
|
-
border-radius: 0;
|
|
1297
|
-
background: var(--dpk-dots), var(--dpk-paper-sunken);
|
|
1298
|
-
box-shadow: none;
|
|
1299
|
-
overflow: auto;
|
|
1300
|
-
overscroll-behavior: contain;
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
|
-
.stage.is-demo .frame.browser {
|
|
1304
|
-
width: 100%;
|
|
1305
|
-
height: 100%;
|
|
1306
|
-
border: 0;
|
|
1307
|
-
border-radius: 0;
|
|
1308
|
-
box-shadow: none;
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
|
-
.stage.is-demo .frame.browser[data-viewport='mobile'] {
|
|
1312
|
-
width: min(var(--frame-width), 100%);
|
|
1313
|
-
border-inline: 1px solid var(--dpk-rule-strong);
|
|
1314
|
-
box-shadow: var(--dpk-shadow-lg);
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
.stage.is-demo .frame.browser .viewport {
|
|
1318
|
-
flex: 1 1 0;
|
|
1319
|
-
min-height: 0;
|
|
1320
|
-
overflow: auto;
|
|
1321
|
-
overscroll-behavior: contain;
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
.stage.is-demo > .canvas > .frame:not(.browser) {
|
|
1325
|
-
margin: 24px auto;
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
/* Over a phone or a frame outside the browser, the way out floats at the top right. */
|
|
1329
|
-
.demo-exit {
|
|
1330
|
-
position: absolute;
|
|
1331
|
-
top: 12px;
|
|
1332
|
-
right: 16px;
|
|
1333
|
-
z-index: 3;
|
|
1334
|
-
display: inline-flex;
|
|
1335
|
-
align-items: center;
|
|
1336
|
-
gap: 6px;
|
|
1337
|
-
height: 30px;
|
|
1338
|
-
padding: 0 8px 0 10px;
|
|
1339
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
1340
|
-
border-radius: 999px;
|
|
1341
|
-
background: color-mix(in srgb, var(--dpk-paper-raised) 82%, transparent);
|
|
1342
|
-
backdrop-filter: blur(10px);
|
|
1343
|
-
box-shadow: var(--dpk-shadow);
|
|
1344
|
-
color: var(--dpk-ink-soft);
|
|
1345
|
-
font: 600 12px/1 var(--dpk-body);
|
|
1346
|
-
cursor: pointer;
|
|
1347
|
-
opacity: 0.55;
|
|
1348
|
-
transition:
|
|
1349
|
-
opacity 160ms var(--dpk-ease),
|
|
1350
|
-
color 160ms var(--dpk-ease);
|
|
1351
|
-
}
|
|
1352
|
-
|
|
1353
|
-
.demo-exit:hover,
|
|
1354
|
-
.demo-exit:focus-visible {
|
|
1355
|
-
opacity: 1;
|
|
1356
|
-
color: var(--dpk-ink);
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
.demo-exit:focus-visible {
|
|
1360
|
-
outline: none;
|
|
1361
|
-
box-shadow: var(--dpk-focus), var(--dpk-shadow);
|
|
1362
|
-
}
|
|
1363
|
-
|
|
1364
|
-
.demo-exit svg {
|
|
1365
|
-
width: 12px;
|
|
1366
|
-
height: 12px;
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
/* A desktop browser has it at the free end of the tab strip, like a window control. */
|
|
1370
|
-
.browser-tabs .demo-exit {
|
|
1371
|
-
position: static;
|
|
1372
|
-
flex: none;
|
|
1373
|
-
align-self: center;
|
|
1374
|
-
margin: 0 0 3px auto;
|
|
1375
|
-
height: 26px;
|
|
1376
|
-
opacity: 0.85;
|
|
1377
|
-
}
|
|
1378
|
-
|
|
1379
|
-
.demo-exit kbd {
|
|
1380
|
-
padding: 2px 5px;
|
|
1381
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
1382
|
-
border-radius: var(--dpk-radius-xs);
|
|
1383
|
-
background: var(--dpk-paper-sunken);
|
|
1384
|
-
font: 600 10px/1 var(--dpk-mono);
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
/* ------------------------------------------------------------------ frame */
|
|
1388
|
-
|
|
1389
|
-
.frame {
|
|
1390
|
-
width: min(var(--frame-width), 100%);
|
|
1391
|
-
max-width: 100%;
|
|
1392
|
-
margin: 0;
|
|
1393
|
-
border: 1px solid var(--dpk-rule);
|
|
1394
|
-
border-radius: var(--dpk-radius-lg);
|
|
1395
|
-
background: var(--dpk-paper-raised);
|
|
1396
|
-
box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
|
|
1397
|
-
overflow: hidden;
|
|
1398
|
-
/* However high the mock stacks its own layers, they stay under what the stage draws over the frame. */
|
|
1399
|
-
isolation: isolate;
|
|
1400
|
-
transition: box-shadow 200ms var(--dpk-ease);
|
|
1401
|
-
}
|
|
1402
|
-
|
|
1403
|
-
.chrome {
|
|
1404
|
-
display: flex;
|
|
1405
|
-
align-items: center;
|
|
1406
|
-
gap: 8px;
|
|
1407
|
-
padding: 8px 14px;
|
|
1408
|
-
background: linear-gradient(
|
|
1409
|
-
180deg,
|
|
1410
|
-
color-mix(in srgb, var(--dpk-paper-raised) 88%, transparent),
|
|
1411
|
-
color-mix(in srgb, var(--dpk-paper-inset) 88%, transparent)
|
|
1412
|
-
);
|
|
1413
|
-
backdrop-filter: blur(10px);
|
|
1414
|
-
border-bottom: 1px solid var(--dpk-rule);
|
|
1415
|
-
box-shadow: inset 0 1px 0 var(--dpk-highlight);
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
.dots {
|
|
1419
|
-
display: inline-flex;
|
|
1420
|
-
gap: 5px;
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
.dots i {
|
|
1424
|
-
width: 10px;
|
|
1425
|
-
height: 10px;
|
|
1426
|
-
border-radius: 50%;
|
|
1427
|
-
background: var(--dpk-rule-strong);
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
.dots i:nth-child(1) {
|
|
1431
|
-
background: #ff5f57;
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
|
-
.dots i:nth-child(2) {
|
|
1435
|
-
background: #febc2e;
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
|
-
.dots i:nth-child(3) {
|
|
1439
|
-
background: #28c840;
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
.chrome .url {
|
|
1443
|
-
flex: 1;
|
|
1444
|
-
min-width: 0;
|
|
1445
|
-
padding: 4px 14px;
|
|
1446
|
-
border: 1px solid var(--dpk-rule);
|
|
1447
|
-
border-radius: var(--dpk-radius-sm);
|
|
1448
|
-
background: var(--dpk-paper-raised);
|
|
1449
|
-
box-shadow: inset 0 1px 2px rgba(20, 28, 44, 0.04);
|
|
1450
|
-
font-family: var(--dpk-mono);
|
|
1451
|
-
font-size: 10.5px;
|
|
1452
|
-
color: var(--dpk-ink-faint);
|
|
1453
|
-
overflow: hidden;
|
|
1454
|
-
white-space: nowrap;
|
|
1455
|
-
text-overflow: ellipsis;
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
/*
|
|
1459
|
-
* Native previews are recognised by their device shape: a slim bezel, a status
|
|
1460
|
-
* bar with a punch-hole camera, and a home indicator. No address bar.
|
|
1461
|
-
*/
|
|
1462
|
-
.frame[data-kind='native'] {
|
|
1463
|
-
padding: 10px;
|
|
1464
|
-
border-color: #22262e;
|
|
1465
|
-
border-radius: 28px;
|
|
1466
|
-
background: linear-gradient(160deg, #2e3440, #1a1d24);
|
|
1467
|
-
box-shadow:
|
|
1468
|
-
var(--dpk-shadow-lg),
|
|
1469
|
-
inset 0 1px 0 rgba(255, 255, 255, 0.06);
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
.frame[data-kind='native'] .viewport {
|
|
1473
|
-
overflow: hidden;
|
|
1474
|
-
border-radius: 18px;
|
|
1475
|
-
}
|
|
1476
|
-
|
|
1477
|
-
/* A phone is portrait: derive the screen height from its width (~1:2.05)
|
|
1478
|
-
instead of reusing the browser preview heights. */
|
|
1479
|
-
.frame[data-kind='native'][data-viewport='mobile'] .viewport {
|
|
1480
|
-
min-height: calc((var(--frame-width, 390px) - 16px) * 2.05);
|
|
1481
|
-
}
|
|
1482
|
-
|
|
1483
|
-
/*
|
|
1484
|
-
* A mail preview reads as one opened message in a mail client: the subject,
|
|
1485
|
-
* the sender's avatar and the envelope rows, then the body (the light DOM).
|
|
1486
|
-
*/
|
|
1487
|
-
.mail-head {
|
|
1488
|
-
display: grid;
|
|
1489
|
-
gap: 12px;
|
|
1490
|
-
padding: 18px 22px 14px;
|
|
1491
|
-
border-bottom: 1px solid #e3e6ec;
|
|
1492
|
-
background: #fff;
|
|
1493
|
-
color: #1f2430;
|
|
1494
|
-
color-scheme: light;
|
|
1495
|
-
}
|
|
1496
|
-
|
|
1497
|
-
.mail-subject {
|
|
1498
|
-
margin: 0;
|
|
1499
|
-
font-size: 18px;
|
|
1500
|
-
font-weight: 650;
|
|
1501
|
-
line-height: 1.35;
|
|
1502
|
-
letter-spacing: -0.01em;
|
|
1503
|
-
}
|
|
1504
|
-
|
|
1505
|
-
.mail-envelope {
|
|
1506
|
-
display: flex;
|
|
1507
|
-
align-items: flex-start;
|
|
1508
|
-
gap: 12px;
|
|
1509
|
-
min-width: 0;
|
|
1510
|
-
}
|
|
1511
|
-
|
|
1512
|
-
.mail-avatar {
|
|
1513
|
-
display: inline-grid;
|
|
1514
|
-
flex: none;
|
|
1515
|
-
place-items: center;
|
|
1516
|
-
width: 34px;
|
|
1517
|
-
height: 34px;
|
|
1518
|
-
border-radius: 50%;
|
|
1519
|
-
background: linear-gradient(160deg, #6b8af5, #3f5fd8);
|
|
1520
|
-
color: #fff;
|
|
1521
|
-
font-size: 14px;
|
|
1522
|
-
font-weight: 650;
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
.mail-meta {
|
|
1526
|
-
display: grid;
|
|
1527
|
-
gap: 2px;
|
|
1528
|
-
min-width: 0;
|
|
1529
|
-
margin: 0;
|
|
1530
|
-
font-size: 12px;
|
|
1531
|
-
line-height: 1.5;
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
|
-
.mail-row {
|
|
1535
|
-
display: flex;
|
|
1536
|
-
gap: 8px;
|
|
1537
|
-
min-width: 0;
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
.mail-row dt {
|
|
1541
|
-
flex: none;
|
|
1542
|
-
min-width: 3.5em;
|
|
1543
|
-
color: #7a8294;
|
|
1544
|
-
}
|
|
1545
|
-
|
|
1546
|
-
.mail-row dd {
|
|
1547
|
-
min-width: 0;
|
|
1548
|
-
margin: 0;
|
|
1549
|
-
overflow-wrap: anywhere;
|
|
1550
|
-
color: #1f2430;
|
|
1551
|
-
}
|
|
1552
|
-
|
|
1553
|
-
.mail-row:first-child dd {
|
|
1554
|
-
font-weight: 600;
|
|
1555
|
-
}
|
|
1556
|
-
|
|
1557
|
-
/*
|
|
1558
|
-
* A plain preview is not a screen: no chrome, no bezel, no frame of its own.
|
|
1559
|
-
* The light DOM draws the whole object (a memo, a FAX, a paper form) and the
|
|
1560
|
-
* canvas is its desk, so it is as tall as its content.
|
|
1561
|
-
*/
|
|
1562
|
-
.frame[data-kind='plain'] {
|
|
1563
|
-
border: none;
|
|
1564
|
-
border-radius: 0;
|
|
1565
|
-
background: transparent;
|
|
1566
|
-
box-shadow: none;
|
|
1567
|
-
overflow: visible;
|
|
1568
|
-
}
|
|
1569
|
-
|
|
1570
|
-
.frame[data-kind='plain'] .viewport {
|
|
1571
|
-
min-height: 0;
|
|
1572
|
-
background: transparent;
|
|
1573
|
-
}
|
|
1574
|
-
|
|
1575
|
-
.frame[data-kind='plain'][data-empty] .viewport {
|
|
1576
|
-
min-height: 180px;
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
.status-bar {
|
|
1580
|
-
position: relative;
|
|
1581
|
-
display: flex;
|
|
1582
|
-
flex: 0 0 auto;
|
|
1583
|
-
align-items: center;
|
|
1584
|
-
justify-content: space-between;
|
|
1585
|
-
height: 30px;
|
|
1586
|
-
padding: 0 12px;
|
|
1587
|
-
background: #0c0e13;
|
|
1588
|
-
color: #e9edf4;
|
|
1589
|
-
font-size: 11.5px;
|
|
1590
|
-
font-weight: 550;
|
|
1591
|
-
font-variant-numeric: tabular-nums;
|
|
1592
|
-
}
|
|
1593
|
-
|
|
1594
|
-
.status-time {
|
|
1595
|
-
letter-spacing: 0.02em;
|
|
1596
|
-
}
|
|
1597
|
-
|
|
1598
|
-
.punch-hole {
|
|
1599
|
-
position: absolute;
|
|
1600
|
-
top: 50%;
|
|
1601
|
-
left: 50%;
|
|
1602
|
-
width: 10px;
|
|
1603
|
-
height: 10px;
|
|
1604
|
-
transform: translate(-50%, -50%);
|
|
1605
|
-
border-radius: 50%;
|
|
1606
|
-
background: #04060a;
|
|
1607
|
-
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07);
|
|
1608
|
-
}
|
|
1609
|
-
|
|
1610
|
-
.status-wifi {
|
|
1611
|
-
width: 15px;
|
|
1612
|
-
height: 12px;
|
|
1613
|
-
fill: currentColor;
|
|
1614
|
-
color: #e9edf4;
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
/* Home indicator. */
|
|
1618
|
-
.frame[data-kind='native'] .viewport::after {
|
|
1619
|
-
content: '';
|
|
1620
|
-
position: absolute;
|
|
1621
|
-
bottom: 8px;
|
|
1622
|
-
left: 50%;
|
|
1623
|
-
width: 88px;
|
|
1624
|
-
height: 4px;
|
|
1625
|
-
transform: translateX(-50%);
|
|
1626
|
-
border-radius: 999px;
|
|
1627
|
-
background: rgba(138, 146, 160, 0.55);
|
|
1628
|
-
}
|
|
1629
|
-
|
|
1630
|
-
/*
|
|
1631
|
-
* The preview is never scrolled on its own: it shows everything it contains and
|
|
1632
|
-
* the page scrolls as a whole. The flex column keeps a short mock filling
|
|
1633
|
-
* the frame's minimum height without pinning a maximum.
|
|
1634
|
-
*/
|
|
1635
|
-
.viewport {
|
|
1636
|
-
position: relative;
|
|
1637
|
-
display: flex;
|
|
1638
|
-
flex-direction: column;
|
|
1639
|
-
width: 100%;
|
|
1640
|
-
min-height: var(--frame-min-height, 480px);
|
|
1641
|
-
/* A preview is the product's screen, not the kit's chrome: it stays light in a dark theme. */
|
|
1642
|
-
color-scheme: light;
|
|
1643
|
-
background: #fff;
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
|
-
/*
|
|
1647
|
-
* The author's wrapper becomes the frame's filling layer: a one-cell grid makes
|
|
1648
|
-
* its height definite, so a mock that asks for height:100% fills the frame
|
|
1649
|
-
* instead of collapsing to its content.
|
|
1650
|
-
*/
|
|
1651
|
-
/*
|
|
1652
|
-
* The author's wrapper is a stretch row: a mock fills a short frame and grows
|
|
1653
|
-
* the frame when its own content is taller. Stretching (rather than a
|
|
1654
|
-
* percentage height) is what makes the fill reliable.
|
|
1655
|
-
*/
|
|
1656
|
-
/* Only the viewport carries the minimum height; the wrapper grows to fill it. */
|
|
1657
|
-
.viewport ::slotted(*) {
|
|
1658
|
-
display: grid;
|
|
1659
|
-
flex: 1 0 auto;
|
|
1660
|
-
min-width: 0;
|
|
1661
|
-
}
|
|
1662
|
-
|
|
1663
|
-
.frame-placeholder {
|
|
1664
|
-
position: absolute;
|
|
1665
|
-
inset: 12px;
|
|
1666
|
-
display: grid;
|
|
1667
|
-
align-content: center;
|
|
1668
|
-
justify-items: center;
|
|
1669
|
-
gap: 8px;
|
|
1670
|
-
padding: 12px;
|
|
1671
|
-
text-align: center;
|
|
1672
|
-
color: var(--dpk-ink-faint);
|
|
1673
|
-
border: 1px dashed var(--dpk-rule-strong);
|
|
1674
|
-
border-radius: var(--dpk-radius);
|
|
1675
|
-
background: var(--dpk-dots), var(--dpk-paper-sunken);
|
|
1676
|
-
}
|
|
1677
|
-
|
|
1678
|
-
.frame-placeholder code {
|
|
1679
|
-
padding: 3px 7px;
|
|
1680
|
-
border: 1px solid var(--dpk-rule);
|
|
1681
|
-
border-radius: var(--dpk-radius-xs);
|
|
1682
|
-
background: var(--dpk-paper-raised);
|
|
1683
|
-
font-family: var(--dpk-mono);
|
|
1684
|
-
font-size: 10px;
|
|
1685
|
-
}
|
|
1686
|
-
|
|
1687
|
-
/* ---------------------------------------------------------------- browser */
|
|
1688
|
-
|
|
1689
|
-
/*
|
|
1690
|
-
* The app view's browser: a tab strip on a darker band, the active tab merged
|
|
1691
|
-
* into the toolbar below it, round navigation buttons, a pill address bar and
|
|
1692
|
-
* the profile of the user the window belongs to.
|
|
1693
|
-
*/
|
|
1694
|
-
.frame.browser {
|
|
1695
|
-
display: flex;
|
|
1696
|
-
flex-direction: column;
|
|
1697
|
-
--browser-band: var(--dpk-paper-inset);
|
|
1698
|
-
--browser-bar: var(--dpk-paper-raised);
|
|
1699
|
-
}
|
|
1700
|
-
|
|
1701
|
-
.browser-tabs {
|
|
1702
|
-
display: flex;
|
|
1703
|
-
align-items: flex-end;
|
|
1704
|
-
gap: 4px;
|
|
1705
|
-
min-width: 0;
|
|
1706
|
-
padding: 7px 10px 0;
|
|
1707
|
-
background: var(--browser-band);
|
|
1708
|
-
}
|
|
1709
|
-
|
|
1710
|
-
.browser-tab-list {
|
|
1711
|
-
display: flex;
|
|
1712
|
-
flex: 0 1 auto;
|
|
1713
|
-
align-items: flex-end;
|
|
1714
|
-
gap: 2px;
|
|
1715
|
-
min-width: 0;
|
|
1716
|
-
}
|
|
1717
|
-
|
|
1718
|
-
.browser-tab {
|
|
1719
|
-
position: relative;
|
|
1720
|
-
display: flex;
|
|
1721
|
-
flex: 0 1 220px;
|
|
1722
|
-
align-items: center;
|
|
1723
|
-
gap: 8px;
|
|
1724
|
-
min-width: 64px;
|
|
1725
|
-
height: 32px;
|
|
1726
|
-
padding: 0 8px 0 12px;
|
|
1727
|
-
border-radius: 9px 9px 0 0;
|
|
1728
|
-
color: var(--dpk-ink-soft);
|
|
1729
|
-
font-size: 12px;
|
|
1730
|
-
cursor: default;
|
|
1731
|
-
user-select: none;
|
|
1732
|
-
transition: background 140ms var(--dpk-ease);
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1735
|
-
.browser-tab:not([aria-selected='true']):hover {
|
|
1736
|
-
background: color-mix(in srgb, var(--browser-bar) 55%, transparent);
|
|
1737
|
-
}
|
|
1738
|
-
|
|
1739
|
-
/* A thin rule between two inactive tabs, as in Chrome. */
|
|
1740
|
-
.browser-tab:not([aria-selected='true']) + .browser-tab:not([aria-selected='true'])::before {
|
|
1741
|
-
content: '';
|
|
1742
|
-
position: absolute;
|
|
1743
|
-
left: -2px;
|
|
1744
|
-
top: 9px;
|
|
1745
|
-
bottom: 9px;
|
|
1746
|
-
width: 1px;
|
|
1747
|
-
background: var(--dpk-rule-strong);
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1750
|
-
.browser-tab[aria-selected='true'] {
|
|
1751
|
-
background: var(--browser-bar);
|
|
1752
|
-
color: var(--dpk-ink);
|
|
1753
|
-
box-shadow: 0 -1px 0 var(--dpk-rule);
|
|
1754
|
-
}
|
|
1755
|
-
|
|
1756
|
-
.browser-tab:focus-visible {
|
|
1757
|
-
outline: none;
|
|
1758
|
-
box-shadow: var(--dpk-focus);
|
|
1759
|
-
}
|
|
1760
|
-
|
|
1761
|
-
.browser-favicon {
|
|
1762
|
-
display: inline-flex;
|
|
1763
|
-
flex: none;
|
|
1764
|
-
color: var(--dpk-ink-faint);
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
.browser-favicon svg {
|
|
1768
|
-
width: 14px;
|
|
1769
|
-
height: 14px;
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1772
|
-
.browser-tab-title {
|
|
1773
|
-
flex: 1;
|
|
1774
|
-
min-width: 0;
|
|
1775
|
-
overflow: hidden;
|
|
1776
|
-
white-space: nowrap;
|
|
1777
|
-
text-overflow: ellipsis;
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
|
-
.browser-tab-close,
|
|
1781
|
-
.browser-new-tab,
|
|
1782
|
-
.browser-nav {
|
|
1783
|
-
display: inline-grid;
|
|
1784
|
-
flex: none;
|
|
1785
|
-
place-items: center;
|
|
1786
|
-
padding: 0;
|
|
1787
|
-
border: 0;
|
|
1788
|
-
border-radius: 50%;
|
|
1789
|
-
background: transparent;
|
|
1790
|
-
color: var(--dpk-ink-soft);
|
|
1791
|
-
cursor: pointer;
|
|
1792
|
-
transition:
|
|
1793
|
-
background 140ms var(--dpk-ease),
|
|
1794
|
-
color 140ms var(--dpk-ease);
|
|
1795
|
-
}
|
|
1796
|
-
|
|
1797
|
-
.browser-tab-close {
|
|
1798
|
-
width: 18px;
|
|
1799
|
-
height: 18px;
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
.browser-tab-close svg {
|
|
1803
|
-
width: 10px;
|
|
1804
|
-
height: 10px;
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
.browser-new-tab {
|
|
1808
|
-
width: 26px;
|
|
1809
|
-
height: 26px;
|
|
1810
|
-
margin-bottom: 3px;
|
|
1811
|
-
}
|
|
1812
|
-
|
|
1813
|
-
.browser-new-tab svg {
|
|
1814
|
-
width: 14px;
|
|
1815
|
-
height: 14px;
|
|
1816
|
-
}
|
|
1817
|
-
|
|
1818
|
-
.browser-tab-close:hover,
|
|
1819
|
-
.browser-new-tab:hover,
|
|
1820
|
-
.browser-nav:not(:disabled):hover {
|
|
1821
|
-
background: color-mix(in srgb, var(--dpk-ink) 9%, transparent);
|
|
1822
|
-
color: var(--dpk-ink);
|
|
1823
|
-
}
|
|
1824
|
-
|
|
1825
|
-
.browser-tab-close:focus-visible,
|
|
1826
|
-
.browser-new-tab:focus-visible,
|
|
1827
|
-
.browser-nav:focus-visible {
|
|
1828
|
-
outline: none;
|
|
1829
|
-
box-shadow: var(--dpk-focus);
|
|
1830
|
-
}
|
|
1831
|
-
|
|
1832
|
-
.browser-toolbar {
|
|
1833
|
-
display: flex;
|
|
1834
|
-
align-items: center;
|
|
1835
|
-
gap: 4px;
|
|
1836
|
-
min-width: 0;
|
|
1837
|
-
padding: 6px 10px;
|
|
1838
|
-
background: var(--browser-bar);
|
|
1839
|
-
border-bottom: 1px solid var(--dpk-rule);
|
|
1840
|
-
}
|
|
1841
|
-
|
|
1842
|
-
.browser-nav {
|
|
1843
|
-
width: 30px;
|
|
1844
|
-
height: 30px;
|
|
1845
|
-
}
|
|
1846
|
-
|
|
1847
|
-
.browser-nav svg {
|
|
1848
|
-
width: 15px;
|
|
1849
|
-
height: 15px;
|
|
1850
|
-
}
|
|
1851
|
-
|
|
1852
|
-
.browser-nav:disabled {
|
|
1853
|
-
color: var(--dpk-ink-faint);
|
|
1854
|
-
opacity: 0.5;
|
|
1855
|
-
cursor: default;
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
.browser-address-form {
|
|
1859
|
-
position: relative;
|
|
1860
|
-
display: flex;
|
|
1861
|
-
flex: 1;
|
|
1862
|
-
align-items: center;
|
|
1863
|
-
min-width: 0;
|
|
1864
|
-
margin: 0 4px;
|
|
1865
|
-
}
|
|
1866
|
-
|
|
1867
|
-
.browser-lock {
|
|
1868
|
-
position: absolute;
|
|
1869
|
-
left: 12px;
|
|
1870
|
-
display: inline-flex;
|
|
1871
|
-
color: var(--dpk-ink-faint);
|
|
1872
|
-
pointer-events: none;
|
|
1873
|
-
}
|
|
1874
|
-
|
|
1875
|
-
.browser-lock svg {
|
|
1876
|
-
width: 13px;
|
|
1877
|
-
height: 13px;
|
|
1878
|
-
}
|
|
1879
|
-
|
|
1880
|
-
.browser-address {
|
|
1881
|
-
width: 100%;
|
|
1882
|
-
min-width: 0;
|
|
1883
|
-
height: 30px;
|
|
1884
|
-
padding: 0 14px 0 33px;
|
|
1885
|
-
border: 1px solid transparent;
|
|
1886
|
-
border-radius: 999px;
|
|
1887
|
-
background: var(--dpk-paper-sunken);
|
|
1888
|
-
color: var(--dpk-ink);
|
|
1889
|
-
font: 13px/1 var(--dpk-body);
|
|
1890
|
-
text-overflow: ellipsis;
|
|
1891
|
-
transition:
|
|
1892
|
-
background 140ms var(--dpk-ease),
|
|
1893
|
-
border-color 140ms var(--dpk-ease);
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
|
-
.browser-address:hover {
|
|
1897
|
-
background: var(--dpk-paper-inset);
|
|
1898
|
-
}
|
|
1899
|
-
|
|
1900
|
-
.browser-address:focus {
|
|
1901
|
-
outline: none;
|
|
1902
|
-
border-color: var(--dpk-blue);
|
|
1903
|
-
background: var(--browser-bar);
|
|
1904
|
-
box-shadow: 0 0 0 1px var(--dpk-blue);
|
|
1905
|
-
}
|
|
1906
|
-
|
|
1907
|
-
.browser-profile {
|
|
1908
|
-
display: inline-flex;
|
|
1909
|
-
flex: none;
|
|
1910
|
-
align-items: center;
|
|
1911
|
-
gap: 6px;
|
|
1912
|
-
max-width: 160px;
|
|
1913
|
-
height: 28px;
|
|
1914
|
-
padding: 0 10px 0 3px;
|
|
1915
|
-
border-radius: 999px;
|
|
1916
|
-
background: var(--dpk-blue-soft);
|
|
1917
|
-
color: var(--dpk-blue-strong, var(--dpk-blue));
|
|
1918
|
-
font-size: 12px;
|
|
1919
|
-
font-weight: 600;
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
.browser-avatar {
|
|
1923
|
-
display: inline-grid;
|
|
1924
|
-
flex: none;
|
|
1925
|
-
place-items: center;
|
|
1926
|
-
width: 22px;
|
|
1927
|
-
height: 22px;
|
|
1928
|
-
border-radius: 50%;
|
|
1929
|
-
background: var(--dpk-blue);
|
|
1930
|
-
color: #fff;
|
|
1931
|
-
font-size: 11px;
|
|
1932
|
-
font-weight: 700;
|
|
1933
|
-
}
|
|
1934
|
-
|
|
1935
|
-
.browser-profile-name {
|
|
1936
|
-
min-width: 0;
|
|
1937
|
-
overflow: hidden;
|
|
1938
|
-
white-space: nowrap;
|
|
1939
|
-
text-overflow: ellipsis;
|
|
1940
|
-
}
|
|
1941
|
-
|
|
1942
|
-
/* The bar a reload draws under the toolbar while the page comes back. */
|
|
1943
|
-
.browser-progress {
|
|
1944
|
-
position: relative;
|
|
1945
|
-
height: 2px;
|
|
1946
|
-
margin-top: -2px;
|
|
1947
|
-
overflow: hidden;
|
|
1948
|
-
pointer-events: none;
|
|
1949
|
-
}
|
|
1950
|
-
|
|
1951
|
-
.browser[data-loading] .browser-progress::after {
|
|
1952
|
-
content: '';
|
|
1953
|
-
position: absolute;
|
|
1954
|
-
inset: 0;
|
|
1955
|
-
background: var(--dpk-blue);
|
|
1956
|
-
transform-origin: left;
|
|
1957
|
-
animation: dpk-browser-load 360ms var(--dpk-ease) forwards;
|
|
1958
|
-
}
|
|
1959
|
-
|
|
1960
|
-
@keyframes dpk-browser-load {
|
|
1961
|
-
from {
|
|
1962
|
-
transform: scaleX(0.08);
|
|
1963
|
-
}
|
|
1964
|
-
to {
|
|
1965
|
-
transform: scaleX(1);
|
|
1966
|
-
}
|
|
1967
|
-
}
|
|
1968
|
-
|
|
1969
|
-
.browser .viewport {
|
|
1970
|
-
transition: opacity 160ms var(--dpk-ease);
|
|
1971
|
-
}
|
|
1972
|
-
|
|
1973
|
-
.browser[data-loading] .viewport {
|
|
1974
|
-
opacity: 0.45;
|
|
1975
|
-
}
|
|
1976
|
-
|
|
1977
|
-
/* The new tab page: the pages of the app the reader is in, as tiles. */
|
|
1978
|
-
.browser-newtab {
|
|
1979
|
-
display: grid;
|
|
1980
|
-
flex: 1;
|
|
1981
|
-
align-content: start;
|
|
1982
|
-
justify-items: center;
|
|
1983
|
-
gap: 18px;
|
|
1984
|
-
padding: 72px 24px 40px;
|
|
1985
|
-
background: #f8f9fb;
|
|
1986
|
-
color: #3c4250;
|
|
1987
|
-
}
|
|
1988
|
-
|
|
1989
|
-
.browser-newtab-label {
|
|
1990
|
-
margin: 0;
|
|
1991
|
-
font-size: 13px;
|
|
1992
|
-
font-weight: 600;
|
|
1993
|
-
color: #6b7282;
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
|
-
.browser-shortcuts {
|
|
1997
|
-
display: grid;
|
|
1998
|
-
grid-template-columns: repeat(auto-fill, 112px);
|
|
1999
|
-
justify-content: center;
|
|
2000
|
-
gap: 8px;
|
|
2001
|
-
width: min(100%, 600px);
|
|
2002
|
-
}
|
|
2003
|
-
|
|
2004
|
-
.browser-shortcut {
|
|
2005
|
-
display: grid;
|
|
2006
|
-
justify-items: center;
|
|
2007
|
-
gap: 6px;
|
|
2008
|
-
padding: 14px 8px 12px;
|
|
2009
|
-
border-radius: 12px;
|
|
2010
|
-
color: inherit;
|
|
2011
|
-
text-align: center;
|
|
2012
|
-
text-decoration: none;
|
|
2013
|
-
transition: background 140ms var(--dpk-ease);
|
|
2014
|
-
}
|
|
2015
|
-
|
|
2016
|
-
.browser-shortcut:hover,
|
|
2017
|
-
.browser-shortcut:focus-visible {
|
|
2018
|
-
outline: none;
|
|
2019
|
-
background: #eceef2;
|
|
2020
|
-
}
|
|
2021
|
-
|
|
2022
|
-
.browser-shortcut-icon {
|
|
2023
|
-
display: grid;
|
|
2024
|
-
place-items: center;
|
|
2025
|
-
width: 44px;
|
|
2026
|
-
height: 44px;
|
|
2027
|
-
border-radius: 50%;
|
|
2028
|
-
background: #e3e7ee;
|
|
2029
|
-
color: #3563d9;
|
|
2030
|
-
font-size: 17px;
|
|
2031
|
-
font-weight: 700;
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
|
-
.browser-shortcut-title,
|
|
2035
|
-
.browser-shortcut-url {
|
|
2036
|
-
max-width: 100%;
|
|
2037
|
-
overflow: hidden;
|
|
2038
|
-
white-space: nowrap;
|
|
2039
|
-
text-overflow: ellipsis;
|
|
2040
|
-
}
|
|
2041
|
-
|
|
2042
|
-
.browser-shortcut-title {
|
|
2043
|
-
font-size: 12.5px;
|
|
2044
|
-
font-weight: 600;
|
|
2045
|
-
}
|
|
2046
|
-
|
|
2047
|
-
.browser-shortcut-url {
|
|
2048
|
-
font-size: 10.5px;
|
|
2049
|
-
color: #8a91a0;
|
|
2050
|
-
}
|
|
2051
|
-
|
|
2052
|
-
.browser-unreachable {
|
|
2053
|
-
display: grid;
|
|
2054
|
-
flex: 1;
|
|
2055
|
-
align-content: start;
|
|
2056
|
-
gap: 10px;
|
|
2057
|
-
padding: 88px max(24px, 12%) 40px;
|
|
2058
|
-
background: #fff;
|
|
2059
|
-
color: #3c4250;
|
|
2060
|
-
}
|
|
2061
|
-
|
|
2062
|
-
.browser-unreachable::before {
|
|
2063
|
-
content: '';
|
|
2064
|
-
width: 40px;
|
|
2065
|
-
height: 40px;
|
|
2066
|
-
margin-bottom: 8px;
|
|
2067
|
-
border-radius: 10px;
|
|
2068
|
-
background:
|
|
2069
|
-
linear-gradient(135deg, transparent 46%, #9aa1ae 46% 54%, transparent 54%),
|
|
2070
|
-
linear-gradient(45deg, transparent 46%, #9aa1ae 46% 54%, transparent 54%), #eceef2;
|
|
2071
|
-
}
|
|
2072
|
-
|
|
2073
|
-
.browser-unreachable h3 {
|
|
2074
|
-
margin: 0;
|
|
2075
|
-
font-size: 20px;
|
|
2076
|
-
font-weight: 600;
|
|
2077
|
-
color: #1f2430;
|
|
2078
|
-
}
|
|
2079
|
-
|
|
2080
|
-
.browser-unreachable p {
|
|
2081
|
-
margin: 0;
|
|
2082
|
-
font-size: 13.5px;
|
|
2083
|
-
line-height: 1.6;
|
|
2084
|
-
}
|
|
2085
|
-
|
|
2086
|
-
.browser-unreachable code {
|
|
2087
|
-
justify-self: start;
|
|
2088
|
-
max-width: 100%;
|
|
2089
|
-
overflow-wrap: anywhere;
|
|
2090
|
-
font-family: var(--dpk-mono);
|
|
2091
|
-
font-size: 12px;
|
|
2092
|
-
color: #6b7282;
|
|
2093
|
-
}
|
|
2094
|
-
|
|
2095
|
-
/*
|
|
2096
|
-
* A phone browser: the address and the avatar on top, the controls and the
|
|
2097
|
-
* tab count in a bar under the page, the tabs as cards over the page.
|
|
2098
|
-
*/
|
|
2099
|
-
.browser[data-viewport='mobile'] .browser-toolbar {
|
|
2100
|
-
gap: 8px;
|
|
2101
|
-
padding: 8px 10px;
|
|
2102
|
-
}
|
|
2103
|
-
|
|
2104
|
-
.browser[data-viewport='mobile'] .browser-profile {
|
|
2105
|
-
padding-right: 3px;
|
|
2106
|
-
}
|
|
2107
|
-
|
|
2108
|
-
.browser[data-viewport='mobile'] .browser-shortcuts {
|
|
2109
|
-
grid-template-columns: repeat(auto-fill, 96px);
|
|
2110
|
-
}
|
|
2111
|
-
|
|
2112
|
-
.browser-bottom {
|
|
2113
|
-
display: flex;
|
|
2114
|
-
align-items: center;
|
|
2115
|
-
justify-content: space-around;
|
|
2116
|
-
padding: 6px 8px 10px;
|
|
2117
|
-
border-top: 1px solid var(--dpk-rule);
|
|
2118
|
-
background: var(--browser-bar);
|
|
2119
|
-
}
|
|
2120
|
-
|
|
2121
|
-
.browser-bottom .browser-new-tab {
|
|
2122
|
-
width: 30px;
|
|
2123
|
-
height: 30px;
|
|
2124
|
-
margin: 0;
|
|
2125
|
-
}
|
|
2126
|
-
|
|
2127
|
-
.browser-tab-count-box {
|
|
2128
|
-
display: inline-grid;
|
|
2129
|
-
place-items: center;
|
|
2130
|
-
min-width: 17px;
|
|
2131
|
-
height: 17px;
|
|
2132
|
-
padding: 0 3px;
|
|
2133
|
-
border: 1.5px solid currentColor;
|
|
2134
|
-
border-radius: 4px;
|
|
2135
|
-
font: 700 10px/1 var(--dpk-body);
|
|
2136
|
-
}
|
|
2137
|
-
|
|
2138
|
-
.browser-tab-count[aria-expanded='true'] {
|
|
2139
|
-
background: color-mix(in srgb, var(--dpk-ink) 9%, transparent);
|
|
2140
|
-
color: var(--dpk-ink);
|
|
2141
|
-
}
|
|
2142
|
-
|
|
2143
|
-
.browser-switcher {
|
|
2144
|
-
position: absolute;
|
|
2145
|
-
inset: 0;
|
|
2146
|
-
z-index: 2;
|
|
2147
|
-
display: grid;
|
|
2148
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
2149
|
-
align-content: start;
|
|
2150
|
-
gap: 10px;
|
|
2151
|
-
padding: 12px;
|
|
2152
|
-
color-scheme: normal;
|
|
2153
|
-
background: var(--browser-band);
|
|
2154
|
-
overflow: auto;
|
|
2155
|
-
}
|
|
2156
|
-
|
|
2157
|
-
.browser-card {
|
|
2158
|
-
position: relative;
|
|
2159
|
-
border: 1px solid var(--dpk-rule-strong);
|
|
2160
|
-
border-radius: 12px;
|
|
2161
|
-
background: var(--browser-bar);
|
|
2162
|
-
box-shadow: var(--dpk-shadow);
|
|
2163
|
-
}
|
|
2164
|
-
|
|
2165
|
-
.browser-card[aria-current='true'] {
|
|
2166
|
-
border-color: var(--dpk-blue);
|
|
2167
|
-
box-shadow: 0 0 0 1px var(--dpk-blue);
|
|
2168
|
-
}
|
|
2169
|
-
|
|
2170
|
-
.browser-card-open {
|
|
2171
|
-
display: grid;
|
|
2172
|
-
grid-template-columns: auto minmax(0, 1fr);
|
|
2173
|
-
align-items: center;
|
|
2174
|
-
gap: 4px 6px;
|
|
2175
|
-
width: 100%;
|
|
2176
|
-
min-height: 84px;
|
|
2177
|
-
padding: 10px 30px 10px 10px;
|
|
2178
|
-
border: 0;
|
|
2179
|
-
border-radius: inherit;
|
|
2180
|
-
background: transparent;
|
|
2181
|
-
color: var(--dpk-ink);
|
|
2182
|
-
font: 600 12px/1.3 var(--dpk-body);
|
|
2183
|
-
text-align: left;
|
|
2184
|
-
align-content: start;
|
|
2185
|
-
cursor: pointer;
|
|
2186
|
-
}
|
|
2187
|
-
|
|
2188
|
-
.browser-card-open:focus-visible {
|
|
2189
|
-
outline: none;
|
|
2190
|
-
box-shadow: var(--dpk-focus);
|
|
2191
|
-
}
|
|
2192
|
-
|
|
2193
|
-
.browser-card-title,
|
|
2194
|
-
.browser-card-url {
|
|
2195
|
-
min-width: 0;
|
|
2196
|
-
overflow: hidden;
|
|
2197
|
-
white-space: nowrap;
|
|
2198
|
-
text-overflow: ellipsis;
|
|
2199
|
-
}
|
|
2200
|
-
|
|
2201
|
-
.browser-card-url {
|
|
2202
|
-
grid-column: 1 / -1;
|
|
2203
|
-
color: var(--dpk-ink-faint);
|
|
2204
|
-
font: 400 11px/1.3 var(--dpk-mono);
|
|
2205
|
-
}
|
|
2206
|
-
|
|
2207
|
-
.browser-card .browser-tab-close {
|
|
2208
|
-
position: absolute;
|
|
2209
|
-
top: 8px;
|
|
2210
|
-
right: 8px;
|
|
2211
|
-
}
|
|
2212
|
-
|
|
2213
|
-
.parked {
|
|
2214
|
-
display: none;
|
|
2215
|
-
}
|
|
2216
|
-
`,fn=`
|
|
2217
|
-
dpk-template-prototype > [data-preview-id]:has(dialog[${me}][open]) {
|
|
2218
|
-
position: relative;
|
|
2219
|
-
}
|
|
2220
|
-
|
|
2221
|
-
dpk-template-prototype > [data-preview-id]:has(dialog[${me}][open])::after {
|
|
2222
|
-
content: '';
|
|
2223
|
-
position: absolute;
|
|
2224
|
-
inset: 0;
|
|
2225
|
-
z-index: 1;
|
|
2226
|
-
background: color-mix(in srgb, var(--dpk-ink, #111827) 38%, transparent);
|
|
2227
|
-
}
|
|
2228
|
-
|
|
2229
|
-
dpk-template-prototype > [data-preview-id] dialog[${me}][open] {
|
|
2230
|
-
position: absolute;
|
|
2231
|
-
inset: 0;
|
|
2232
|
-
z-index: 2;
|
|
2233
|
-
max-width: calc(100% - 32px);
|
|
2234
|
-
max-height: calc(100% - 32px);
|
|
2235
|
-
margin: auto;
|
|
2236
|
-
}
|
|
2237
|
-
`,He={kind:"off"},gn=(e,t)=>{switch(t.kind){case"toggle":return e.kind==="off"?{kind:"picking"}:He;case"exit":return He;case"pick":return e.kind==="off"?e:{kind:"composing",target:t.target,body:e.kind==="composing"?e.body:""};case"input":return e.kind==="composing"?{...e,body:t.body}:e;case"dismiss":case"submitted":return e.kind==="off"?e:{kind:"picking"};default:return e}},bn={width:300,height:300},wn=360,lr="dpk-template-prototype-document-styles",mn=()=>{if(document.getElementById(lr)!==null)return;const e=Object.assign(document.createElement("style"),{id:lr,textContent:fn});document.head.append(e)},yn=(e,t,r)=>{const i=getComputedStyle(e),n=/auto|scroll/.test(i.overflowX)&&e.scrollWidth>e.clientWidth,o=/auto|scroll/.test(i.overflowY)&&e.scrollHeight>e.clientHeight,s=t<0?e.scrollLeft>0:t>0&&e.scrollLeft+e.clientWidth<e.scrollWidth-1,a=r<0?e.scrollTop>0:r>0&&e.scrollTop+e.clientHeight<e.scrollHeight-1;return n&&s||o&&a},kn=e=>{if(e.assignedSlot!==null)return e.assignedSlot;if(e.parentElement!==null)return e.parentElement;const t=e.getRootNode();return t instanceof ShadowRoot?t.host:null};class cr extends et{static{this.styles=[et.styles,Ir,Ar,vn]}#e=He;#l=!1;#a=null;#o=[];#A=new Dr(this);#g=!1;#t=null;#r=null;#b=!1;#d=!1;#c=!1;#i=null;#u=null;definitionFor(t){return Lt(t)}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this.#x),window.addEventListener("resize",this.#h),this.addEventListener("toggle",this.#S,!0),this.addEventListener("click",this.#p,!0),this.addEventListener("auxclick",this.#p,!0),mn()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this.#x),window.removeEventListener("resize",this.#h),this.removeEventListener("toggle",this.#S,!0),this.removeEventListener("click",this.#p,!0),this.removeEventListener("auxclick",this.#p,!0),this.#I()}renderRegions(t){const r=ve(this.locale),i=j(t.state,t.navigation),n=re(t.navigation)==="app";this.#t!==null&&this.#t.mode==="demo"!==n&&this.#T();const o=n?this.#U(t,r):null;return this.#b=o!==null,this.#o=i!==void 0&&i.kind!=="story"&&(o===null||o.view.entry?.kind==="page")?Ne(t.state,i,t.navigation).shown.map(s=>s.id):[],this.#i!==null&&this.#i.page!==this.#o.join(" ")&&this.#I(),{sidebar:Qt(t,r),main:sr(t,r,{hasPreviewContent:s=>this.#q(s),lift:this.#t,onToggleMaximize:()=>this.#f(this.#t===null?"maximized":null),onToggleDemo:()=>this.#f(this.#t===null?"demo":null),onLiftedWheel:this.#Y,browser:o===null?null:{...o,loading:this.#i!==null},uiComment:this.#P(t),canvasEvents:{click:this.#D,pointermove:this.#O,pointerleave:this.#C,wheel:this.#L,scroll:this.#h}})}}updated(){super.updated(),this.#V(),this.#M();const t=this.#e;if(t.kind==="composing"&&!this.#o.includes(t.target.previewId)){this.#s({kind:"dismiss"});return}this.#z(),this.#c&&(this.#c=!1,this.renderRoot.querySelector('.browser-tab[aria-selected="true"]')?.focus()),this.#$();const r=t.kind==="composing"&&!this.#l;if(this.#l=t.kind==="composing",t.kind!=="composing"||this.#a===null)return;const i=this.renderRoot.querySelector(".comment-pop");i&&(this.#A.open(i,this.#a,bn,{placement:"right-start"}),r&&i.querySelector("textarea")?.focus({preventScroll:!0}))}#P(t){const r=this.#e,i=r.kind==="composing"?r.target:void 0,n=i?T(t.state,i.previewId)?.preview:void 0,o=i?dt(i):void 0;return{mode:r,pins:r.kind==="off"?[]:yt(t.comments,this.#o),...i&&n?{targetLabel:mt(n,i)}:{},notes:t.comments.filter(s=>s.target.type===Q&&s.target.id===o).map(s=>Xe(s)),composer:Or(this.locale),send:s=>this.#s(s),submit:s=>this.#_(s)}}#s(t){const r=gn(this.#e,t);r!==this.#e&&(this.#e=r,r.kind!=="composing"&&(this.#a=null),this.requestUpdate())}#_(t){const r=this.#e;if(r.kind!=="composing")return;this.dispatch({type:Pr,target:{type:Q,id:dt(r.target)},payload:{body:t}}).ok&&this.#s({kind:"submitted"})}#w(t){const r=t.composedPath(),i=r[0];if(i instanceof Element&&i.classList.contains("ui-catcher"))return this.#R(t.clientX,t.clientY);const n=r.find(o=>o instanceof Element&&o.parentElement===this&&o.hasAttribute("data-preview-id"));return!n||!(i instanceof Element)||!n.contains(i)?null:this.#y(i,n)}#R(t,r){const i=this.#m(t,r);return i===null?null:this.#y(i.element,i.wrapper)}#m(t,r){if(typeof document.elementsFromPoint!="function")return null;const i=this.#k();for(const n of document.elementsFromPoint(t,r)){const o=i.find(s=>s.contains(n));if(o!==void 0)return{element:n,wrapper:o}}return null}#y(t,r){const i=r.getAttribute("data-preview-id");if(!i)return null;const n=gi(t,r),o=yi(n,r);return{element:n,target:{previewId:i,selector:o.selector,...o.text===void 0?{}:{text:o.text}}}}#k(){return Array.from(this.children).filter(t=>{const r=t.getAttribute("data-preview-id");return r!==null&&this.#o.includes(r)})}#D=t=>{if(this.#e.kind==="off")return;const r=this.#w(t);r&&(t.preventDefault(),t.stopPropagation(),this.#a=r.element,this.#s({kind:"pick",target:r.target}))};#O=t=>{if(this.#e.kind==="off")return;const r=this.#w(t);this.#v(".ui-hover",r?.element??null)};#C=()=>{this.#v(".ui-hover",null)};#L=t=>{const r=t.composedPath()[0];if(!(r instanceof Element)||!r.classList.contains("ui-catcher"))return;const i=this.renderRoot.querySelector(".canvas");let n=this.#m(t.clientX,t.clientY)?.element??null;for(;n!==null&&n!==i;){if(yn(n,t.deltaX,t.deltaY)){t.preventDefault(),n.scrollBy({left:t.deltaX,top:t.deltaY});return}n=kn(n)}};#x=t=>{t.key!=="Escape"||t.defaultPrevented||(this.#e.kind!=="off"?this.#s({kind:"exit"}):this.#f(null))};#h=()=>{this.#e.kind!=="off"&&this.#$()};#$(){if(this.#e.kind==="off")return;this.#v(".ui-picked",this.#a);const t=this.renderRoot.querySelector(".canvas");if(!t)return;const r=this.renderRoot.querySelector(".ui-catcher");r&&(r.style.width=`${t.scrollWidth}px`,r.style.height=`${t.scrollHeight}px`);for(const i of this.renderRoot.querySelectorAll(".ui-pin")){const n=this.#N(i.dataset.preview??""),s=(n?ki(n,i.dataset.selector??""):null)?.getBoundingClientRect();if(!s||s.width===0&&s.height===0){i.hidden=!0;continue}const a=this.#E(t);i.hidden=!1,i.style.left=`${s.right-a.left}px`,i.style.top=`${s.top-a.top}px`}}#v(t,r){const i=this.renderRoot.querySelector(t),n=this.renderRoot.querySelector(".canvas");if(!i||!n)return;const o=r?.getBoundingClientRect();if(!o){i.hidden=!0;return}const s=this.#E(n);i.hidden=!1,i.style.left=`${o.left-s.left}px`,i.style.top=`${o.top-s.top}px`,i.style.width=`${o.width}px`,i.style.height=`${o.height}px`}#E(t){const r=t.getBoundingClientRect();return{left:r.left+t.clientLeft-t.scrollLeft,top:r.top+t.clientTop-t.scrollTop}}#M(){for(const t of this.querySelectorAll(":scope > [data-preview-id]"))for(const r of t.querySelectorAll("dialog"))Nt(r),Vt(this,r)}#S=t=>{const r=t.target;!(r instanceof HTMLDialogElement)||!r.open||Array.from(this.children).some(i=>i.hasAttribute("data-preview-id")&&i.contains(r))&&(Nt(r),Vt(this,r))};#N(t){return Array.from(this.children).find(r=>r.getAttribute("data-preview-id")===t)}#V(){if(this.#g||this.renderRoot.querySelector(".stage")===null)return;this.#g=!0;const t=this.derivation.state,r=[];for(const i of Array.from(this.children)){const n=i.getAttribute("data-preview-id");if(n!==null)for(const o of i.querySelectorAll("a, [data-dpk-navigate]")){const s=ii(t,{href:o.getAttribute("href"),navigate:o.getAttribute("data-dpk-navigate")});if(s===null)continue;const a=(o.textContent??"").replace(/\s+/g," ").trim().slice(0,40),p=o.getAttribute("data-dpk-navigate")??o.getAttribute("href")??"(no href)";r.push(` ${n}: <${o.tagName.toLowerCase()}> "${a}" \u2192 ${p} (${s})`)}}r.length!==0&&console.warn(`[dev-process-kit] <dpk-template-prototype>: ${r.length} link(s) in the previews lead nowhere. Point each at the screen it opens (data-dpk-navigate="screen=\u2026"); a link that only moves the scenario on can name a step (data-dpk-navigate="step=\u2026") or a user story (data-dpk-navigate="story=\u2026"):
|
|
2238
|
-
`+r.join(`
|
|
2239
|
-
`))}#f(t){if(t===(this.#t?.mode??null))return;const r=this.renderRoot.querySelector(".stage"),i=this.#t?.height??r?.offsetHeight??0;this.#T(),t==="demo"&&this.#e.kind!=="off"&&this.#s({kind:"exit"}),t!==null&&(this.#t={mode:t,height:i}),t!==null&&this.#e.kind==="composing"&&(Cr(this.renderRoot.querySelector(".comment-pop")),this.#l=!1),this.requestUpdate()}#T(){this.#t=null,this.#u=null}#z(){const t=this.renderRoot.querySelector(".stage");if(!(this.#t===null||!t||typeof t.showPopover!="function")&&t!==this.#u){this.#u=t;try{t.showPopover()}catch{}}}#Y=t=>{const r=this.renderRoot.querySelector(".canvas");(r===null||!t.composedPath().includes(r))&&t.preventDefault()};#U(t,r){const i=jt(t.state,t.navigation);this.#r=this.#r===null?i===null?null:$i(i):Ht(this.#r,{kind:"observe",page:i});const n=this.#r;if(n===null)return null;const o=oe(n),s=o?.kind!=="page"&&n.seen!==null;if(i===null&&!s)return null;const a=Oi(n)??i;return{view:Zt(t.state,n,r,a),shortcuts:o?.kind==="new-tab"?Ci(t.state,a):[],switcher:this.#d,send:p=>this.#B(p)}}#n(t){if(this.#r===null)return;const r=Ht(this.#r,t);if(r===this.#r)return;this.#r=r;const i=oe(r);i?.kind==="page"&&this.#W(i.page),this.requestUpdate()}#W(t){this.navigate({screen:t.screen??null,preview:t.preview??null})}#B(t){switch(t.kind){case"reload":this.#H();return;case"address":this.#G(t.input);return;case"back":case"forward":case"new-tab":this.#d=!1,this.#n({kind:t.kind});return;case"switcher":this.#d=t.open,this.requestUpdate();return;case"activate":this.#d=!1,this.#c=t.focus===!0,this.#n({kind:"activate",id:t.id}),this.requestUpdate();return;case"close-tab":this.#n({kind:t.kind,id:t.id});return;case"visit":this.#n({kind:"visit",page:t.page});return;default:return}}#G(t){const r=this.#r;if(r===null)return;const i=this.derivation.state,n=Zt(i,r,ve(this.locale)).url||"https://page.example.com/",o=_i(i,t,n);if(o!==null){this.#n({kind:"visit",page:o});return}const s=t.trim(),a=s.startsWith("/")?new URL(s,n).href:/^[a-z][a-z0-9+.-]*:\/\//i.test(s)?s:`https://${s}`;this.#n({kind:"unreachable",url:a})}#H(){if(this.#i!==null)return;const t=setTimeout(()=>{this.#i=null;for(const r of this.#k()){for(const i of r.querySelectorAll("form"))i.reset();for(const i of r.querySelectorAll("dialog"))i.close();r.scrollTop=0,r.dispatchEvent(new CustomEvent("dpk-reload",{bubbles:!0}))}this.renderRoot.querySelector(".browser .viewport")?.scrollTo?.({top:0}),this.requestUpdate()},wn);this.#i={page:this.#o.join(" "),timer:t},this.requestUpdate()}#I(){this.#i!==null&&(clearTimeout(this.#i.timer),this.#i=null)}#p=t=>{if(!this.#b||this.#e.kind!=="off"||this.#r===null||t.type==="auxclick"&&t.button!==1)return;const r=this.#j(t);if(r===null)return;const i=t.metaKey||t.ctrlKey||t.button===1;if(!r.blank&&!i)return;t.preventDefault(),t.stopPropagation();const n=jt(this.derivation.state,Se(this.hashFor(r.patch)));if(n===null){i||this.navigate(r.patch);return}this.#n({kind:"open-tab",entry:{kind:"page",page:n},background:i})};#j(t){const r=t.composedPath();if(!r.some(n=>n instanceof Element&&n.parentElement===this&&n.hasAttribute("data-preview-id")))return null;for(const n of r){if(!(n instanceof Element)||n===this)break;const o=n.getAttribute("data-dpk-navigate"),s=n instanceof HTMLAnchorElement?n.getAttribute("href"):null,a=o??(s?.startsWith("#")?s:null);if(a===null)continue;const p=o!==null&&!o.includes("=")?`step=${o}`:a;return{patch:{...Se(p)},blank:n.getAttribute("target")==="_blank"}}return null}#q(t){return Array.from(this.querySelectorAll("[data-preview-id]")).some(r=>r.getAttribute("data-preview-id")===t)}}const ur=()=>{customElements.get("dpk-template-prototype")||customElements.define("dpk-template-prototype",cr)},xn=Object.freeze(Object.defineProperty({__proto__:null,DpkTemplatePrototype:cr,VIEWPORT_MIN_HEIGHT:We,VIEWPORT_WIDTH:Ue,allScreens:z,allStepIds:ut,applyPrototypeAction:ht,definePrototypeElement:ur,describePrototypeAction:gt,emptyPrototypeBase:lt,findActivity:O,findPreview:T,findScreen:D,findStep:k,findStory:$,flattenSteps:Y,parsePrototypeBase:pt,prototypeAction:ee,prototypeActions:g,prototypeBaseSchema:ot,prototypeCommentTargets:It,prototypeDefinitionFor:Lt,prototypeMessages:ve,prototypePageHeading:At,prototypeTargetLabel:wt,prototypeTitle:Ve,renderFrame:Ge,renderNav:Qt,renderStage:sr,resolvePrototypeNavigation:we,serializePrototypeAction:bt},Symbol.toStringTag,{value:"Module"}));export{ur as d,xn as i};
|