@typerighter/rpc-client 0.42.1 → 0.43.1

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/dist/index.d.ts CHANGED
@@ -78,6 +78,23 @@ export interface TdSchemaInfo {
78
78
  label: string;
79
79
  properties: Record<string, any>;
80
80
  }
81
+ export type TdComponentEntry = {
82
+ kind: 'dir';
83
+ path: string;
84
+ } | {
85
+ kind: 'explicit';
86
+ name: string;
87
+ source: string;
88
+ };
89
+ export interface TdRepoConfig {
90
+ url: string;
91
+ root: string;
92
+ }
93
+ export interface TdCustomLayout {
94
+ component: string | undefined;
95
+ slots: Record<string, string>;
96
+ notFound: string | undefined;
97
+ }
81
98
  export interface TdSiteConfig {
82
99
  version: string;
83
100
  basePath: string;
@@ -86,11 +103,13 @@ export interface TdSiteConfig {
86
103
  rootDir: string;
87
104
  siteTitle: string;
88
105
  siteDescription: string;
89
- repo: string | undefined;
106
+ repo: TdRepoConfig | undefined;
90
107
  author: string | undefined;
91
108
  license: string | undefined;
92
109
  publicDir: string;
93
110
  nav: TdNavItem[];
111
+ components: TdComponentEntry[];
112
+ layout: TdCustomLayout | undefined;
94
113
  }
95
114
  export interface TdSeoMeta {
96
115
  title?: string;
@@ -143,4 +162,5 @@ export declare class RpcClient {
143
162
  onSchemaUpdated(callback: (notification: TdSchemaNotification) => void): void;
144
163
  onSchemaDeleted(callback: (notification: TdSchemaNotification) => void): void;
145
164
  onConfigChanged(callback: (config: TdSiteConfig) => void): void;
165
+ onComponentContractChanged(callback: () => void): void;
146
166
  }
package/dist/index.js CHANGED
@@ -29,6 +29,7 @@ const NOTIF_CONTENT_DELETED = 'typedown_build.content_deleted';
29
29
  const NOTIF_SCHEMA_UPDATED = 'typedown_build.schema_updated';
30
30
  const NOTIF_SCHEMA_DELETED = 'typedown_build.schema_deleted';
31
31
  const NOTIF_CONFIG_CHANGED = 'typedown_build.config_changed';
32
+ const NOTIF_COMPONENT_CONTRACT_CHANGED = 'typedown_build.component_contract_changed';
32
33
  /**
33
34
  * Typed RPC client for the Typedown build server
34
35
  *
@@ -106,4 +107,7 @@ export class RpcClient {
106
107
  onConfigChanged(callback) {
107
108
  this.rpc.onNotification(NOTIF_CONFIG_CHANGED, callback);
108
109
  }
110
+ onComponentContractChanged(callback) {
111
+ this.rpc.onNotification(NOTIF_COMPONENT_CONTRACT_CHANGED, callback);
112
+ }
109
113
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@typerighter/rpc-client",
4
- "version": "0.42.1",
4
+ "version": "0.43.1",
5
5
  "description": "JSON-RPC client for Typedown over TCP/stdio.",
6
6
  "repository": {
7
7
  "type": "git",