@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @lapis-notes/workspace
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#4](https://github.com/lapismd/lapis-notes/pull/4) [`08a9e4b`](https://github.com/lapismd/lapis-notes/commit/08a9e4bc671c87484e1fbb7c3271b2aad3f176e5) Thanks [@stevejuma](https://github.com/stevejuma)! - Add the Plugins workspace browser with a category homepage, update listings,
|
|
8
|
+
responsive filters, and verified install/update actions shared with Settings.
|
|
9
|
+
Settings Browse and Updates now open shared plugin details directly. Details
|
|
10
|
+
include a Back action, fixed navigation, themed media, image loading and failure
|
|
11
|
+
states, release notes, download counts, and linked authors.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#4](https://github.com/lapismd/lapis-notes/pull/4) [`c1ad3c4`](https://github.com/lapismd/lapis-notes/commit/c1ad3c4acee2eac1ae87c22f66e946d2e0db3bf2) Thanks [@stevejuma](https://github.com/stevejuma)! - Require published Design Core 0.3.2 for native window-controls spacing, bold settings headings, selected-tab indicators and mobile shell teardown. Consume the npm release through portable semver ranges and lockfile integrity.
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [[`39f886d`](https://github.com/lapismd/lapis-notes/commit/39f886d017a28d916b3f6cac7d08b7723a04f45b), [`c1ad3c4`](https://github.com/lapismd/lapis-notes/commit/c1ad3c4acee2eac1ae87c22f66e946d2e0db3bf2), [`1e949fc`](https://github.com/lapismd/lapis-notes/commit/1e949fc9d51b795a50760e1146a9599602746c6b)]:
|
|
18
|
+
- @lapis-notes/api@0.1.2
|
|
19
|
+
|
|
20
|
+
## 0.1.1
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Support verified static V2 catalogs alongside Nostr sources, retain installation
|
|
25
|
+
source provenance, and render themed registry images and structured release notes.
|
|
26
|
+
- Updated dependencies []:
|
|
27
|
+
- @lapis-notes/api@0.1.1
|
|
28
|
+
|
|
3
29
|
## 0.1.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
package/LICENSE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Apache-2.0
|
|
2
2
|
|
|
3
|
-
This package is licensed under the
|
|
4
|
-
See <https://www.
|
|
3
|
+
This package is licensed under the Apache License 2.0.
|
|
4
|
+
See <https://www.apache.org/licenses/LICENSE-2.0>.
|
package/dist/index.d.ts
CHANGED
|
@@ -4,3 +4,6 @@ export { registerPluginManagementSettings } from "./plugin-management/register-p
|
|
|
4
4
|
export { default as PluginRegistrySettingsPage } from "./plugin-management/PluginRegistrySettingsPage.svelte";
|
|
5
5
|
export { default as CorePluginsSettingsPage } from "./plugin-management/CorePluginsSettingsPage.svelte";
|
|
6
6
|
export { default as CommunityPluginsSettingsPage } from "./plugin-management/CommunityPluginsSettingsPage.svelte";
|
|
7
|
+
export { PluginsView } from "./plugin-management/plugins-view.svelte";
|
|
8
|
+
export { default as PluginBrowser } from "./plugin-management/PluginBrowser.svelte";
|
|
9
|
+
export { openPluginBrowser } from "./plugin-management/plugin-browser-navigation";
|
package/dist/index.js
CHANGED
|
@@ -3,3 +3,6 @@ export { registerPluginManagementSettings } from "./plugin-management/register-p
|
|
|
3
3
|
export { default as PluginRegistrySettingsPage } from "./plugin-management/PluginRegistrySettingsPage.svelte";
|
|
4
4
|
export { default as CorePluginsSettingsPage } from "./plugin-management/CorePluginsSettingsPage.svelte";
|
|
5
5
|
export { default as CommunityPluginsSettingsPage } from "./plugin-management/CommunityPluginsSettingsPage.svelte";
|
|
6
|
+
export { PluginsView } from "./plugin-management/plugins-view.svelte";
|
|
7
|
+
export { default as PluginBrowser } from "./plugin-management/PluginBrowser.svelte";
|
|
8
|
+
export { openPluginBrowser } from "./plugin-management/plugin-browser-navigation";
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import Check from "@lucide/svelte/icons/check";
|
|
3
|
+
import Puzzle from "@lucide/svelte/icons/puzzle";
|
|
4
|
+
import RefreshCw from "@lucide/svelte/icons/refresh-cw";
|
|
5
|
+
import ShieldAlert from "@lucide/svelte/icons/shield-alert";
|
|
6
|
+
import ShieldCheck from "@lucide/svelte/icons/shield-check";
|
|
7
|
+
import Sparkles from "@lucide/svelte/icons/sparkles";
|
|
2
8
|
import * as Button from "@lapismd/design-core/shadcn/button";
|
|
3
9
|
import type { WorkspaceSettingsPageProps } from "@lapismd/design-core/workspace/settings";
|
|
4
10
|
import { onMount, tick, untrack } from "svelte";
|
|
@@ -60,12 +66,14 @@
|
|
|
60
66
|
const enabled = app.plugins.on("plugin-enabled", refresh);
|
|
61
67
|
const disabled = app.plugins.on("plugin-disabled", refresh);
|
|
62
68
|
const error = app.plugins.on("plugin-error", refresh);
|
|
69
|
+
const trustChanged = app.workspaceTrust.on("changed", refresh);
|
|
63
70
|
void app.workspaceTrust.ready().then(refresh);
|
|
64
71
|
return () => {
|
|
65
72
|
app.plugins.offref(loaded);
|
|
66
73
|
app.plugins.offref(enabled);
|
|
67
74
|
app.plugins.offref(disabled);
|
|
68
75
|
app.plugins.offref(error);
|
|
76
|
+
app.workspaceTrust.offref(trustChanged);
|
|
69
77
|
};
|
|
70
78
|
});
|
|
71
79
|
|
|
@@ -80,6 +88,11 @@
|
|
|
80
88
|
trustBusy = false;
|
|
81
89
|
}
|
|
82
90
|
}
|
|
91
|
+
|
|
92
|
+
function browsePlugins(): void {
|
|
93
|
+
context.reveal.request("plugin-registry", "registry:");
|
|
94
|
+
controller.selectSection("plugin-registry");
|
|
95
|
+
}
|
|
83
96
|
</script>
|
|
84
97
|
|
|
85
98
|
<section
|
|
@@ -87,27 +100,69 @@
|
|
|
87
100
|
data-ui-component="lapis-plugin-management"
|
|
88
101
|
data-ui-part="community-plugins"
|
|
89
102
|
>
|
|
90
|
-
<
|
|
91
|
-
|
|
92
|
-
|
|
103
|
+
<section
|
|
104
|
+
class="lapis-plugin-management__trust"
|
|
105
|
+
data-ui-component="workspace-trust-status"
|
|
106
|
+
data-ui-part="status-card"
|
|
107
|
+
data-trust-state={trustState.trusted ? "trusted" : "untrusted"}
|
|
108
|
+
aria-labelledby="lapis-workspace-trust-title"
|
|
109
|
+
>
|
|
110
|
+
<div
|
|
111
|
+
class="lapis-plugin-management__trust-icon"
|
|
112
|
+
data-ui-part="status-icon"
|
|
113
|
+
data-trust-icon={trustState.trusted ? "shield-check" : "shield-alert"}
|
|
114
|
+
aria-hidden="true"
|
|
115
|
+
>
|
|
116
|
+
{#if trustState.trusted}
|
|
117
|
+
<ShieldCheck />
|
|
118
|
+
{:else}
|
|
119
|
+
<ShieldAlert />
|
|
120
|
+
{/if}
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
<div class="lapis-plugin-management__trust-content">
|
|
124
|
+
<div class="lapis-plugin-management__trust-title-line">
|
|
125
|
+
<h1 id="lapis-workspace-trust-title">
|
|
126
|
+
{trustState.trusted
|
|
127
|
+
? "Workspace trusted"
|
|
128
|
+
: "Workspace not trusted"}
|
|
129
|
+
</h1>
|
|
130
|
+
<span
|
|
131
|
+
class="lapis-plugin-management__trust-badge"
|
|
132
|
+
data-ui-part="status-badge"
|
|
133
|
+
>
|
|
134
|
+
{#if trustState.trusted}
|
|
135
|
+
<Check aria-hidden="true" />
|
|
136
|
+
Trusted
|
|
137
|
+
{:else}
|
|
138
|
+
<span aria-hidden="true"></span>
|
|
139
|
+
Not trusted
|
|
140
|
+
{/if}
|
|
141
|
+
</span>
|
|
142
|
+
</div>
|
|
93
143
|
<p>
|
|
94
144
|
{trustState.trusted
|
|
95
|
-
? "
|
|
96
|
-
: "
|
|
145
|
+
? "Community plugins and desktop capabilities can run in this vault."
|
|
146
|
+
: "Community plugins and desktop capabilities are disabled until this vault is trusted."}
|
|
97
147
|
</p>
|
|
148
|
+
{#if !trustState.trusted}
|
|
149
|
+
<Button.Root
|
|
150
|
+
class="lapis-plugin-management__trust-action"
|
|
151
|
+
disabled={trustBusy}
|
|
152
|
+
onclick={() => void updateTrust(true)}
|
|
153
|
+
>Trust workspace</Button.Root>
|
|
154
|
+
{/if}
|
|
98
155
|
</div>
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
disabled={trustState.trusted || trustBusy}
|
|
102
|
-
onclick={() => void updateTrust(true)}
|
|
103
|
-
>Trust workspace</Button.Root>
|
|
156
|
+
|
|
157
|
+
{#if trustState.trusted}
|
|
104
158
|
<Button.Root
|
|
105
|
-
|
|
106
|
-
|
|
159
|
+
class="lapis-plugin-management__trust-action lapis-plugin-management__trust-action--revoke"
|
|
160
|
+
variant="outline"
|
|
161
|
+
disabled={trustBusy}
|
|
107
162
|
onclick={() => void updateTrust(false)}
|
|
108
|
-
>Revoke
|
|
109
|
-
|
|
110
|
-
</
|
|
163
|
+
>Revoke</Button.Root>
|
|
164
|
+
{/if}
|
|
165
|
+
</section>
|
|
111
166
|
|
|
112
167
|
<header class="lapis-plugin-management__header">
|
|
113
168
|
<div>
|
|
@@ -115,68 +170,92 @@
|
|
|
115
170
|
<p>Manage installed community and registry plugins for this vault.</p>
|
|
116
171
|
</div>
|
|
117
172
|
<Button.Root
|
|
173
|
+
class="lapis-plugin-management__reload"
|
|
118
174
|
variant="outline"
|
|
119
175
|
onclick={() => globalThis.location?.reload()}
|
|
120
|
-
>
|
|
176
|
+
>
|
|
177
|
+
<RefreshCw
|
|
178
|
+
class="lapis-plugin-management__icon"
|
|
179
|
+
data-reload-icon="refresh-cw"
|
|
180
|
+
aria-hidden="true"
|
|
181
|
+
/>
|
|
182
|
+
Reload plugins
|
|
183
|
+
</Button.Root>
|
|
121
184
|
</header>
|
|
122
185
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
186
|
+
{#if plugins.length === 0 && indexedDiagnostics.length === 0}
|
|
187
|
+
<div
|
|
188
|
+
class="lapis-plugin-management__empty-state"
|
|
189
|
+
data-ui-part="community-empty-state"
|
|
190
|
+
>
|
|
191
|
+
<div
|
|
192
|
+
class="lapis-plugin-management__empty-state-icon"
|
|
193
|
+
data-empty-icon="puzzle"
|
|
194
|
+
aria-hidden="true"
|
|
195
|
+
>
|
|
196
|
+
<Puzzle />
|
|
197
|
+
<Sparkles />
|
|
198
|
+
</div>
|
|
199
|
+
<h2>No community plugins found</h2>
|
|
200
|
+
<p>
|
|
201
|
+
Looks like you haven’t installed any community plugins yet.<br />
|
|
202
|
+
Browse the community plugins list to get started.
|
|
127
203
|
</p>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
? "
|
|
141
|
-
:
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
204
|
+
<Button.Root onclick={browsePlugins}>Browse plugins</Button.Root>
|
|
205
|
+
</div>
|
|
206
|
+
{:else}
|
|
207
|
+
<div class="lapis-plugin-management__rows">
|
|
208
|
+
{#each plugins as plugin (plugin.manifest.id)}
|
|
209
|
+
<PluginSettingsRow
|
|
210
|
+
pluginId={plugin.manifest.id}
|
|
211
|
+
name={plugin.manifest.name}
|
|
212
|
+
description={plugin.manifest.description}
|
|
213
|
+
version={plugin.manifest.version}
|
|
214
|
+
provenance={plugin.provenance}
|
|
215
|
+
status={plugin.state === "failed"
|
|
216
|
+
? "Failed"
|
|
217
|
+
: plugin.enabled
|
|
218
|
+
? "Enabled"
|
|
219
|
+
: "Disabled"}
|
|
220
|
+
error={plugin.lastFailureMessage ?? plugin.errorMessage ?? undefined}
|
|
221
|
+
enabled={plugin.enabled}
|
|
222
|
+
expanded={expandedPluginIds.has(plugin.manifest.id)}
|
|
223
|
+
hasOptions={Boolean(
|
|
224
|
+
pluginSettingsSectionId(controller, plugin.manifest.id),
|
|
225
|
+
)}
|
|
226
|
+
diagnostics={pluginDiagnosticRows(app, plugin.manifest.id)}
|
|
227
|
+
onOptions={() => openPluginSettings(controller, plugin.manifest.id)}
|
|
228
|
+
onRestart={async () => {
|
|
229
|
+
await app.plugins.restartPlugin(plugin.manifest.id);
|
|
230
|
+
}}
|
|
231
|
+
onToggle={async (enabled) => {
|
|
232
|
+
if (enabled) await app.plugins.enablePlugin(plugin.manifest.id);
|
|
233
|
+
else await app.plugins.disablePlugin(plugin.manifest.id);
|
|
234
|
+
}}
|
|
235
|
+
/>
|
|
236
|
+
{/each}
|
|
159
237
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
238
|
+
{#each indexedDiagnostics as diagnostics (diagnostics.pluginId)}
|
|
239
|
+
<PluginSettingsRow
|
|
240
|
+
pluginId={diagnostics.pluginId}
|
|
241
|
+
name={diagnostics.name ?? diagnostics.pluginId}
|
|
242
|
+
description={diagnostics.description ?? undefined}
|
|
243
|
+
version={diagnostics.version ?? undefined}
|
|
244
|
+
provenance={diagnostics.provenance}
|
|
245
|
+
status={diagnostics.state}
|
|
246
|
+
error={diagnostics.lastFailureMessage ?? undefined}
|
|
247
|
+
enabled={false}
|
|
248
|
+
expanded={expandedPluginIds.has(diagnostics.pluginId)}
|
|
249
|
+
hasOptions={Boolean(
|
|
250
|
+
pluginSettingsSectionId(controller, diagnostics.pluginId),
|
|
251
|
+
)}
|
|
252
|
+
diagnostics={pluginDiagnosticRows(app, diagnostics.pluginId)}
|
|
253
|
+
onOptions={() => openPluginSettings(controller, diagnostics.pluginId)}
|
|
254
|
+
onRestart={async () => {
|
|
255
|
+
await app.plugins.restartPlugin(diagnostics.pluginId);
|
|
256
|
+
}}
|
|
257
|
+
/>
|
|
258
|
+
{/each}
|
|
259
|
+
</div>
|
|
260
|
+
{/if}
|
|
182
261
|
</section>
|