@nan0web/ui 3.1.0 → 3.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nan0web/ui",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "NaN•Web UI. One application logic (algorithm) and many UI.",
5
5
  "main": "src/index.js",
6
6
  "types": "types/index.d.ts",
@@ -89,22 +89,22 @@
89
89
  "vite": "^6.4.1",
90
90
  "vitest": "^3.2.4",
91
91
  "@nan0web/db-fs": "3.1.0",
92
- "@nan0web/i18n": "3.1.0",
93
- "@nan0web/icons": "3.1.0",
94
92
  "@nan0web/inspect": "3.1.0",
93
+ "@nan0web/ui-cli": "3.1.1",
94
+ "@nan0web/i18n": "3.1.1",
95
+ "@nan0web/icons": "3.1.0",
96
+ "@nan0web/release": "3.1.1",
95
97
  "@nan0web/test": "3.1.0",
96
98
  "@nan0web/ui-lit": "3.1.0",
97
- "@nan0web/ui-cli": "3.1.0",
98
- "@nan0web/nan0web.app": "3.1.0",
99
- "@nan0web/release": "3.1.0"
99
+ "@nan0web/nan0web.app": "3.1.0"
100
100
  },
101
101
  "dependencies": {
102
102
  "string-width": "^7.2.0",
103
103
  "@nan0web/co": "3.1.0",
104
- "@nan0web/core": "3.1.0",
105
104
  "@nan0web/event": "3.1.0",
106
105
  "@nan0web/log": "3.1.0",
107
- "@nan0web/types": "3.1.0"
106
+ "@nan0web/types": "3.1.0",
107
+ "@nan0web/core": "3.1.0"
108
108
  },
109
109
  "scripts": {
110
110
  "prebuild": "rm -rf types/",
@@ -311,7 +311,7 @@ export class ModelAsApp extends Model {
311
311
  */
312
312
  async *run() {
313
313
  // 1. Automatic Help Handling (Premium OLMUI style)
314
- if (/** @type {any} */ (this).help) {
314
+ if (this.help) {
315
315
  const content = this.generateHelp()
316
316
  const UI = /** @type {any} */ (this.constructor).UI || {}
317
317
  const title = UI.title || this.constructor.name
@@ -10,57 +10,57 @@
10
10
  * @property {boolean} help Show help
11
11
  */
12
12
  export class ModelAsApp extends Model {
13
- static help: {
14
- help: string;
15
- default: boolean;
16
- };
17
- /**
18
- * Execute the model programmatically without a UI adapter.
19
- * @param {any} [data]
20
- * @param {Partial<ModelAsAppOptions>} [options]
21
- * @returns {Promise<any>}
22
- */
23
- static execute(data?: any, options?: Partial<ModelAsAppOptions>): Promise<any>;
24
- /**
25
- * @param {Partial<ModelAsApp> | Record<string, any>} [data={}]
26
- * @param {Partial<ModelAsAppOptions>} [options={}]
27
- */
28
- constructor(data?: Partial<ModelAsApp> | Record<string, any>, options?: Partial<ModelAsAppOptions>);
13
+ static help: {
14
+ help: string;
15
+ default: boolean;
16
+ };
17
+ /**
18
+ * Execute the model programmatically without a UI adapter.
19
+ * @param {any} [data]
20
+ * @param {Partial<ModelAsAppOptions>} [options]
21
+ * @returns {Promise<any>}
22
+ */
23
+ static execute(data?: any, options?: Partial<ModelAsAppOptions>): Promise<any>;
24
+ /**
25
+ * @param {Partial<ModelAsApp> | Record<string, any>} [data={}]
26
+ * @param {Partial<ModelAsAppOptions>} [options={}]
27
+ */
28
+ constructor(data?: Partial<ModelAsApp> | Record<string, any>, options?: Partial<ModelAsAppOptions>);
29
29
  /** @type {boolean} Show help */ help: boolean;
30
- _: {
31
- adapter: InputAdapter;
32
- parentPath: string;
33
- _isExplicit: boolean;
34
- db: import("@nan0web/db").default | null | undefined;
35
- plugins: Record<string, any>;
36
- t: import("../../../types/types/utils/TFunction.js").TFunction;
37
- };
38
- /**
39
- * Instantiates a subcommand if the value matches one of the options.
40
- * @param {string} key - Field name.
41
- * @param {any} val - Current value (string, class, or instance).
42
- * @param {any} [data={}] - Data to pass to the new instance.
43
- * @returns {any} Instantiated subcommand or original value.
44
- */
45
- _instantiateSubCommand(key: string, val: any, data?: any): any;
46
- /**
47
- * Generate help text for the model
48
- * @param {string} [parentPath]
49
- * @returns {string}
50
- */
51
- generateHelp(parentPath?: string): string;
52
- /**
53
- * Default execution generator.
54
- * Automatically delegates to the first instantiated subcommand field.
55
- *
56
- * @returns {AsyncGenerator<import('@nan0web/ui').Intent, import('@nan0web/ui').ResultIntent, any>}
57
- */
58
- run(): AsyncGenerator<import("@nan0web/ui").Intent, import("@nan0web/ui").ResultIntent, any>;
30
+ _: {
31
+ adapter: InputAdapter;
32
+ parentPath: string;
33
+ _isExplicit: boolean;
34
+ db: import("@nan0web/db").default | null | undefined;
35
+ plugins: Record<string, any>;
36
+ t: import("../../../types/types/utils/TFunction.js").TFunction;
37
+ };
38
+ /**
39
+ * Instantiates a subcommand if the value matches one of the options.
40
+ * @param {string} key - Field name.
41
+ * @param {any} val - Current value (string, class, or instance).
42
+ * @param {any} [data={}] - Data to pass to the new instance.
43
+ * @returns {any} Instantiated subcommand or original value.
44
+ */
45
+ _instantiateSubCommand(key: string, val: any, data?: any): any;
46
+ /**
47
+ * Generate help text for the model
48
+ * @param {string} [parentPath]
49
+ * @returns {string}
50
+ */
51
+ generateHelp(parentPath?: string): string;
52
+ /**
53
+ * Default execution generator.
54
+ * Automatically delegates to the first instantiated subcommand field.
55
+ *
56
+ * @returns {AsyncGenerator<import('@nan0web/ui').Intent, import('@nan0web/ui').ResultIntent, any>}
57
+ */
58
+ run(): AsyncGenerator<import("@nan0web/ui").Intent, import("@nan0web/ui").ResultIntent, any>;
59
59
  }
60
60
  export type AppOptions = {
61
- adapter: InputAdapter;
62
- parentPath: string;
63
- _isExplicit: boolean;
61
+ adapter: InputAdapter;
62
+ parentPath: string;
63
+ _isExplicit: boolean;
64
64
  };
65
65
  export type ModelAsAppOptions = import("@nan0web/types").ModelOptions & AppOptions;
66
66
  import { Model } from '@nan0web/types';