Skip to content

Commit 4e379a1

Browse files
committed
improve Modules_Detail
1 parent e443302 commit 4e379a1

5 files changed

Lines changed: 71 additions & 47 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@ryanatkn/orc': patch
3+
---
4+
5+
improve `Modules_Detail`

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"description": "a tool for orchestrating many repos",
44
"version": "0.10.3",
55
"public": true,
6+
"icon": "🪄",
67
"license": "MIT",
78
"homepage": "https://orc.ryanatkn.com/",
89
"repository": "https://github.com/ryanatkn/orc",
@@ -32,7 +33,7 @@
3233
"@fuz.dev/fuz": "^0.79.1",
3334
"@fuz.dev/fuz_contextmenu": "^0.6.0",
3435
"@fuz.dev/fuz_dialog": "^0.5.0",
35-
"@fuz.dev/fuz_library": "^0.19.1",
36+
"@fuz.dev/fuz_library": "^0.19.2",
3637
"@grogarden/gro": "^0.100.1",
3738
"@grogarden/util": "^0.16.0",
3839
"@octokit/request": "^8.1.4",

src/lib/Modules_Detail.svelte

Lines changed: 58 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -44,50 +44,50 @@
4444
<div class="menu_wrapper">
4545
<Modules_Menu {pkgs_modules} />
4646
</div>
47-
<ul class="width_md">
47+
<ul class="width_md box">
4848
{#each pkgs_modules as pkg_modules (pkg_modules)}
4949
{@const {pkg, modules} = pkg_modules}
50-
<div class="width_md relative">
51-
<a href="#{pkg.name}" id={pkg.name} class="subtitle">🔗</a>
52-
</div>
53-
<ul>
54-
{#each modules as pkg_module (pkg_module)}
55-
{@const {path, declarations} = pkg_module}
56-
<li
57-
class="module"
58-
class:ts={path.endsWith('.ts')}
59-
class:svelte={path.endsWith('.svelte')}
60-
class:css={path.endsWith('.css')}
61-
class:json={path.endsWith('.json')}
62-
>
63-
<div>
64-
{#if pkg.repo_url}
65-
<div class="chip row">
66-
<a href="{base}/tree/{pkg.repo_name}">{pkg.name}</a>/<a
67-
href="{ensure_end(pkg.repo_url, '/')}blob/main/src/lib/{path}">{path}</a
50+
<li class="pkg_module">
51+
<header class="width_full relative">
52+
<a href="#{pkg.name}" id={pkg.name} class="subtitle">🔗</a>
53+
<a href="{base}/tree/{pkg.repo_name}">{pkg.name}</a>
54+
</header>
55+
<ul class="modules panel">
56+
{#each modules as pkg_module (pkg_module)}
57+
{@const {path, declarations} = pkg_module}
58+
<li
59+
class="module"
60+
class:ts={path.endsWith('.ts')}
61+
class:svelte={path.endsWith('.svelte')}
62+
class:css={path.endsWith('.css')}
63+
class:json={path.endsWith('.json')}
64+
>
65+
<div>
66+
{#if pkg.repo_url}
67+
<div class="chip row">
68+
<a href="{ensure_end(pkg.repo_url, '/')}blob/main/src/lib/{path}">{path}</a>
69+
</div>
70+
{:else}
71+
<span class="chip">{path}</span>
72+
{/if}
73+
</div>
74+
<ul class="declarations">
75+
{#each declarations as { name, kind }}
76+
<li
77+
class="declaration chip"
78+
class:variable_declaration={kind === 'VariableDeclaration'}
79+
class:type_declaration={kind === 'InterfaceDeclaration' ||
80+
kind === 'TypeAliasDeclaration'}
81+
class:class_declaration={kind === 'ClassDeclaration'}
6882
>
69-
</div>
70-
{:else}
71-
<span class="chip"><a href="{base}/tree/{pkg.repo_name}">{pkg.name}</a>/{path}</span
72-
>
73-
{/if}
74-
</div>
75-
<ul class="declarations">
76-
{#each declarations as { name, kind }}
77-
<li
78-
class="declaration chip"
79-
class:variable_declaration={kind === 'VariableDeclaration'}
80-
class:type_declaration={kind === 'InterfaceDeclaration' ||
81-
kind === 'TypeAliasDeclaration'}
82-
class:class_declaration={kind === 'ClassDeclaration'}
83-
>
84-
{name}
85-
</li>
86-
{/each}
87-
</ul>
88-
</li>
89-
{/each}
90-
</ul>
83+
{name}
84+
</li>
85+
{/each}
86+
</ul>
87+
</li>
88+
{/each}
89+
</ul>
90+
</li>
9191
{/each}
9292
</ul>
9393
</div>
@@ -110,6 +110,23 @@
110110
top: 0;
111111
text-align: right;
112112
}
113+
.pkg_module {
114+
display: flex;
115+
flex-direction: column;
116+
margin-bottom: var(--spacing_5);
117+
}
118+
.pkg_module > header {
119+
display: flex;
120+
padding: var(--spacing_xs) var(--spacing_md);
121+
font-size: var(--size_lg);
122+
position: sticky;
123+
top: 0;
124+
background-color: var(--bg);
125+
}
126+
.modules {
127+
/* TODO delete? */
128+
padding: var(--spacing_sm);
129+
}
113130
.module {
114131
margin-bottom: var(--spacing_xs);
115132
--link_color: var(--text_2);

src/lib/package.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const package_json = {
77
description: 'a tool for orchestrating many repos',
88
version: '0.10.3',
99
public: true,
10+
icon: '🪄',
1011
license: 'MIT',
1112
homepage: 'https://orc.ryanatkn.com/',
1213
repository: 'https://github.com/ryanatkn/orc',
@@ -27,7 +28,7 @@ export const package_json = {
2728
'@fuz.dev/fuz': '^0.79.1',
2829
'@fuz.dev/fuz_contextmenu': '^0.6.0',
2930
'@fuz.dev/fuz_dialog': '^0.5.0',
30-
'@fuz.dev/fuz_library': '^0.19.1',
31+
'@fuz.dev/fuz_library': '^0.19.2',
3132
'@grogarden/gro': '^0.100.1',
3233
'@grogarden/util': '^0.16.0',
3334
'@octokit/request': '^8.1.4',

0 commit comments

Comments
 (0)