@lynx-js/lynx-stack-docs-canary 0.0.6-canary-20261113-5bc021a2 → 0.0.6

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.
@@ -119,6 +119,11 @@
119
119
  "name": "functions/TextField",
120
120
  "label": "TextField"
121
121
  },
122
+ {
123
+ "type": "file",
124
+ "name": "functions/createBasicFunctions",
125
+ "label": "createBasicFunctions"
126
+ },
122
127
  {
123
128
  "type": "file",
124
129
  "name": "functions/createFallbackMessagesFromPlainText",
@@ -0,0 +1,22 @@
1
+ # Function: createBasicFunctions()
2
+
3
+ > **createBasicFunctions**(`options?`: [`BasicFunctionOptions`](../interfaces/BasicFunctionOptions.mdx)): readonly [`CatalogFunctionEntry`](../interfaces/CatalogFunctionEntry.mdx)[]
4
+
5
+ Create basic catalog functions with per-catalog host capabilities.
6
+
7
+ ## Parameters
8
+
9
+ | Parameter | Type | Description |
10
+ | ------ | ------ | ------ |
11
+ | `options` | [`BasicFunctionOptions`](../interfaces/BasicFunctionOptions.mdx) | Native host callbacks; browser navigation is used by default. |
12
+
13
+ ## Returns
14
+
15
+ readonly [`CatalogFunctionEntry`](../interfaces/CatalogFunctionEntry.mdx)[]
16
+
17
+ ## Example
18
+
19
+ ```ts
20
+ const functions = createBasicFunctions({ openUrl: url => hostNavigation.open(url) });
21
+ // Pass [...components, ...functions] as the A2UI catalogs prop.
22
+ ```
@@ -1,9 +1,21 @@
1
1
  # Function: registerBasicFunctions()
2
2
 
3
- > **registerBasicFunctions**(): `void`
3
+ > **registerBasicFunctions**(`options?`: [`BasicFunctionOptions`](../interfaces/BasicFunctionOptions.mdx)): `void`
4
4
 
5
- Register the same declared functions for consumers of the store API.
5
+ Register the declared functions and host callbacks in the shared store registry.
6
+
7
+ ## Parameters
8
+
9
+ | Parameter | Type | Description |
10
+ | ------ | ------ | ------ |
11
+ | `options` | [`BasicFunctionOptions`](../interfaces/BasicFunctionOptions.mdx) | Native host callbacks; browser navigation is used by default. |
6
12
 
7
13
  ## Returns
8
14
 
9
15
  `void`
16
+
17
+ ## Example
18
+
19
+ ```ts
20
+ registerBasicFunctions({ openUrl: url => hostNavigation.open(url) });
21
+ ```
@@ -9,6 +9,7 @@
9
9
 
10
10
  - [A2UIProps](interfaces/A2UIProps.mdx)
11
11
  - [ActionProps](interfaces/ActionProps.mdx)
12
+ - [BasicFunctionOptions](interfaces/BasicFunctionOptions.mdx)
12
13
  - [Catalog](interfaces/Catalog.mdx)
13
14
  - [CatalogFunctionEntry](interfaces/CatalogFunctionEntry.mdx)
14
15
  - [CheckLike](interfaces/CheckLike.mdx)
@@ -62,6 +63,7 @@
62
63
  - [CheckBox](functions/CheckBox.mdx)
63
64
  - [ChoicePicker](functions/ChoicePicker.mdx)
64
65
  - [Column](functions/Column.mdx)
66
+ - [createBasicFunctions](functions/createBasicFunctions.mdx)
65
67
  - [createFallbackMessagesFromPlainText](functions/createFallbackMessagesFromPlainText.mdx)
66
68
  - [createMessageStore](functions/createMessageStore.mdx)
67
69
  - [createTextCardMessages](functions/createTextCardMessages.mdx)
@@ -0,0 +1,34 @@
1
+ # Interface: BasicFunctionOptions
2
+
3
+ Host capabilities used by the built-in A2UI functions.
4
+
5
+ ## Properties
6
+
7
+ ### openUrl?
8
+
9
+ > `optional` **openUrl?**: (`url`: `string`) => `void` \| `Promise`\<`void`\>
10
+
11
+ Open a validated http, https, mailto, or tel URL through the native host.
12
+ Rejected promises are reported through the renderer's function error handling.
13
+
14
+ #### Parameters
15
+
16
+ | Parameter | Type |
17
+ | ------ | ------ |
18
+ | `url` | `string` |
19
+
20
+ #### Returns
21
+
22
+ `void` \| `Promise`\<`void`\>
23
+
24
+ #### Default Value
25
+
26
+ ```ts
27
+ Browser window.open when available; otherwise an error is thrown.
28
+ ```
29
+
30
+ #### Example
31
+
32
+ ```ts
33
+ { openUrl: url => hostNavigation.open(url) }
34
+ ```
@@ -119,6 +119,11 @@
119
119
  "name": "functions/TextField",
120
120
  "label": "TextField"
121
121
  },
