@lapis-notes/workspace 0.2.1 → 0.3.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +103 -12
  2. package/README.md +4 -0
  3. package/dist/WorkspaceShell.svelte +19 -2
  4. package/dist/WorkspaceShell.svelte.d.ts +3 -1
  5. package/dist/desktop/DesktopRecoveryBanner.css +46 -0
  6. package/dist/desktop/DesktopRecoveryBanner.svelte +70 -0
  7. package/dist/desktop/DesktopRecoveryBanner.svelte.d.ts +15 -0
  8. package/dist/desktop/DesktopVaultLauncher.svelte +278 -0
  9. package/dist/desktop/DesktopVaultLauncher.svelte.d.ts +17 -0
  10. package/dist/desktop/DesktopVaultLauncherDialogs.svelte +136 -0
  11. package/dist/desktop/DesktopVaultLauncherDialogs.svelte.d.ts +9 -0
  12. package/dist/desktop/DesktopWorkspaceStartup.css +8 -0
  13. package/dist/desktop/DesktopWorkspaceStartup.svelte +34 -0
  14. package/dist/desktop/DesktopWorkspaceStartup.svelte.d.ts +9 -0
  15. package/dist/desktop/desktop-vault-launcher-controls.css +142 -0
  16. package/dist/desktop/desktop-vault-launcher.css +181 -0
  17. package/dist/desktop/desktop-vault-launcher.d.ts +30 -0
  18. package/dist/desktop/desktop-vault-launcher.js +26 -0
  19. package/dist/desktop/desktop-vault-launcher.svelte.d.ts +36 -0
  20. package/dist/desktop/desktop-vault-launcher.svelte.js +140 -0
  21. package/dist/desktop/lapis-logo.svg +471 -0
  22. package/dist/file-conflicts/ConflictReview.svelte +145 -0
  23. package/dist/file-conflicts/ConflictReview.svelte.d.ts +8 -0
  24. package/dist/file-conflicts/ConflictReviewControls.svelte +66 -0
  25. package/dist/file-conflicts/ConflictReviewControls.svelte.d.ts +12 -0
  26. package/dist/file-conflicts/conflict-review-state.svelte.d.ts +22 -0
  27. package/dist/file-conflicts/conflict-review-state.svelte.js +59 -0
  28. package/dist/file-conflicts/conflict-review-view.d.ts +19 -0
  29. package/dist/file-conflicts/conflict-review-view.js +50 -0
  30. package/dist/file-conflicts/register-conflict-reviews.d.ts +7 -0
  31. package/dist/file-conflicts/register-conflict-reviews.js +132 -0
  32. package/dist/index.d.ts +6 -0
  33. package/dist/index.js +4 -0
  34. package/dist/plugin-management/CorePluginsSettingsPage.svelte +47 -16
  35. package/dist/plugin-management/PluginBrowser.svelte +16 -1
  36. package/dist/plugin-management/PluginRegistryToolbar.svelte.d.ts +1 -1
  37. package/dist/plugin-management/plugin-registry-controller.svelte.js +5 -1
  38. package/dist/plugin-management/register-plugin-management-settings.js +7 -6
  39. package/package.json +5 -4
@@ -117,6 +117,15 @@
117
117
  );
