@notnotype/nb-plugin-sdk 0.11.0 → 0.11.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/{build-DttsN_vN.js → build-CKXTktKn.js} +2 -1
- package/build.js +1 -1
- package/cli.js +1 -1
- package/components.d.ts +15 -15
- package/package.json +12 -1
- package/specs/runtime/plugin-install.md +1 -1
|
@@ -370,6 +370,7 @@ async function buildEntry(input) {
|
|
|
370
370
|
} : void 0,
|
|
371
371
|
rolldownOptions: {
|
|
372
372
|
external,
|
|
373
|
+
checks: { pluginTimings: false },
|
|
373
374
|
output: {
|
|
374
375
|
codeSplitting: false,
|
|
375
376
|
sourcemapPathTransform: (source, sourcemapPath) => sourcePath(resolve(dirname(sourcemapPath), source), input.root, input.workDir),
|
|
@@ -1787,7 +1788,7 @@ const SDK_ENTRIES = [
|
|
|
1787
1788
|
* 写成常量而不是读 `package.json`:前端构建与服务端都引用它,不必把整份包清单打进页面。与包 `package.json` 的
|
|
1788
1789
|
* `version` 保持一致,由 `product.test.ts` 核对。
|
|
1789
1790
|
*/
|
|
1790
|
-
const PRODUCT_VERSION = "0.11.
|
|
1791
|
+
const PRODUCT_VERSION = "0.11.1";
|
|
1791
1792
|
/** 清单格式:读、生成清单与内置判断只有这一份。 */
|
|
1792
1793
|
const manifestFormat = createManifestFormat({
|
|
1793
1794
|
engine: "neurobook",
|
package/build.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as devVersion, n as isPreviousBuild, s as PluginBuildError, t as buildPlugin } from "./build-
|
|
1
|
+
import { c as devVersion, n as isPreviousBuild, s as PluginBuildError, t as buildPlugin } from "./build-CKXTktKn.js";
|
|
2
2
|
export { PluginBuildError, buildPlugin, devVersion, isPreviousBuild };
|
package/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import { a as ID_SEGMENT_RULE, i as PRODUCT_VERSION, o as isIdSegment, r as manifestFormat, s as PluginBuildError, t as buildPlugin } from "./build-
|
|
2
|
+
import { a as ID_SEGMENT_RULE, i as PRODUCT_VERSION, o as isIdSegment, r as manifestFormat, s as PluginBuildError, t as buildPlugin } from "./build-CKXTktKn.js";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import { mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises";
|
|
5
5
|
import { parseArgs } from "node:util";
|
package/components.d.ts
CHANGED
|
@@ -25,9 +25,9 @@ declare const __VLS_base$27: import("vue").DefineComponent<__VLS_Props$48, {}, {
|
|
|
25
25
|
disabled: boolean;
|
|
26
26
|
size: ButtonSize;
|
|
27
27
|
variant: ButtonVariant;
|
|
28
|
-
iconClass: string;
|
|
29
28
|
block: boolean;
|
|
30
29
|
loading: boolean;
|
|
30
|
+
iconClass: string;
|
|
31
31
|
focusRing: FocusRingStyle;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const __VLS_export$51: __VLS_WithSlots$27<typeof __VLS_base$27, __VLS_Slots$27>;
|
|
@@ -160,8 +160,8 @@ declare const __VLS_base$25: import("vue").DefineComponent<__VLS_Props$46, {}, {
|
|
|
160
160
|
size: IconButtonSize;
|
|
161
161
|
variant: IconButtonVariant;
|
|
162
162
|
iconClass: string;
|
|
163
|
-
ariaLabel: string;
|
|
164
163
|
focusRing: FocusRingStyle;
|
|
164
|
+
ariaLabel: string;
|
|
165
165
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
166
166
|
declare const __VLS_export$49: __VLS_WithSlots$25<typeof __VLS_base$25, __VLS_Slots$25>;
|
|
167
167
|
declare const _default$20: typeof __VLS_export$49;
|
|
@@ -266,8 +266,8 @@ declare const __VLS_export$47: import("vue").DefineComponent<__VLS_Props$44, {},
|
|
|
266
266
|
readonly: boolean;
|
|
267
267
|
wrap: boolean;
|
|
268
268
|
size: SegmentedControlSize;
|
|
269
|
-
tone: SegmentedControlTone;
|
|
270
269
|
ariaLabel: string;
|
|
270
|
+
tone: SegmentedControlTone;
|
|
271
271
|
fullWidth: boolean;
|
|
272
272
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
273
273
|
declare const _default$36: typeof __VLS_export$47;
|
|
@@ -297,8 +297,8 @@ declare const __VLS_export$46: import("vue").DefineComponent<__VLS_Props$43, {},
|
|
|
297
297
|
name: string;
|
|
298
298
|
readonly: boolean;
|
|
299
299
|
size: SwitchSize;
|
|
300
|
-
defaultValue: boolean;
|
|
301
300
|
ariaLabel: string;
|
|
301
|
+
defaultValue: boolean;
|
|
302
302
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
303
303
|
declare const _default$44: typeof __VLS_export$46;
|
|
304
304
|
//#endregion
|
|
@@ -439,10 +439,10 @@ type __VLS_Slots$22 = {} & {
|
|
|
439
439
|
};
|
|
440
440
|
declare const __VLS_base$22: import("vue").DefineComponent<__VLS_Props$39, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props$39> & Readonly<{}>, {
|
|
441
441
|
size: BadgeSize;
|
|
442
|
-
tone: BadgeTone;
|
|
443
442
|
variant: BadgeVariant;
|
|
444
|
-
dot: boolean;
|
|
445
443
|
iconClass: string;
|
|
444
|
+
tone: BadgeTone;
|
|
445
|
+
dot: boolean;
|
|
446
446
|
count: number | string;
|
|
447
447
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
448
448
|
declare const __VLS_export$42: __VLS_WithSlots$22<typeof __VLS_base$22, __VLS_Slots$22>;
|
|
@@ -782,6 +782,7 @@ declare const __VLS_base$18: import("vue").DefineComponent<__VLS_Props$30, {}, {
|
|
|
782
782
|
height: string | number;
|
|
783
783
|
modal: boolean;
|
|
784
784
|
size: DialogSize;
|
|
785
|
+
teleportTarget: string | boolean;
|
|
785
786
|
closable: boolean;
|
|
786
787
|
showHeader: boolean;
|
|
787
788
|
closeOnOverlay: boolean;
|
|
@@ -791,7 +792,6 @@ declare const __VLS_base$18: import("vue").DefineComponent<__VLS_Props$30, {}, {
|
|
|
791
792
|
resizable: boolean;
|
|
792
793
|
minWidth: number;
|
|
793
794
|
minHeight: number;
|
|
794
|
-
teleportTarget: string | boolean;
|
|
795
795
|
overlayType: "transparent" | "blur" | "opaque";
|
|
796
796
|
showCancel: boolean;
|
|
797
797
|
showFooter: boolean;
|
|
@@ -924,8 +924,8 @@ declare const __VLS_base$15: import("vue").DefineComponent<__VLS_Props$26, {}, {
|
|
|
924
924
|
}>, {
|
|
925
925
|
title: string;
|
|
926
926
|
message: string;
|
|
927
|
-
tone: BannerTone;
|
|
928
927
|
iconClass: string;
|
|
928
|
+
tone: BannerTone;
|
|
929
929
|
closeLabel: string;
|
|
930
930
|
dismissible: boolean;
|
|
931
931
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -2033,8 +2033,8 @@ declare const __VLS_base$2: import("vue").DefineComponent<__VLS_Props$6, {}, {},
|
|
|
2033
2033
|
placeholder: string;
|
|
2034
2034
|
size: InputSize;
|
|
2035
2035
|
iconClass: string;
|
|
2036
|
-
clearLabel: string;
|
|
2037
2036
|
autofocus: boolean;
|
|
2037
|
+
clearLabel: string;
|
|
2038
2038
|
autocomplete: string;
|
|
2039
2039
|
clearable: boolean;
|
|
2040
2040
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -2086,11 +2086,11 @@ declare const __VLS_export$5: import("vue").DefineComponent<__VLS_Props$5, {}, {
|
|
|
2086
2086
|
placeholder: string;
|
|
2087
2087
|
size: NumberInputSize;
|
|
2088
2088
|
max: string;
|
|
2089
|
-
autofocus: boolean;
|
|
2090
|
-
step: string;
|
|
2091
|
-
min: string;
|
|
2092
2089
|
incrementLabel: string;
|
|
2093
2090
|
decrementLabel: string;
|
|
2091
|
+
autofocus: boolean;
|
|
2092
|
+
min: string;
|
|
2093
|
+
step: string;
|
|
2094
2094
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
2095
2095
|
declare const _default$28: typeof __VLS_export$5;
|
|
2096
2096
|
//#endregion
|
|
@@ -2323,12 +2323,12 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
2323
2323
|
disabled: boolean;
|
|
2324
2324
|
name: string;
|
|
2325
2325
|
size: SliderSize;
|
|
2326
|
-
defaultValue: number | number[];
|
|
2327
2326
|
ariaLabel: string;
|
|
2328
|
-
orientation: "horizontal" | "vertical";
|
|
2329
2327
|
max: number;
|
|
2330
|
-
|
|
2328
|
+
defaultValue: number | number[];
|
|
2329
|
+
orientation: "horizontal" | "vertical";
|
|
2331
2330
|
min: number;
|
|
2331
|
+
step: number;
|
|
2332
2332
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
2333
2333
|
declare const _default$40: typeof __VLS_export;
|
|
2334
2334
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@notnotype/nb-plugin-sdk",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "NeuroBook 插件 SDK:类型与构建期实现;插件运行时由宿主提供同一份",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -76,6 +76,17 @@
|
|
|
76
76
|
"url": "git+https://github.com/notnotype/neuro-book.git",
|
|
77
77
|
"directory": "packages/neuro-book/plugin-sdk"
|
|
78
78
|
},
|
|
79
|
+
"keywords": [
|
|
80
|
+
"neurobook",
|
|
81
|
+
"plugin",
|
|
82
|
+
"sdk",
|
|
83
|
+
"vue",
|
|
84
|
+
"bun"
|
|
85
|
+
],
|
|
86
|
+
"homepage": "https://github.com/notnotype/neuro-book/tree/master/packages/neuro-book/plugin-sdk#readme",
|
|
87
|
+
"bugs": {
|
|
88
|
+
"url": "https://github.com/notnotype/neuro-book/issues"
|
|
89
|
+
},
|
|
79
90
|
"publishConfig": {
|
|
80
91
|
"access": "public"
|
|
81
92
|
}
|
|
@@ -58,7 +58,7 @@ owners:
|
|
|
58
58
|
3. **切换:** 下一次启动时,先把登记表改指新版本,再按新版本的清单登记;旧版本目录在切换后删除。已禁用的插件只切换文件与登记,不激活。
|
|
59
59
|
4. **数据:** 私有存储、配置与密钥跨版本保留。数据格式的迁移由插件自己完成;激活时 SDK 提供上一次成功激活的版本号(首次安装为空,[`runtime.plugin-api`](plugin-api.md))。
|
|
60
60
|
9. **生效时机可见。** 插件管理界面写明安装、卸载、升级、启用与禁用在下一次启动后生效;有待生效变化时,列表在对应插件上显示它,并提示重启。
|
|
61
|
-
10. **显示名与问题。** 列表的每一项另带清单的显示名与说明(`displayName`、`description`,内置插件与没写的为空),以及服务端实例此刻的问题:入口激活失败(阶段、原因与错误消息)、入口受阻(原因与缺的服务)、贡献被拒(贡献点、贡献 id、原因与说明)。浏览器一侧的问题由各窗口经 `window.plugins.problems()` 查本窗口的(`runtime.browser-host`(仓库里的 `docs/specs/runtime/browser-host.md`))。插件页在 id
|
|
61
|
+
10. **显示名与问题。** 列表的每一项另带清单的显示名与说明(`displayName`、`description`,内置插件与没写的为空),以及服务端实例此刻的问题:入口激活失败(阶段、原因与错误消息)、入口受阻(原因与缺的服务)、贡献被拒(贡献点、贡献 id、原因与说明)。浏览器一侧的问题由各窗口经 `window.plugins.problems()` 查本窗口的(`runtime.browser-host`(仓库里的 `docs/specs/runtime/browser-host.md`))。插件页在 id 旁边写显示名、下面写说明(内置插件的名称与说明由插件页按界面语言给出),有问题的插件标出问题数并逐条列出原因(服务端的是打开页面时的快照,本窗口的随变化更新);没有的不占位。作者装上插件后不开控制台就能看到“为什么没出现”。
|
|
62
62
|
|
|
63
63
|
## 状态与转换
|
|
64
64
|
|