122
+ {
123
+ "type": "file",
124
+ "name": "functions/createBasicFunctions",
125
+ "label": "createBasicFunctions"
126
+ },
122
127
  {
123
128
  "type": "file",
124
129
  "name": "functions/createFallbackMessagesFromPlainText",
@@ -0,0 +1,22 @@
1
+ # Function: createBasicFunctions()
2
+
3
+ > **createBasicFunctions**(`options?`: [`BasicFunctionOptions`](../interfaces/BasicFunctionOptions.mdx)): readonly [`CatalogFunctionEntry`](../interfaces/CatalogFunctionEntry.mdx)[]
4
+
5
+ 创建具有独立宿主能力的基本目录函数。
6
+
7
+ ## Parameters
8
+
9
+ | Parameter | Type | Description |
10
+ | ------ | ------ | ------ |
11
+ | `options` | [`BasicFunctionOptions`](../interfaces/BasicFunctionOptions.mdx) | 原生宿主回调;默认使用浏览器导航。 |
12
+
13
+ ## Returns
14
+
15
+ readonly [`CatalogFunctionEntry`](../interfaces/CatalogFunctionEntry.mdx)[]
16
+
17
+ ## Example
18
+
19
+ ```ts
20
+ const functions = createBasicFunctions({ openUrl: url => hostNavigation.open(url) });
21
+ // Pass [...components, ...functions] as the A2UI catalogs prop.
22
+ ```
@@ -1,9 +1,21 @@
1
1
  # Function: registerBasicFunctions()
2
2
 
3
- > **registerBasicFunctions**(): `void`
3
+ > **registerBasicFunctions**(`options?`: [`BasicFunctionOptions`](../interfaces/BasicFunctionOptions.mdx)): `void`
4
4
 
5
- 为存储 API 的消费者注册同一组已声明函数。
5
+ 将声明的函数和宿主回调注册到共享的存储层函数注册表。
6
+
7
+ ## Parameters
8
+
9
+ | Parameter | Type | Description |
10
+ | ------ | ------ | ------ |
11
+ | `options` | [`BasicFunctionOptions`](../interfaces/BasicFunctionOptions.mdx) | 原生宿主回调;默认使用浏览器导航。 |
6
12
 
7
13
  ## Returns
8
14
 
9
15
  `void`
16
+
17
+ ## Example
18
+
19
+ ```ts
20
+ registerBasicFunctions({ openUrl: url => hostNavigation.open(url) });
21
+ ```
@@ -9,6 +9,7 @@
9
9
 
10
10
  - [A2UIProps](interfaces/A2UIProps.mdx)
11
11
  - [ActionProps](interfaces/ActionProps.mdx)
12
+ - [BasicFunctionOptions](interfaces/BasicFunctionOptions.mdx)
12
13
  - [Catalog](interfaces/Catalog.mdx)
13
14
  - [CatalogFunctionEntry](interfaces/CatalogFunctionEntry.mdx)
14
15
  - [CheckLike](interfaces/CheckLike.mdx)
@@ -62,6 +63,7 @@
62
63
  - [CheckBox](functions/CheckBox.mdx)
63
64
  - [ChoicePicker](functions/ChoicePicker.mdx)
64
65
  - [Column](functions/Column.mdx)
66
+ - [createBasicFunctions](functions/createBasicFunctions.mdx)
65
67
  - [createFallbackMessagesFromPlainText](functions/createFallbackMessagesFromPlainText.mdx)
66
68
  - [createMessageStore](functions/createMessageStore.mdx)
67
69
  - [createTextCardMessages](functions/createTextCardMessages.mdx)
@@ -0,0 +1,34 @@
1
+ # Interface: BasicFunctionOptions
2
+
3
+ 内置 A2UI 函数使用的宿主能力。
4
+
5
+ ## Properties
6
+
7
+ ### openUrl?
8
+
9
+ > `optional` **openUrl?**: (`url`: `string`) => `void` \| `Promise`\<`void`\>
10
+
11
+ 通过原生宿主打开已校验的 http、https、mailto 或 tel URL。
12
+ Promise 拒绝时,通过渲染器的函数错误处理机制报告。
13
+
14
+ #### Parameters
15
+
16
+ | Parameter | Type |
17
+ | ------ | ------ |
18
+ | `url` | `string` |
19
+
20
+ #### Returns
21
+
22
+ `void` \| `Promise`\<`void`\>
23
+
24
+ #### Default Value
25
+
26
+ ```ts
27
+ Browser window.open when available; otherwise an error is thrown.
28
+ ```
29
+
30
+ #### Example
31
+
32
+ ```ts
33
+ { openUrl: url => hostNavigation.open(url) }
34
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/lynx-stack-docs-canary",
3
- "version": "0.0.6-canary-20261113-5bc021a2",
3
+ "version": "0.0.6",
4
4
  "description": "The Lynx Stack API reference as MDX pages: the build configuration, the Rsbuild plugins, ReactLynx and every @lynx-js package.",
5
5
  "keywords": [
6
6
  "Lynx",
@@ -24,17 +24,17 @@
24
24
  ],
25
25
  "devDependencies": {
26
26
  "@lynx-js/autolink-codegen": "npm:@lynx-js/autolink-codegen-canary@0.6.0",
27
- "@lynx-js/cache-events-webpack-plugin": "npm:@lynx-js/cache-events-webpack-plugin-canary@0.2.3-canary-20261113-5bc021a2",
27
+ "@lynx-js/cache-events-webpack-plugin": "npm:@lynx-js/cache-events-webpack-plugin-canary@0.2.3",
28
28
  "@lynx-js/chunk-loading-webpack-plugin": "npm:@lynx-js/chunk-loading-webpack-plugin-canary@0.4.3",
29
29
  "@lynx-js/config-rsbuild-plugin": "npm:@lynx-js/config-rsbuild-plugin-canary@0.2.5",
30
- "@lynx-js/create-lynx": "npm:@lynx-js/create-lynx-canary@0.2.2-canary-20261113-5bc021a2",
30
+ "@lynx-js/create-lynx": "npm:@lynx-js/create-lynx-canary@0.2.2",
31
31
  "@lynx-js/css-extract-webpack-plugin": "npm:@lynx-js/css-extract-webpack-plugin-canary@0.11.2",
32
32
  "@lynx-js/css-serializer": "npm:@lynx-js/css-serializer-canary@0.1.9",
33
33
  "@lynx-js/debug-metadata": "npm:@lynx-js/debug-metadata-canary@0.1.0",
34
34
  "@lynx-js/debug-metadata-rsbuild-plugin": "npm:@lynx-js/debug-metadata-rsbuild-plugin-canary@0.2.3",
35
35
  "@lynx-js/external-bundle-rsbuild-plugin": "npm:@lynx-js/external-bundle-rsbuild-plugin-canary@0.5.0",
36
36
  "@lynx-js/externals-loading-webpack-plugin": "npm:@lynx-js/externals-loading-webpack-plugin-canary@0.3.0",
37
- "@lynx-js/genui": "npm:@lynx-js/genui-canary@0.8.0-canary-20261113-5bc021a2",
37
+ "@lynx-js/genui": "npm:@lynx-js/genui-canary@0.8.0",
38
38
  "@lynx-js/genui-a2ui": "0.0.0",
39
39
  "@lynx-js/genui-a2ui-catalog-extractor": "0.0.0",
40
40
  "@lynx-js/genui-a2ui-prompt": "0.0.0",
@@ -48,22 +48,22 @@
48
48
  "@lynx-js/lynx-bundle-rslib-config": "npm:@lynx-js/lynx-bundle-rslib-config-canary@0.8.1",
49
49
  "@lynx-js/motion": "npm:@lynx-js/motion-canary@0.0.8",
50
50
  "@lynx-js/qrcode-rsbuild-plugin": "npm:@lynx-js/qrcode-rsbuild-plugin-canary@0.7.3",
51
- "@lynx-js/react": "npm:@lynx-js/react-canary@0.129.3-canary-20261113-5bc021a2",
52
- "@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.22.3-canary-20261113-5bc021a2",
51
+ "@lynx-js/react": "npm:@lynx-js/react-canary@0.129.3",
52
+ "@lynx-js/react-alias-rsbuild-plugin": "npm:@lynx-js/react-alias-rsbuild-plugin-canary@0.22.3",
53
53
  "@lynx-js/react-refresh-webpack-plugin": "npm:@lynx-js/react-refresh-webpack-plugin-canary@0.4.6",
54
- "@lynx-js/react-rsbuild-plugin": "npm:@lynx-js/react-rsbuild-plugin-canary@0.22.3-canary-20261113-5bc021a2",
54
+ "@lynx-js/react-rsbuild-plugin": "npm:@lynx-js/react-rsbuild-plugin-canary@0.22.3",
55
55
  "@lynx-js/react-signals": "npm:@lynx-js/react-signals-canary@0.0.7",
56
56
  "@lynx-js/react-webpack-plugin": "npm:@lynx-js/react-webpack-plugin-canary@0.15.1",
57
57
  "@lynx-js/reactlynx-testing-library": "0.0.0",
58
- "@lynx-js/rsbuild-plugin": "npm:@lynx-js/rsbuild-plugin-canary@0.1.9-canary-20261113-5bc021a2",
59
- "@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.18.6-canary-20261113-5bc021a2",
58
+ "@lynx-js/rsbuild-plugin": "npm:@lynx-js/rsbuild-plugin-canary@0.1.9",
59
+ "@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.18.6",
60
60
  "@lynx-js/runtime-config-webpack-plugin": "npm:@lynx-js/runtime-config-webpack-plugin-canary@0.0.3",
61
61
  "@lynx-js/runtime-wrapper-webpack-plugin": "npm:@lynx-js/runtime-wrapper-webpack-plugin-canary@0.2.6",
62
- "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.16.8-canary-20261113-5bc021a2",
62
+ "@lynx-js/template-webpack-plugin": "npm:@lynx-js/template-webpack-plugin-canary@0.16.8",
63
63
  "@lynx-js/testing-environment": "npm:@lynx-js/testing-environment-canary@0.4.0",
64
- "@lynx-js/vanilla-rsbuild-plugin": "npm:@lynx-js/vanilla-rsbuild-plugin-canary@0.1.8-canary-20261113-5bc021a2",
64
+ "@lynx-js/vanilla-rsbuild-plugin": "npm:@lynx-js/vanilla-rsbuild-plugin-canary@0.1.8",
65
65
  "@lynx-js/web-platform-rsbuild-plugin": "npm:@lynx-js/web-platform-rsbuild-plugin-canary@0.1.2",
66
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.26.8-canary-20261113-5bc021a2",
66
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.26.8",
67
67
  "@lynx-js/webpack-runtime-globals": "npm:@lynx-js/webpack-runtime-globals-canary@0.0.9",
68
68
  "@lynx-js/websocket": "npm:@lynx-js/websocket-canary@0.0.4",
69
69
  "@rspress/core": "2.0.21",