@dmthepm/commune 0.1.0
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/LICENSE +21 -0
- package/README.md +468 -0
- package/bin/commune.mjs +29 -0
- package/lib/cli/check.d.ts +13 -0
- package/lib/cli/check.js +58 -0
- package/lib/cli/errors.d.ts +29 -0
- package/lib/cli/errors.js +41 -0
- package/lib/cli/gate.d.ts +34 -0
- package/lib/cli/gate.js +165 -0
- package/lib/cli/main.d.ts +20 -0
- package/lib/cli/main.js +175 -0
- package/lib/cli/query.d.ts +30 -0
- package/lib/cli/query.js +103 -0
- package/lib/cli/related.d.ts +17 -0
- package/lib/cli/related.js +177 -0
- package/lib/cli/render.d.ts +20 -0
- package/lib/cli/render.js +32 -0
- package/lib/cli/root.d.ts +11 -0
- package/lib/cli/root.js +28 -0
- package/lib/cli/usage.d.ts +3 -0
- package/lib/cli/usage.js +46 -0
- package/lib/cli/version.d.ts +24 -0
- package/lib/cli/version.js +29 -0
- package/lib/integration.d.ts +24 -0
- package/lib/integration.js +111 -0
- package/lib/lib/graph.d.ts +354 -0
- package/lib/lib/graph.js +774 -0
- package/lib/markdown.d.ts +30 -0
- package/lib/markdown.js +24 -0
- package/lib/rehype-external-links.d.ts +15 -0
- package/lib/rehype-external-links.js +46 -0
- package/lib/remark-wikilinks.d.ts +25 -0
- package/lib/remark-wikilinks.js +108 -0
- package/package.json +101 -0
- package/src/components/Backlinks.astro +17 -0
- package/src/components/BacklinksScript.astro +117 -0
- package/src/components/Footer.astro +35 -0
- package/src/components/Header.astro +250 -0
- package/src/components/HeaderStarScript.astro +380 -0
- package/src/components/HomeFooterCards.astro +155 -0
- package/src/components/MarkdownLink.astro +36 -0
- package/src/components/PlausibleScript.astro +13 -0
- package/src/components/RelatedNotes.astro +77 -0
- package/src/components/SearchModal.astro +213 -0
- package/src/components/StarredLinksScript.astro +92 -0
- package/src/components/panes.ts +61 -0
- package/src/styles/design-system.css +157 -0
- package/src/styles/notes.css +85 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commune Design System
|
|
3
|
+
* Clean, modern, with light/dark mode support
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* Only import Tailwind utilities - NOT base (which resets everything) */
|
|
7
|
+
@tailwind utilities;
|
|
8
|
+
|
|
9
|
+
:root {
|
|
10
|
+
/* Light mode colors */
|
|
11
|
+
--c-bg: #ffffff;
|
|
12
|
+
--c-bg-soft: #f8f9fa;
|
|
13
|
+
--c-bg-muted: #e9ecef;
|
|
14
|
+
--c-text: #1a1a1a;
|
|
15
|
+
--c-text-muted: #6c757d;
|
|
16
|
+
--c-text-accent: #495057;
|
|
17
|
+
--c-border: rgba(0, 0, 0, 0.08);
|
|
18
|
+
--c-border-focus: rgba(0, 0, 0, 0.2);
|
|
19
|
+
|
|
20
|
+
/* Accent colors - vibrant but tasteful */
|
|
21
|
+
--c-accent: #5b7ff9;
|
|
22
|
+
--c-accent-hover: #4a6ed8;
|
|
23
|
+
--c-accent-soft: rgba(91, 127, 249, 0.1);
|
|
24
|
+
--c-accent-border: rgba(91, 127, 249, 0.3);
|
|
25
|
+
|
|
26
|
+
/* Shadows */
|
|
27
|
+
--c-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
|
|
28
|
+
--c-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
|
|
29
|
+
--c-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
|
|
30
|
+
--c-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
|
|
31
|
+
|
|
32
|
+
/* Z-index scale */
|
|
33
|
+
--z-header: 50;
|
|
34
|
+
--z-panes: 40;
|
|
35
|
+
--z-hover: 110;
|
|
36
|
+
--z-modal-shade: 100;
|
|
37
|
+
--z-modal: 101;
|
|
38
|
+
|
|
39
|
+
/* Border radius */
|
|
40
|
+
--c-radius-sm: 0.5rem;
|
|
41
|
+
--c-radius-md: 0.75rem;
|
|
42
|
+
--c-radius-lg: 1rem;
|
|
43
|
+
|
|
44
|
+
/* Spacing */
|
|
45
|
+
--c-space-xs: 0.25rem;
|
|
46
|
+
--c-space-sm: 0.5rem;
|
|
47
|
+
--c-space-md: 1rem;
|
|
48
|
+
--c-space-lg: 1.5rem;
|
|
49
|
+
--c-space-xl: 2rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Dark mode via data-theme attribute or system preference */
|
|
53
|
+
@media (prefers-color-scheme: dark) {
|
|
54
|
+
:root:not([data-theme="light"]) {
|
|
55
|
+
--c-bg: #0f0f0f;
|
|
56
|
+
--c-bg-soft: #1a1a1a;
|
|
57
|
+
--c-bg-muted: #252525;
|
|
58
|
+
--c-text: #e4e4e4;
|
|
59
|
+
--c-text-muted: #a1a1a1;
|
|
60
|
+
--c-text-accent: #c4c4c4;
|
|
61
|
+
--c-border: rgba(255, 255, 255, 0.1);
|
|
62
|
+
--c-border-focus: rgba(255, 255, 255, 0.25);
|
|
63
|
+
|
|
64
|
+
--c-accent: #7089ff;
|
|
65
|
+
--c-accent-hover: #8a9eff;
|
|
66
|
+
--c-accent-soft: rgba(112, 137, 255, 0.15);
|
|
67
|
+
--c-accent-border: rgba(112, 137, 255, 0.4);
|
|
68
|
+
|
|
69
|
+
--c-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
70
|
+
--c-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
|
|
71
|
+
--c-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
|
|
72
|
+
--c-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:root[data-theme="dark"] {
|
|
77
|
+
--c-bg: #0f0f0f;
|
|
78
|
+
--c-bg-soft: #1a1a1a;
|
|
79
|
+
--c-bg-muted: #252525;
|
|
80
|
+
--c-text: #e4e4e4;
|
|
81
|
+
--c-text-muted: #a1a1a1;
|
|
82
|
+
--c-text-accent: #c4c4c4;
|
|
83
|
+
--c-border: rgba(255, 255, 255, 0.1);
|
|
84
|
+
--c-border-focus: rgba(255, 255, 255, 0.25);
|
|
85
|
+
|
|
86
|
+
--c-accent: #7089ff;
|
|
87
|
+
--c-accent-hover: #8a9eff;
|
|
88
|
+
--c-accent-soft: rgba(112, 137, 255, 0.15);
|
|
89
|
+
--c-accent-border: rgba(112, 137, 255, 0.4);
|
|
90
|
+
|
|
91
|
+
--c-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
92
|
+
--c-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
|
|
93
|
+
--c-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
|
|
94
|
+
--c-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Global resets and base styles */
|
|
98
|
+
* {
|
|
99
|
+
box-sizing: border-box;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
body {
|
|
103
|
+
margin: 0;
|
|
104
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
105
|
+
background: var(--c-bg);
|
|
106
|
+
color: var(--c-text);
|
|
107
|
+
line-height: 1.6;
|
|
108
|
+
transition: background-color 0.2s ease, color 0.2s ease;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
a {
|
|
112
|
+
color: var(--c-accent);
|
|
113
|
+
text-decoration: none;
|
|
114
|
+
cursor: pointer;
|
|
115
|
+
transition: color 0.15s ease;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
a:hover {
|
|
119
|
+
color: var(--c-accent-hover);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
button {
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
font-family: inherit;
|
|
125
|
+
transition: all 0.15s ease;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* Scroll lock utilities */
|
|
129
|
+
body.panes-open,
|
|
130
|
+
body.modal-open {
|
|
131
|
+
overflow: hidden;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* Every link that opens a new tab carries the same external-link marker.
|
|
135
|
+
This is a design-system invariant: one rule, globally, so no page or
|
|
136
|
+
component has to remember to add its own. */
|
|
137
|
+
|
|
138
|
+
/* The marker must never wrap onto its own line, orphaned from the label it
|
|
139
|
+
belongs to. `nowrap` has to come before the ::after rule that creates it. */
|
|
140
|
+
a[target="_blank"] {
|
|
141
|
+
white-space: nowrap;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
a[target="_blank"]::after {
|
|
145
|
+
content: "↗";
|
|
146
|
+
display: inline-block;
|
|
147
|
+
margin-left: 0.25rem;
|
|
148
|
+
font-size: 0.8em;
|
|
149
|
+
line-height: 1;
|
|
150
|
+
opacity: 0.6;
|
|
151
|
+
transition: opacity 0.15s ease;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
a[target="_blank"]:hover::after {
|
|
155
|
+
opacity: 1;
|
|
156
|
+
}
|
|
157
|
+
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Andy-style note typography and styling.
|
|
3
|
+
*
|
|
4
|
+
* Goals:
|
|
5
|
+
* - Generous white space
|
|
6
|
+
* - Readable line length (65ch)
|
|
7
|
+
* - Subtle link underlines
|
|
8
|
+
* - Dense but not cramped
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/* Link styling is now handled in page-specific styles */
|
|
12
|
+
/* Removed conflicting Starlight variables */
|
|
13
|
+
|
|
14
|
+
.prose h2, .prose h3 {
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
line-height: 1.3;
|
|
17
|
+
margin-top: 2em;
|
|
18
|
+
margin-bottom: 0.75em;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.prose p {
|
|
22
|
+
margin-top: 1.25em;
|
|
23
|
+
margin-bottom: 1.25em;
|
|
24
|
+
line-height: 1.7;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.prose ul, .prose ol {
|
|
28
|
+
margin-top: 1.25em;
|
|
29
|
+
margin-bottom: 1.25em;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.prose li {
|
|
33
|
+
margin-top: 0.5em;
|
|
34
|
+
margin-bottom: 0.5em;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Status badges */
|
|
38
|
+
.status-badge {
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
padding: 0.25rem 0.75rem;
|
|
42
|
+
font-size: 0.75rem;
|
|
43
|
+
font-weight: 500;
|
|
44
|
+
border-radius: 9999px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Backlinks and related notes styling */
|
|
48
|
+
.backlinks, .related-notes {
|
|
49
|
+
position: sticky;
|
|
50
|
+
top: 6rem;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.backlinks a, .related-notes a {
|
|
54
|
+
transition: all 0.15s ease;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Mobile responsiveness */
|
|
58
|
+
@media (max-width: 1023px) {
|
|
59
|
+
.backlinks, .related-notes {
|
|
60
|
+
position: static;
|
|
61
|
+
margin-top: 3rem;
|
|
62
|
+
padding-top: 2rem;
|
|
63
|
+
border-top: 1px solid var(--c-border);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Scroll lock when panes or modal are open */
|
|
68
|
+
body.panes-open, body.modal-open {
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Research link styling - opens in new tab */
|
|
73
|
+
a.research-link::after {
|
|
74
|
+
content: "↗";
|
|
75
|
+
display: inline-block;
|
|
76
|
+
margin-left: 0.25rem;
|
|
77
|
+
font-size: 0.8em;
|
|
78
|
+
opacity: 0.6;
|
|
79
|
+
transition: opacity 0.15s ease;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
a.research-link:hover::after {
|
|
83
|
+
opacity: 1;
|
|
84
|
+
}
|
|
85
|
+
|