@lapis-notes/ui 0.2.4 → 0.2.5

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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # @lapis-notes/ui
2
2
 
3
+ ## 0.2.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#174](https://github.com/lapismd/lapis-notes/pull/174)
8
+ [`8debba3`](https://github.com/lapismd/lapis-notes/commit/8debba36e6a2813d91f7b17f1173e03059402a10)
9
+ Thanks [@stevejuma](https://github.com/stevejuma)! - Keep General → Advanced
10
+ CLI fields bound to their disposable host registration when settings rendering
11
+ copies or proxies their descriptors. Preserve public ports, independent
12
+ owners, replacement/disposal and settings persistence.
13
+
3
14
  ## 0.2.4
4
15
 
5
16
  ### Patch Changes
@@ -1,10 +1,8 @@
1
1
  <script lang="ts">
2
- import type { WorkspaceCustomSettingProps } from "@lapismd/design-core/workspace/settings";
3
- import { cliSettingsFieldHost } from "./cli-settings";
2
+ import type { CliSettingsHost } from "./cli-settings";
4
3
  import CliSettings from "./CliSettings.svelte";
5
4
 
6
- let { field }: WorkspaceCustomSettingProps = $props();
7
- let host = $derived(cliSettingsFieldHost(field));
5
+ let { host }: { host: CliSettingsHost } = $props();
8
6
  </script>
9
7
 
10
8
  <CliSettings {host} embedded />
@@ -1,4 +1,7 @@
1
- import type { WorkspaceCustomSettingProps } from "@lapismd/design-core/workspace/settings";
2
- declare const CliSettingsField: import("svelte").Component<WorkspaceCustomSettingProps<unknown>, {}, "">;
1
+ import type { CliSettingsHost } from "./cli-settings";
2
+ type $$ComponentProps = {
3
+ host: CliSettingsHost;
4
+ };
5
+ declare const CliSettingsField: import("svelte").Component<$$ComponentProps, {}, "">;
3
6
  type CliSettingsField = ReturnType<typeof CliSettingsField>;
4
7
  export default CliSettingsField;
@@ -26,7 +26,13 @@ export function registerCliSettings(settings, host) {
26
26
  description: "Use the lapis command from your terminal.",
27
27
  type: "custom",
28
28
  presentation: "full-width",
29
- component: CliSettingsField,
29
+ component: (anchor) => {
30
+ if (hosts.get(settings) !== entry) {
31
+ throw new Error("CLI settings host is not bound");
32
+ }
33
+ CliSettingsField(anchor, { host: entry.host });
34
+ return {};
35
+ },
30
36
  };
31
37
  fieldHosts.set(field, host);
32
38
  const dispose = settings.registerSection({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lapis-notes/ui",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Public UI primitives required by Lapis Notes API consumers",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {