@harborclient/sdk 1.6.1 → 1.6.2

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
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 1.6.2 - 2026-08-04
8
+
9
+ - docs(sdk): enhance API index formatting for improved readability. (`52517d89`)
10
+ - feat(docs): add hc_sdk_manifest.json for comprehensive SDK action and command documentation. (`39adb007`)
11
+ - docs(sdk): update AGENTS.md to include additional sync script details. (`61daf83a`)
12
+ - docs(sdk): clean up API index documentation by removing empty entries. (`d6cfb700`)
13
+ - refactor(sdk): replace installReact with setHostReact for improved plugin integration. (`3acb19dd`)
14
+ - feat(docs): update SDK documentation and improve manifest guidelines. (`a85afcea`)
15
+
7
16
  ## 1.6.1 - 2026-08-03
8
17
 
9
18
  - feat(docs): enhance SDK documentation and update API references. (`6331350c`)
package/README.md CHANGED
@@ -4,7 +4,7 @@ TypeScript definitions, utility modules, and React runtime helpers for [HarborCl
4
4
 
5
5
  **Documentation:** [https://harborclient.github.io/harborclient/sdk/](https://harborclient.github.io/harborclient/sdk/)
6
6
 
7
- Install as a **dev dependency** in your plugin project. The package ships type declarations, HTTP/storage/UI helpers, and a JSX runtime that forwards to the host's React instance via `installReact(hc.react)`.
7
+ Install as a **dev dependency** in your plugin project. The package ships type declarations, HTTP/storage/UI helpers, and a JSX runtime that forwards to the host's React instance (HarborClient installs `hc.react` before `activate(hc)` — no plugin-side setup call is required).
8
8
 
9
9
  Requires HarborClient **>=1.9.0** when using `hc.pluginId`, renderer HTTP lifecycle events, typed IPC invoke, and host request commands.
10
10
 
@@ -19,11 +19,9 @@ See the [install guide](https://harborclient.github.io/harborclient/sdk/install)
19
19
  ## Quick start
20
20
 
21
21
  ```tsx
22
- import { installReact } from '@harborclient/sdk';
23
22
  import type { PluginContext } from '@harborclient/sdk';
24
23
 
25
24
  export function activate(hc: PluginContext): void {
26
- installReact(hc.react);
27
25
  // register contributions…
28
26
  }
29
27
  ```
@@ -26,7 +26,7 @@ export function getCodeEditorConfigStore() {
26
26
  * Returns the CodeEditor React context, creating it on first access.
27
27
  *
28
28
  * Deferred so importing CodeEditor in a plugin bundle does not call requireHostReact()
29
- * before activate() runs installReact(hc.react).
29
+ * before the host installs React for the plugin view.
30
30
  */
31
31
  function getCodeEditorContext() {
32
32
  if (codeEditorContext == null) {
@@ -1,15 +1,6 @@
1
1
  import type * as React from 'react';
2
2
  import type { Disposable, ImportHandler, PluginContext, ThemeContribution } from '../types.js';
3
3
 
4
- /**
5
- * Installs the HarborClient renderer React instance for plugin JSX and hooks.
6
- *
7
- * Call once at the start of `activate(hc)` before registering UI contributions.
8
- *
9
- * @param react - React namespace from `hc.react`.
10
- */
11
- export function installReact(react: typeof React): void;
12
-
13
4
  /**
14
5
  * Creates a React component from a factory that receives the host React namespace.
15
6
  *
@@ -1,15 +1,4 @@
1
- import { requireHostReact, setHostReact } from './reactHost.js';
2
-
3
- /**
4
- * Installs the HarborClient renderer React instance for plugin JSX and hooks.
5
- *
6
- * Call once at the start of `activate(hc)` before registering UI contributions.
7
- *
8
- * @param {typeof import('react')} react - React namespace from `hc.react`.
9
- */
10
- export function installReact(react) {
11
- setHostReact(react);
12
- }
1
+ import { requireHostReact } from './reactHost.js';
13
2
 
14
3
  /**
15
4
  * Creates a React component from a factory that receives the host React namespace.
@@ -26,7 +15,7 @@ export function createPluginComponent(factory) {
26
15
  let Component = null;
27
16
 
28
17
  /**
29
- * Lazily builds the component on first render after installReact().
18
+ * Lazily builds the component on first render after the host installs React.
30
19
  *
31
20
  * @param {P} props - Component props.
32
21
  * @returns {import('react').ReactElement | null}
@@ -8,7 +8,7 @@ export const Fragment = React.Fragment;
8
8
  * Used when bundling third-party deps (e.g. @uiw/react-codemirror,
9
9
  * @fortawesome/react-fontawesome) that import `react/jsx-runtime`. Aliasing
10
10
  * those imports to this module keeps them on the same host React instance as
11
- * the plugin shell without requiring installReact() to have run first.
11
+ * the plugin shell without requiring the host React install to have run first.
12
12
  *
13
13
  * @param {import('react').ElementType} type - Element type or Fragment.
14
14
  * @param {Record<string, unknown> | null | undefined} props - Element props.
@@ -53,7 +53,7 @@ export function requireHostReact() {
53
53
  }
54
54
  if (hostReact == null) {
55
55
  throw new Error(
56
- 'Plugin React host is not installed. Call installReact(hc.react) at the start of activate().'
56
+ 'Plugin React host is not installed. The view host must call setHostReact() before activate().'
57
57
  );
58
58
  }
59
59
  return hostReact;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harborclient/sdk",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "TypeScript SDK for HarborClient development.",
5
5
  "keywords": [
6
6
  "harborclient",