@lapis-notes/workspace 0.1.0 → 0.2.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/CHANGELOG.md +26 -0
- package/LICENSE.md +3 -3
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/plugin-management/CommunityPluginsSettingsPage.svelte +152 -73
- package/dist/plugin-management/PluginBrowser.svelte +517 -0
- package/dist/plugin-management/PluginBrowser.svelte.d.ts +17 -0
- package/dist/plugin-management/PluginBrowserCard.svelte +230 -0
- package/dist/plugin-management/PluginBrowserCard.svelte.d.ts +9 -0
- package/dist/plugin-management/PluginBrowserDetail.svelte +1168 -0
- package/dist/plugin-management/PluginBrowserDetail.svelte.d.ts +20 -0
- package/dist/plugin-management/PluginBrowserDirectory.svelte +1069 -0
- package/dist/plugin-management/PluginBrowserDirectory.svelte.d.ts +21 -0
- package/dist/plugin-management/PluginBrowserLanding.svelte +341 -0
- package/dist/plugin-management/PluginBrowserLanding.svelte.d.ts +12 -0
- package/dist/plugin-management/PluginRegistryBadge.svelte +41 -0
- package/dist/plugin-management/PluginRegistryBadge.svelte.d.ts +8 -0
- package/dist/plugin-management/PluginRegistryContentState.svelte +80 -0
- package/dist/plugin-management/PluginRegistryContentState.svelte.d.ts +14 -0
- package/dist/plugin-management/PluginRegistryImage.svelte +64 -0
- package/dist/plugin-management/PluginRegistryImage.svelte.d.ts +9 -0
- package/dist/plugin-management/PluginRegistryMedia.svelte +223 -0
- package/dist/plugin-management/PluginRegistryMedia.svelte.d.ts +8 -0
- package/dist/plugin-management/PluginRegistryMediaViewer.svelte +155 -0
- package/dist/plugin-management/PluginRegistryMediaViewer.svelte.d.ts +13 -0
- package/dist/plugin-management/PluginRegistryRow.svelte +120 -0
- package/dist/plugin-management/PluginRegistryRow.svelte.d.ts +25 -0
- package/dist/plugin-management/PluginRegistrySettingsPage.svelte +1009 -512
- package/dist/plugin-management/PluginRegistryStatus.svelte +33 -0
- package/dist/plugin-management/PluginRegistryStatus.svelte.d.ts +8 -0
- package/dist/plugin-management/PluginRegistryToolbar.svelte +159 -0
- package/dist/plugin-management/PluginRegistryToolbar.svelte.d.ts +21 -0
- package/dist/plugin-management/community-presentation/CommunityChip.svelte +229 -0
- package/dist/plugin-management/community-presentation/CommunityChip.svelte.d.ts +4 -0
- package/dist/plugin-management/community-presentation/CommunityMemberAvatar.svelte +42 -0
- package/dist/plugin-management/community-presentation/CommunityMemberAvatar.svelte.d.ts +13 -0
- package/dist/plugin-management/community-presentation/RegistryMediaGallery.svelte +282 -0
- package/dist/plugin-management/community-presentation/RegistryMediaGallery.svelte.d.ts +8 -0
- package/dist/plugin-management/community-presentation/RegistryMediaViewer.css +179 -0
- package/dist/plugin-management/community-presentation/RegistryMediaViewer.svelte +241 -0
- package/dist/plugin-management/community-presentation/RegistryMediaViewer.svelte.d.ts +14 -0
- package/dist/plugin-management/community-presentation/RegistryPluginChangelog.svelte +216 -0
- package/dist/plugin-management/community-presentation/RegistryPluginChangelog.svelte.d.ts +8 -0
- package/dist/plugin-management/community-presentation/RegistryVerifiedImage.svelte +179 -0
- package/dist/plugin-management/community-presentation/RegistryVerifiedImage.svelte.d.ts +15 -0
- package/dist/plugin-management/community-presentation/avatar-model.d.ts +14 -0
- package/dist/plugin-management/community-presentation/avatar-model.js +21 -0
- package/dist/plugin-management/community-presentation/community-member-avatar.css +137 -0
- package/dist/plugin-management/community-presentation/community-typography.css +30 -0
- package/dist/plugin-management/community-presentation/model-adapter.d.ts +54 -0
- package/dist/plugin-management/community-presentation/model-adapter.js +90 -0
- package/dist/plugin-management/community-presentation/model.d.ts +9 -0
- package/dist/plugin-management/community-presentation/model.js +40 -0
- package/dist/plugin-management/community-presentation/props.d.ts +21 -0
- package/dist/plugin-management/community-presentation/props.js +1 -0
- package/dist/plugin-management/community-presentation/registry-filter-icons.d.ts +3 -0
- package/dist/plugin-management/community-presentation/registry-filter-icons.js +70 -0
- package/dist/plugin-management/community-presentation/registry-markdown.d.ts +1 -0
- package/dist/plugin-management/community-presentation/registry-markdown.js +57 -0
- package/dist/plugin-management/community-presentation/registry-plugin-icons.d.ts +2 -0
- package/dist/plugin-management/community-presentation/registry-plugin-icons.js +31 -0
- package/dist/plugin-management/plugin-browser-model.d.ts +43 -0
- package/dist/plugin-management/plugin-browser-model.js +95 -0
- package/dist/plugin-management/plugin-browser-navigation.d.ts +3 -0
- package/dist/plugin-management/plugin-browser-navigation.js +36 -0
- package/dist/plugin-management/plugin-download-stats.d.ts +1 -0
- package/dist/plugin-management/plugin-download-stats.js +15 -0
- package/dist/plugin-management/plugin-management.css +1088 -117
- package/dist/plugin-management/plugin-registry-controller.svelte.d.ts +29 -0
- package/dist/plugin-management/plugin-registry-controller.svelte.js +154 -0
- package/dist/plugin-management/plugin-registry-detail-session.svelte.d.ts +18 -0
- package/dist/plugin-management/plugin-registry-detail-session.svelte.js +106 -0
- package/dist/plugin-management/plugin-registry-detail.d.ts +17 -0
- package/dist/plugin-management/plugin-registry-detail.js +1 -0
- package/dist/plugin-management/plugins-view.svelte.d.ts +40 -0
- package/dist/plugin-management/plugins-view.svelte.js +105 -0
- package/package.json +5 -5
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import BookmarkIcon from "@lucide/svelte/icons/bookmark";
|
|
3
|
+
import FileTextIcon from "@lucide/svelte/icons/file-text";
|
|
4
|
+
import HistoryIcon from "@lucide/svelte/icons/history";
|
|
5
|
+
import NetworkIcon from "@lucide/svelte/icons/network";
|
|
6
|
+
import PackageIcon from "@lucide/svelte/icons/package";
|
|
7
|
+
import PresentationIcon from "@lucide/svelte/icons/presentation";
|
|
8
|
+
import SearchIcon from "@lucide/svelte/icons/search";
|
|
9
|
+
import SparklesIcon from "@lucide/svelte/icons/sparkles";
|
|
10
|
+
import Table2Icon from "@lucide/svelte/icons/table-2";
|
|
11
|
+
|
|
12
|
+
import {
|
|
13
|
+
formatRegistryBytes,
|
|
14
|
+
registryStatusLabel,
|
|
15
|
+
titleCaseRegistryValue,
|
|
16
|
+
} from "./community-presentation/model-adapter";
|
|
17
|
+
import type { PluginCatalogEntry as RegistryCatalogEntry } from "@lapis-notes/api";
|
|
18
|
+
import CommunityChip from "./community-presentation/CommunityChip.svelte";
|
|
19
|
+
import { communityChipToneForState } from "./community-presentation/model.js";
|
|
20
|
+
import RegistryVerifiedImage from "./community-presentation/RegistryVerifiedImage.svelte";
|
|
21
|
+
|
|
22
|
+
let {
|
|
23
|
+
plugin,
|
|
24
|
+
variant = "card",
|
|
25
|
+
onOpen,
|
|
26
|
+
}: {
|
|
27
|
+
plugin: RegistryCatalogEntry;
|
|
28
|
+
variant?: "card" | "list" | "compact";
|
|
29
|
+
onOpen: (plugin: RegistryCatalogEntry) => void;
|
|
30
|
+
} = $props();
|
|
31
|
+
|
|
32
|
+
import { imageReference } from "./community-presentation/model-adapter";
|
|
33
|
+
const fallbackIcon = $derived(
|
|
34
|
+
plugin.appearance?.icon ?? plugin.categories[0],
|
|
35
|
+
);
|
|
36
|
+
const PluginIcon = $derived(
|
|
37
|
+
fallbackIcon === "sparkles" || fallbackIcon === "ai"
|
|
38
|
+
? SparklesIcon
|
|
39
|
+
: fallbackIcon === "table-2" || fallbackIcon === "data"
|
|
40
|
+
? Table2Icon
|
|
41
|
+
: fallbackIcon === "bookmark"
|
|
42
|
+
? BookmarkIcon
|
|
43
|
+
: fallbackIcon === "network" || fallbackIcon === "graph"
|
|
44
|
+
? NetworkIcon
|
|
45
|
+
: fallbackIcon === "history"
|
|
46
|
+
? HistoryIcon
|
|
47
|
+
: fallbackIcon === "search"
|
|
48
|
+
? SearchIcon
|
|
49
|
+
: fallbackIcon === "presentation"
|
|
50
|
+
? PresentationIcon
|
|
51
|
+
: fallbackIcon === "file-text" || fallbackIcon === "markdown"
|
|
52
|
+
? FileTextIcon
|
|
53
|
+
: PackageIcon,
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
function openPlugin(event: MouseEvent): void {
|
|
57
|
+
if (
|
|
58
|
+
event.button !== 0 ||
|
|
59
|
+
event.metaKey ||
|
|
60
|
+
event.ctrlKey ||
|
|
61
|
+
event.shiftKey ||
|
|
62
|
+
event.altKey
|
|
63
|
+
)
|
|
64
|
+
return;
|
|
65
|
+
event.preventDefault();
|
|
66
|
+
onOpen(plugin);
|
|
67
|
+
}
|
|
68
|
+
</script>
|
|
69
|
+
|
|
70
|
+
{#snippet pluginIcon()}
|
|
71
|
+
<PluginIcon aria-hidden="true" />
|
|
72
|
+
{/snippet}
|
|
73
|
+
|
|
74
|
+
<a
|
|
75
|
+
href={`#/registry/plugins/${encodeURIComponent(plugin.id)}`}
|
|
76
|
+
class="registry-plugin-card"
|
|
77
|
+
data-variant={variant}
|
|
78
|
+
aria-label={`Open ${plugin.name}`}
|
|
79
|
+
onclick={openPlugin}
|
|
80
|
+
>
|
|
81
|
+
<span
|
|
82
|
+
class="registry-plugin-card__identity"
|
|
83
|
+
style:--registry-plugin-accent={plugin.appearance?.accent ??
|
|
84
|
+
"var(--primary)"}
|
|
85
|
+
>
|
|
86
|
+
{#if plugin.appearance?.logo}
|
|
87
|
+
<RegistryVerifiedImage
|
|
88
|
+
reference={imageReference(plugin.appearance.logo)}
|
|
89
|
+
alt={plugin.appearance.logo.alt}
|
|
90
|
+
fallback={pluginIcon}
|
|
91
|
+
loading="lazy"
|
|
92
|
+
/>
|
|
93
|
+
{:else}
|
|
94
|
+
<PluginIcon aria-hidden="true" />
|
|
95
|
+
{/if}
|
|
96
|
+
</span>
|
|
97
|
+
<span class="registry-plugin-card__content">
|
|
98
|
+
<span class="registry-plugin-card__title">{plugin.name}</span>
|
|
99
|
+
<span class="registry-plugin-card__description">{plugin.description}</span>
|
|
100
|
+
{#if variant !== "compact"}
|
|
101
|
+
<span class="registry-plugin-card__metadata">
|
|
102
|
+
<span>{plugin.latestVersion}</span>
|
|
103
|
+
{#if plugin.latestRelease}
|
|
104
|
+
<span>{formatRegistryBytes(plugin.latestRelease.bundleSize)}</span>
|
|
105
|
+
{/if}
|
|
106
|
+
<span>{plugin.platforms.map(titleCaseRegistryValue).join(", ")}</span>
|
|
107
|
+
</span>
|
|
108
|
+
<span class="registry-plugin-card__categories" aria-label="Plugin tags">
|
|
109
|
+
<CommunityChip
|
|
110
|
+
tone={communityChipToneForState(plugin.status ?? "active")}
|
|
111
|
+
>{registryStatusLabel(plugin.status)}</CommunityChip
|
|
112
|
+
>
|
|
113
|
+
{#each plugin.categories.slice(0, 3) as category}
|
|
114
|
+
<CommunityChip>{titleCaseRegistryValue(category)}</CommunityChip>
|
|
115
|
+
{/each}
|
|
116
|
+
</span>
|
|
117
|
+
{/if}
|
|
118
|
+
</span>
|
|
119
|
+
</a>
|
|
120
|
+
|
|
121
|
+
<style>
|
|
122
|
+
.registry-plugin-card {
|
|
123
|
+
display: grid;
|
|
124
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
125
|
+
width: 100%;
|
|
126
|
+
gap: 0.85rem;
|
|
127
|
+
border: 1px solid var(--border);
|
|
128
|
+
border-radius: calc(var(--radius) * 1.35);
|
|
129
|
+
padding: 1rem;
|
|
130
|
+
color: var(--foreground);
|
|
131
|
+
background: color-mix(in srgb, var(--card) 94%, transparent);
|
|
132
|
+
text-align: start;
|
|
133
|
+
text-decoration: none;
|
|
134
|
+
cursor: pointer;
|
|
135
|
+
transition:
|
|
136
|
+
border-color 150ms ease,
|
|
137
|
+
background 150ms ease,
|
|
138
|
+
transform 150ms ease;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.registry-plugin-card[data-variant="compact"] {
|
|
142
|
+
border: 0;
|
|
143
|
+
border-radius: var(--radius);
|
|
144
|
+
padding: 0.65rem;
|
|
145
|
+
background: transparent;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.registry-plugin-card[data-variant="list"] {
|
|
149
|
+
border-color: transparent;
|
|
150
|
+
border-radius: calc(var(--radius) * 1.2);
|
|
151
|
+
background: color-mix(in srgb, var(--secondary) 64%, transparent);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.registry-plugin-card:hover,
|
|
155
|
+
.registry-plugin-card:focus-visible {
|
|
156
|
+
border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
|
|
157
|
+
background: var(--accent);
|
|
158
|
+
outline: none;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.registry-plugin-card[data-variant="card"]:hover {
|
|
162
|
+
transform: translateY(-1px);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.registry-plugin-card__identity {
|
|
166
|
+
display: grid;
|
|
167
|
+
width: 2.75rem;
|
|
168
|
+
height: 2.75rem;
|
|
169
|
+
place-items: center;
|
|
170
|
+
overflow: hidden;
|
|
171
|
+
border: 1px solid
|
|
172
|
+
color-mix(in srgb, var(--registry-plugin-accent) 38%, var(--border));
|
|
173
|
+
border-radius: calc(var(--radius) * 1.1);
|
|
174
|
+
color: var(--registry-plugin-accent);
|
|
175
|
+
background: color-mix(
|
|
176
|
+
in srgb,
|
|
177
|
+
var(--registry-plugin-accent) 14%,
|
|
178
|
+
var(--muted)
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.registry-plugin-card__identity :global(svg) {
|
|
183
|
+
width: 1.35rem;
|
|
184
|
+
height: 1.35rem;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.registry-plugin-card__identity :global(img) {
|
|
188
|
+
width: 100%;
|
|
189
|
+
height: 100%;
|
|
190
|
+
object-fit: cover;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.registry-plugin-card__content {
|
|
194
|
+
display: grid;
|
|
195
|
+
min-width: 0;
|
|
196
|
+
gap: 0.35rem;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.registry-plugin-card__title {
|
|
200
|
+
font-weight: 700;
|
|
201
|
+
line-height: 1.2;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.registry-plugin-card__description {
|
|
205
|
+
display: -webkit-box;
|
|
206
|
+
overflow: hidden;
|
|
207
|
+
color: var(--muted-foreground);
|
|
208
|
+
font-size: var(--community-text-body);
|
|
209
|
+
line-height: 1.35;
|
|
210
|
+
-webkit-box-orient: vertical;
|
|
211
|
+
-webkit-line-clamp: 2;
|
|
212
|
+
line-clamp: 2;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.registry-plugin-card[data-variant="compact"]
|
|
216
|
+
.registry-plugin-card__description {
|
|
217
|
+
-webkit-line-clamp: 1;
|
|
218
|
+
line-clamp: 1;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.registry-plugin-card__metadata,
|
|
222
|
+
.registry-plugin-card__categories {
|
|
223
|
+
display: flex;
|
|
224
|
+
flex-wrap: wrap;
|
|
225
|
+
align-items: center;
|
|
226
|
+
gap: 0.4rem 0.65rem;
|
|
227
|
+
color: var(--muted-foreground);
|
|
228
|
+
font-size: var(--community-text-secondary);
|
|
229
|
+
}
|
|
230
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PluginCatalogEntry as RegistryCatalogEntry } from "@lapis-notes/api";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
plugin: RegistryCatalogEntry;
|
|
4
|
+
variant?: "card" | "list" | "compact";
|
|
5
|
+
onOpen: (plugin: RegistryCatalogEntry) => void;
|
|
6
|
+
};
|
|
7
|
+
declare const PluginBrowserCard: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
+
type PluginBrowserCard = ReturnType<typeof PluginBrowserCard>;
|
|
9
|
+
export default PluginBrowserCard;
|