118
118
  const installAction = $derived.by<RegistryInstallAction>(() => {
119
119
  if (!selected) return { state: "disabled" };
120
+ if (
121
+ ownedApp.pluginDistribution
122
+ .getCompatibility?.(selected.id)
123
+ ?.reasons.includes("desktop-only")
124
+ )
125
+ return {
126
+ state: "disabled",
127
+ reason: "This plugin is available in the desktop app.",
128
+ };
120
129
  const feedback =
121
130
  registry.actionFeedback?.pluginId === selected.id
122
131
  ? registry.actionFeedback
@@ -158,6 +167,12 @@
158
167
  const downloads = (id: string) =>
159
168
  registry.downloadStats?.periods["30d"].plugins[id]?.total ?? 0;
160
169
  function reason(entry: PluginCatalogEntry): string | undefined {
170
+ if (
171
+ ownedApp.pluginDistribution
172
+ .getCompatibility?.(entry.id)
173
+ ?.reasons.includes("desktop-only")
174
+ )
175
+ return "This plugin is available in the desktop app.";
161
176
  if (entry.status && entry.status !== "active")
162
177
  return `This plugin is ${entry.status}.`;
163
178
  if (
@@ -431,7 +446,7 @@
431
446
  onOpenPlugin={open}
432
447
  onOpenCategory={(category) => go("directory", category)}
433
448
  />
434
- {:else if selected && resolved && selectedVersion !== undefined && !Object.hasOwn(resolved.detail.versions, selectedVersion)}<PluginRegistryContentState
449
+ {:else if selected && resolved && selectedVersion !== undefined && !Object.hasOwn(resolved.detail.versions, selectedVersion)}<PluginRegistryContentState
435
450
  kind="empty"
436
451
  heading="Plugin version unavailable"
437
452
  description={`Version ${selectedVersion} is not available from your enabled registry.`}
@@ -16,6 +16,6 @@ type $$ComponentProps = {
16
16
  resultCount: number;
17
17
  onreset: () => void;
18
18
  };
19
- declare const PluginRegistryToolbar: import("svelte").Component<$$ComponentProps, {}, "search" | "provenance" | "sort" | "channel" | "category" | "platform" | "compatibleOnly" | "installedState" | "enabledState" | "updateState">;
19
+ declare const PluginRegistryToolbar: import("svelte").Component<$$ComponentProps, {}, "search" | "sort" | "provenance" | "channel" | "category" | "platform" | "compatibleOnly" | "installedState" | "enabledState" | "updateState">;
20
20
  type PluginRegistryToolbar = ReturnType<typeof PluginRegistryToolbar>;
21
21
  export default PluginRegistryToolbar;
@@ -37,7 +37,11 @@ export class PluginRegistryController {
37
37
  }
38
38
  retain() {
39
39
  if (this.references++ === 0) {
40
- for (const name of ["plugin-enabled", "plugin-disabled"]) {
40
+ for (const name of [
41
+ "plugin-enabled",
42
+ "plugin-disabled",
43
+ "plugin-unloaded",
44
+ ]) {
41
45
  const ref = this.app.plugins.on(name, () => {
42
46
  this.pluginLifecycleRevision += 1;
43
47
  });
@@ -4,12 +4,13 @@ import CorePluginsSettingsPage from "./CorePluginsSettingsPage.svelte";
4
4
  import PluginRegistrySettingsPage from "./PluginRegistrySettingsPage.svelte";
5
5
  import { clearPluginManagementContext, PluginManagementRevealState, setPluginManagementContext, } from "./plugin-management-context.svelte";
6
6
  function coreSearchEntries(app) {
7
- return app.plugins.corePluginEntries.map((entry) => ({
8
- id: `core:${entry.manifest.id}`,
9
- title: entry.manifest.name,
10
- description: entry.manifest.description,
11
- keywords: [entry.manifest.id, entry.distribution, "plugin"],
12
- path: ["Core plugins", entry.manifest.name],
7
+ const { managedPlugins } = getWorkspaceHostBinding(app.workspace).controller;
8
+ return managedPlugins.states.map((entry) => ({
9
+ id: `core:${entry.sourceId === "lapis" ? entry.id : entry.key}`,
10
+ title: entry.name,
11
+ description: entry.description,
12
+ keywords: [entry.id, entry.distribution, "plugin"],
13
+ path: ["Core plugins", entry.name],
13
14
  }));
14
15
  }
15
16
  function communitySearchEntries(app) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lapis-notes/workspace",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Lapis Notes workspace shell backed by design-core",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -38,9 +38,10 @@
38
38
  }
39
39
  },
40
40
  "dependencies": {
41
- "@lapis-notes/api": "^0.1.2",
42
- "@lapismd/design-core": "^0.3.2",
43
- "@lucide/svelte": "^0.523.0"
41
+ "@lapis-notes/api": "^0.2.0",
42
+ "@lapismd/design-core": "^0.7.0",
43
+ "@lucide/svelte": "^0.523.0",
44
+ "@lapis-notes/ui": "^0.1.4"
44
45
  },
45
46
  "peerDependencies": {
46
47
  "svelte": "^5.0.0"