@typerighter/rpc-client 0.42.1 → 0.43.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/dist/index.d.ts +20 -1
- package/dist/index.js +4 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -78,6 +78,22 @@ 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
|
+
}
|
|
81
97
|
export interface TdSiteConfig {
|
|
82
98
|
version: string;
|
|
83
99
|
basePath: string;
|
|
@@ -86,11 +102,13 @@ export interface TdSiteConfig {
|
|
|
86
102
|
rootDir: string;
|
|
87
103
|
siteTitle: string;
|
|
88
104
|
siteDescription: string;
|
|
89
|
-
repo:
|
|
105
|
+
repo: TdRepoConfig | undefined;
|
|
90
106
|
author: string | undefined;
|
|
91
107
|
license: string | undefined;
|
|
92
108
|
publicDir: string;
|
|
93
109
|
nav: TdNavItem[];
|
|
110
|
+
components: TdComponentEntry[];
|
|
111
|
+
layout: TdCustomLayout | undefined;
|
|
94
112
|
}
|
|
95
113
|
export interface TdSeoMeta {
|
|
96
114
|
title?: string;
|
|
@@ -143,4 +161,5 @@ export declare class RpcClient {
|
|
|
143
161
|
onSchemaUpdated(callback: (notification: TdSchemaNotification) => void): void;
|
|
144
162
|
onSchemaDeleted(callback: (notification: TdSchemaNotification) => void): void;
|
|
145
163
|
onConfigChanged(callback: (config: TdSiteConfig) => void): void;
|
|
164
|
+
onComponentContractChanged(callback: () => void): void;
|
|
146
165
|
}
|
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