@nocobase/plugin-flow-engine 2.1.31 → 2.2.0-alpha.10

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.
Files changed (45) hide show
  1. package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/getContextApis.js +2 -2
  2. package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/getContextEnvs.js +2 -2
  3. package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/getContextVars.js +2 -2
  4. package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/lintAndTestJS.js +2 -2
  5. package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/patchJSCode.js +2 -2
  6. package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/readJSCode.js +2 -2
  7. package/dist/ai/ai-employees/nathan/skills/frontend-developer/tools/writeJSCode.js +2 -2
  8. package/dist/ai/docs/runjs/context/ai.md +206 -0
  9. package/dist/externalVersion.js +9 -9
  10. package/dist/node_modules/@ant-design/icons-svg/package.json +1 -1
  11. package/dist/node_modules/acorn/package.json +1 -1
  12. package/dist/node_modules/acorn-jsx/package.json +1 -1
  13. package/dist/node_modules/acorn-walk/package.json +1 -1
  14. package/dist/node_modules/ses/package.json +1 -1
  15. package/dist/node_modules/zod/package.json +1 -1
  16. package/dist/server/flow-surfaces/authoring-validation.d.ts +3 -1
  17. package/dist/server/flow-surfaces/authoring-validation.js +30 -10
  18. package/dist/server/flow-surfaces/blueprint/compile-plan.js +23 -15
  19. package/dist/server/flow-surfaces/blueprint/normalize-document.js +18 -1
  20. package/dist/server/flow-surfaces/blueprint/public-types.d.ts +2 -0
  21. package/dist/server/flow-surfaces/builder.js +24 -4
  22. package/dist/server/flow-surfaces/constants.d.ts +9 -2
  23. package/dist/server/flow-surfaces/constants.js +1 -0
  24. package/dist/server/flow-surfaces/errors.d.ts +2 -2
  25. package/dist/server/flow-surfaces/errors.js +4 -4
  26. package/dist/server/flow-surfaces/navigation-targets.d.ts +73 -0
  27. package/dist/server/flow-surfaces/navigation-targets.js +439 -0
  28. package/dist/server/flow-surfaces/runjs-authoring/rules.js +0 -2
  29. package/dist/server/flow-surfaces/runjs-authoring/runtime/constants.d.ts +0 -1
  30. package/dist/server/flow-surfaces/runjs-authoring/runtime/constants.js +12 -19
  31. package/dist/server/flow-surfaces/runjs-authoring/runtime/types.d.ts +0 -12
  32. package/dist/server/flow-surfaces/runjs-authoring/scan/index.d.ts +0 -14
  33. package/dist/server/flow-surfaces/runjs-authoring/scan/index.js +1 -7
  34. package/dist/server/flow-surfaces/runjs-authoring/scan/source-patterns.d.ts +0 -14
  35. package/dist/server/flow-surfaces/runjs-authoring/scan/source-patterns.js +18 -73
  36. package/dist/server/flow-surfaces/runjs-authoring/types.d.ts +1 -1
  37. package/dist/server/flow-surfaces/runjs-authoring/validators/index.js +9 -53
  38. package/dist/server/flow-surfaces/service.d.ts +31 -0
  39. package/dist/server/flow-surfaces/service.js +749 -53
  40. package/dist/swagger/flow-surfaces.d.ts +108 -0
  41. package/dist/swagger/flow-surfaces.js +101 -8
  42. package/dist/swagger/index.d.ts +108 -0
  43. package/package.json +2 -2
  44. package/dist/server/flow-surfaces/runjs-authoring/blocked-global-stop/index.d.ts +0 -10
  45. package/dist/server/flow-surfaces/runjs-authoring/blocked-global-stop/index.js +0 -40
@@ -36,8 +36,8 @@ var getContextApis_default = (0, import_ai.defineTools)({
36
36
  execution: "frontend",
37
37
  defaultPermission: "ALLOW",
38
38
  introduction: {
39
- title: `{{t("ai.tools.getContextApis.title")}}`,
40
- about: `{{t("ai.tools.getContextApis.about")}}`
39
+ title: `{{t("ai.tools.getContextApis.title", { ns: "@nocobase/plugin-ai" })}}`,
40
+ about: `{{t("ai.tools.getContextApis.about", { ns: "@nocobase/plugin-ai" })}}`
41
41
  },
42
42
  definition: {
43
43
  name: "getContextApis",
@@ -36,8 +36,8 @@ var getContextEnvs_default = (0, import_ai.defineTools)({
36
36
  execution: "frontend",
37
37
  defaultPermission: "ALLOW",
38
38
  introduction: {
39
- title: `{{t("ai.tools.getContextEnvs.title")}}`,
40
- about: `{{t("ai.tools.getContextEnvs.about")}}`
39
+ title: `{{t("ai.tools.getContextEnvs.title", { ns: "@nocobase/plugin-ai" })}}`,
40
+ about: `{{t("ai.tools.getContextEnvs.about", { ns: "@nocobase/plugin-ai" })}}`
41
41
  },
42
42
  definition: {
43
43
  name: "getContextEnvs",
@@ -36,8 +36,8 @@ var getContextVars_default = (0, import_ai.defineTools)({
36
36
  execution: "frontend",
37
37
  defaultPermission: "ALLOW",
38
38
  introduction: {
39
- title: `{{t("ai.tools.getContextVars.title")}}`,
40
- about: `{{t("ai.tools.getContextVars.about")}}`
39
+ title: `{{t("ai.tools.getContextVars.title", { ns: "@nocobase/plugin-ai" })}}`,
40
+ about: `{{t("ai.tools.getContextVars.about", { ns: "@nocobase/plugin-ai" })}}`
41
41
  },
42
42
  definition: {
43
43
  name: "getContextVars",
@@ -36,8 +36,8 @@ var lintAndTestJS_default = (0, import_ai.defineTools)({
36
36
  execution: "frontend",
37
37
  defaultPermission: "ALLOW",
38
38
  introduction: {
39
- title: `{{t("ai.tools.lintAndTestJS.title")}}`,
40
- about: `{{t("ai.tools.lintAndTestJS.about")}}`
39
+ title: `{{t("ai.tools.lintAndTestJS.title", { ns: "@nocobase/plugin-ai" })}}`,
40
+ about: `{{t("ai.tools.lintAndTestJS.about", { ns: "@nocobase/plugin-ai" })}}`
41
41
  },
42
42
  definition: {
43
43
  name: "lintAndTestJS",
@@ -36,8 +36,8 @@ var patchJSCode_default = (0, import_ai.defineTools)({
36
36
  execution: "frontend",
37
37
  defaultPermission: "ALLOW",
38
38
  introduction: {
39
- title: `{{t("ai.tools.patchJSCode.title")}}`,
40
- about: `{{t("ai.tools.patchJSCode.about")}}`
39
+ title: `{{t("ai.tools.patchJSCode.title", { ns: "@nocobase/plugin-ai" })}}`,
40
+ about: `{{t("ai.tools.patchJSCode.about", { ns: "@nocobase/plugin-ai" })}}`
41
41
  },
42
42
  definition: {
43
43
  name: "patchJSCode",
@@ -36,8 +36,8 @@ var readJSCode_default = (0, import_ai.defineTools)({
36
36
  execution: "frontend",
37
37
  defaultPermission: "ALLOW",
38
38
  introduction: {
39
- title: `{{t("ai.tools.readJSCode.title")}}`,
40
- about: `{{t("ai.tools.readJSCode.about")}}`
39
+ title: `{{t("ai.tools.readJSCode.title", { ns: "@nocobase/plugin-ai" })}}`,
40
+ about: `{{t("ai.tools.readJSCode.about", { ns: "@nocobase/plugin-ai" })}}`
41
41
  },
42
42
  definition: {
43
43
  name: "readJSCode",
@@ -36,8 +36,8 @@ var writeJSCode_default = (0, import_ai.defineTools)({
36
36
  execution: "frontend",
37
37
  defaultPermission: "ALLOW",
38
38
  introduction: {
39
- title: `{{t("ai.tools.writeJSCode.title")}}`,
40
- about: `{{t("ai.tools.writeJSCode.about")}}`
39
+ title: `{{t("ai.tools.writeJSCode.title", { ns: "@nocobase/plugin-ai" })}}`,
40
+ about: `{{t("ai.tools.writeJSCode.about", { ns: "@nocobase/plugin-ai" })}}`
41
41
  },
42
42
  definition: {
43
43
  name: "writeJSCode",
@@ -0,0 +1,206 @@
1
+ ---
2
+ title: "ctx.ai"
3
+ description: "Use ctx.ai in RunJS to trigger AI employee tasks, either with inline task content or with tasks configured on an AI employee action."
4
+ keywords: "ctx.ai,AI employee,triggerTask,triggerModelTask,RunJS,NocoBase"
5
+ ---
6
+
7
+ # ctx.ai
8
+
9
+ Use `ctx.ai` in RunJS to trigger **AI employee tasks**. It works well in JSBlock, JSAction, and other interactions where a button, form, or business flow needs to hand work to a specific AI employee.
10
+
11
+ `ctx.ai` only triggers tasks. It does not return the execution result of the AI employee task. After the call, the task enters the AI employee conversation flow, and the result is handled by the AI employee session.
12
+
13
+ :::warning Note
14
+
15
+ `ctx.ai` is provided by the AI plugin. If the AI plugin is not enabled, or the current RunJS environment has not loaded the corresponding client capability, `ctx.ai` may not exist. You can check `ctx.ai?.triggerTask` or `ctx.ai?.triggerModelTask` before calling it.
16
+
17
+ :::
18
+
19
+ ## Methods
20
+
21
+ ### ctx.ai.triggerTask()
22
+
23
+ Trigger an AI employee task directly.
24
+
25
+ ```ts
26
+ ctx.ai.triggerTask(options: TriggerTaskOptions): void
27
+ ```
28
+
29
+ | Parameter | Type | Description |
30
+ |------|------|------|
31
+ | `aiEmployee` | `string \| AIEmployee` | AI employee. When a string is passed, NocoBase matches `AIEmployee.username` exactly, and the AI employee must be accessible to the current user. |
32
+ | `tasks` | `Task[]` | Tasks to trigger. |
33
+ | `open` | `boolean` | Whether to open the AI employee conversation panel. |
34
+ | `auto` | `boolean` | Whether to use the auto-trigger semantics of an AI employee action. |
35
+
36
+ Common `Task` fields:
37
+
38
+ | Field | Type | Description |
39
+ |------|------|------|
40
+ | `title` | `string` | Task title. |
41
+ | `message.system` | `string` | System message, used to constrain the AI employee's role and output requirements. |
42
+ | `message.user` | `string` | User message, which is the main instruction for this task. |
43
+ | `message.workContext` | `ContextItem[]` | Page block context used by the task. |
44
+ | `autoSend` | `boolean` | Whether to send the task message automatically. |
45
+ | `webSearch` | `boolean` | Whether Web search is allowed for this task. |
46
+ | `model` | `{ llmService: string; model: string } \| null` | Model used by this task. |
47
+ | `skillSettings` | `SkillSettings` | Skills and tools available to this task. |
48
+
49
+ ### Add Page Block Context
50
+
51
+ `message.workContext` currently passes page blocks. Put the FlowModel uid of the target page block into it:
52
+
53
+ ```ts
54
+ message: {
55
+ user: 'Review the current users table and summarize operational risks.',
56
+ workContext: [
57
+ {
58
+ type: 'flow-model',
59
+ uid: 'USERS_TABLE_BLOCK_UID',
60
+ },
61
+ ],
62
+ }
63
+ ```
64
+
65
+ | Field | Description |
66
+ |------|------|
67
+ | `type` | Fixed to `flow-model`, meaning this item is a page block context. |
68
+ | `uid` | FlowModel uid of the page block, such as a table block, detail block, or chart block. |
69
+
70
+ If you want to use the current JSBlock itself as context, use the current model uid:
71
+
72
+ ```ts
73
+ workContext: [
74
+ {
75
+ type: 'flow-model',
76
+ uid: ctx.model.uid,
77
+ },
78
+ ],
79
+ ```
80
+
81
+ Usually, `message.workContext` should be placed inside the `message` of a concrete task. `triggerModelTask()` reuses the task configured on the target AI employee action, so it also reads `message.workContext` from that task.
82
+
83
+ ### Specify Model
84
+
85
+ `model` specifies the model for a single task. If omitted, the AI employee's default model configuration is used. Passing `null` means no task-level model is specified.
86
+
87
+ ```ts
88
+ model: {
89
+ llmService: 'openai-main',
90
+ model: 'gpt-4.1',
91
+ }
92
+ ```
93
+
94
+ ### Configure Skills / Tools
95
+
96
+ `skillSettings` specifies the skills and tools available to a single task. If omitted, the AI employee's own capability configuration is used.
97
+
98
+ ```ts
99
+ skillSettings: {
100
+ skillsVersion: 2,
101
+ toolsVersion: 2,
102
+ skills: ['business-analysis-report'],
103
+ tools: ['businessReportGenerator'],
104
+ }
105
+ ```
106
+
107
+ To explicitly disable all skills or tools for this task, pass empty arrays and keep the version fields:
108
+
109
+ ```ts
110
+ skillSettings: {
111
+ skillsVersion: 2,
112
+ toolsVersion: 2,
113
+ skills: [],
114
+ tools: [],
115
+ }
116
+ ```
117
+
118
+ The following example asks `viz` to generate a handoff brief and opens the AI employee conversation panel:
119
+
120
+ ```ts
121
+ if (!ctx.ai?.triggerTask) {
122
+ ctx.message.error(ctx.t('AI employee task API is not available.'));
123
+ return;
124
+ }
125
+
126
+ ctx.ai.triggerTask({
127
+ aiEmployee: 'viz',
128
+ open: true,
129
+ tasks: [
130
+ {
131
+ title: ctx.t('Daily operations handoff brief'),
132
+ message: {
133
+ system:
134
+ 'You prepare reusable daily operations handoff briefs. Focus on risks, blockers, decisions, owners, and next actions.',
135
+ user: [
136
+ "Prepare today's operations handoff brief.",
137
+ 'Cover customer escalations, SLA risks, approvals, and follow-up owners.',
138
+ 'Return a concise brief that can be posted to the team channel.',
139
+ ].join('\n'),
140
+ },
141
+ autoSend: true,
142
+ webSearch: false,
143
+ },
144
+ ],
145
+ });
146
+
147
+ ctx.message.success(ctx.t('AI employee task triggered.'));
148
+ ```
149
+
150
+ If `aiEmployee` is a string, NocoBase matches accessible AI employees by `username` exactly. If no match is found, the task is not triggered and a warning is printed to the console.
151
+
152
+ ### ctx.ai.triggerModelTask()
153
+
154
+ Read a task from an AI employee action model on the page and trigger it.
155
+
156
+ ```ts
157
+ ctx.ai.triggerModelTask(uid: string, taskIndex: number, options?: TriggerModelTaskOptions): void
158
+ ```
159
+
160
+ | Parameter | Type | Description |
161
+ |------|------|------|
162
+ | `uid` | `string` | FlowModel uid of the AI employee action. |
163
+ | `taskIndex` | `number` | Task index, starting from `0`. |
164
+ | `options.open` | `boolean` | Whether to open the AI employee conversation panel. |
165
+ | `options.auto` | `boolean` | Whether to use the auto-trigger semantics of an AI employee action. |
166
+
167
+ This method reads the AI employee and task configuration from the target model. It is useful when the task has already been configured on an AI employee action on the page, and RunJS only needs to trigger it.
168
+
169
+ ```ts
170
+ if (!ctx.ai?.triggerModelTask) {
171
+ ctx.message.error(ctx.t('AI employee task API is not available.'));
172
+ return;
173
+ }
174
+
175
+ const weeklyReviewActionUid = 'AI_EMPLOYEE_ACTION_MODEL_UID';
176
+
177
+ ctx.ai.triggerModelTask(weeklyReviewActionUid, 0, {
178
+ open: true,
179
+ });
180
+
181
+ ctx.message.success(ctx.t('Configured AI employee task triggered.'));
182
+ ```
183
+
184
+ If the target model does not exist, has no AI employee configured, or the specified index has no task, no task is triggered and a warning is printed to the console.
185
+
186
+ ## Which Method to Use
187
+
188
+ | Scenario | Recommended method |
189
+ |------|------|
190
+ | Task content is assembled dynamically in RunJS, such as from form values. | `ctx.ai.triggerTask()` |
191
+ | The task has already been configured on an AI employee action on the page, and RunJS only triggers it. | `ctx.ai.triggerModelTask()` |
192
+ | Business users need to adjust task content without changing code. | `ctx.ai.triggerModelTask()` |
193
+ | The AI employee, prompt, or sending behavior needs to be decided at runtime. | `ctx.ai.triggerTask()` |
194
+
195
+ ## Notes
196
+
197
+ - `triggerTask()` and `triggerModelTask()` are fire-and-forget. They do not return the execution result of the AI employee task.
198
+ - `aiEmployee` strings only match `AIEmployee.username` exactly. They do not match nicknames, job titles, or translated names.
199
+ - `triggerModelTask()` uses a `0`-based `taskIndex`.
200
+ - `triggerModelTask()` reads task configuration from the target AI employee action model. If the task needs work context, configure `message.workContext` on that task.
201
+
202
+ ## Related
203
+
204
+ - [ctx.message](./message.md): Show lightweight prompts before and after triggering tasks.
205
+ - [ctx.render](./render.md): Render buttons or forms in JSBlock.
206
+ - [ctx.model](./model.md): Get current FlowModel information.
@@ -8,16 +8,16 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.1.31",
11
+ "@nocobase/client": "2.2.0-alpha.10",
12
12
  "lodash": "4.18.1",
13
- "@nocobase/database": "2.1.31",
14
- "@nocobase/data-source-manager": "2.1.31",
15
- "@nocobase/resourcer": "2.1.31",
16
- "@nocobase/utils": "2.1.31",
17
- "@nocobase/cache": "2.1.31",
18
- "@nocobase/server": "2.1.31",
19
- "@nocobase/actions": "2.1.31",
13
+ "@nocobase/database": "2.2.0-alpha.10",
14
+ "@nocobase/data-source-manager": "2.2.0-alpha.10",
15
+ "@nocobase/resourcer": "2.2.0-alpha.10",
16
+ "@nocobase/utils": "2.2.0-alpha.10",
17
+ "@nocobase/cache": "2.2.0-alpha.10",
18
+ "@nocobase/server": "2.2.0-alpha.10",
19
+ "@nocobase/actions": "2.2.0-alpha.10",
20
20
  "sequelize": "6.35.2",
21
21
  "@formily/json-schema": "2.3.7",
22
- "@nocobase/ai": "2.1.31"
22
+ "@nocobase/ai": "2.2.0-alpha.10"
23
23
  };
@@ -1 +1 @@
1
- {"name":"@ant-design/icons-svg","version":"4.3.1","sideEffects":false,"description":"Abstract nodes for ant design icons.","contributors":["HeskeyBaozi <hezhiyu233@foxmail.com>"],"homepage":"https://github.com/ant-design/ant-design-icons/","license":"MIT","main":"lib/index.js","module":"es/index.js","files":["lib","es","inline-svg","inline-namespaced-svg"],"repository":{"type":"git","url":"git+https://github.com/ant-design/ant-design-icons.git"},"scripts":{"g":"npm run generate","generate":"cross-env NODE_ENV=production gulp --require ts-node/register/transpile-only","type-check":"tsc --noEmit","build:es":"tsc --project tsconfig.build.json --module esnext --outDir es","build:lib":"tsc --project tsconfig.build.json --module commonjs --outDir lib","build":"cross-env NODE_ENV=production && npm run build:es && npm run build:lib","test":"cross-env NODE_ENV=test && npm run test:unit","test:unit":"jest","prepublishOnly":"npm run test && npm run g && npm run build && npm run type-check && npm run digest","digest":"node scripts/digest.js"},"bugs":{"url":"https://github.com/ant-design/ant-design-icons/issues"},"devDependencies":{"@babel/core":"^7.8.6","@babel/preset-env":"^7.8.6","@babel/preset-typescript":"^7.8.3","@rgrove/parse-xml":"^2.0.2","@types/gulp":"^4.0.6","@types/gulp-concat":"^0.0.32","@types/gulp-rename":"^0.0.33","@types/jest":"^25.1.3","@types/lodash.camelcase":"^4.3.6","@types/lodash.template":"^4.4.6","@types/lodash.upperfirst":"^4.3.6","@types/node":"^13.9.3","@types/ramda":"^0.26.43","@types/rgrove__parse-xml":"^1.1.0","@types/svgo":"^1.3.1","@types/through2":"^2.0.34","@typescript-eslint/eslint-plugin":"^2.21.0","@typescript-eslint/parser":"^2.21.0","babel-jest":"^25.1.0","cross-env":"^7.0.0","del":"^5.1.0","eslint":"^7.16.0","globby":"^11.0.0","gulp":"^4.0.2","gulp-clone":"^2.0.1","gulp-concat":"^2.6.1","gulp-header":"^2.0.9","gulp-rename":"^2.0.0","jest":"^25.1.0","lodash.camelcase":"^4.3.0","lodash.template":"^4.5.0","lodash.upperfirst":"^4.3.1","ramda":"^0.27.0","svgo":"^1.3.2","through2":"^3.0.1","ts-node":"^8.6.2","typescript":"^4.0.0","vinyl":"^2.2.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_lastModified":"2026-07-27T15:39:21.827Z"}
1
+ {"name":"@ant-design/icons-svg","version":"4.3.1","sideEffects":false,"description":"Abstract nodes for ant design icons.","contributors":["HeskeyBaozi <hezhiyu233@foxmail.com>"],"homepage":"https://github.com/ant-design/ant-design-icons/","license":"MIT","main":"lib/index.js","module":"es/index.js","files":["lib","es","inline-svg","inline-namespaced-svg"],"repository":{"type":"git","url":"git+https://github.com/ant-design/ant-design-icons.git"},"scripts":{"g":"npm run generate","generate":"cross-env NODE_ENV=production gulp --require ts-node/register/transpile-only","type-check":"tsc --noEmit","build:es":"tsc --project tsconfig.build.json --module esnext --outDir es","build:lib":"tsc --project tsconfig.build.json --module commonjs --outDir lib","build":"cross-env NODE_ENV=production && npm run build:es && npm run build:lib","test":"cross-env NODE_ENV=test && npm run test:unit","test:unit":"jest","prepublishOnly":"npm run test && npm run g && npm run build && npm run type-check && npm run digest","digest":"node scripts/digest.js"},"bugs":{"url":"https://github.com/ant-design/ant-design-icons/issues"},"devDependencies":{"@babel/core":"^7.8.6","@babel/preset-env":"^7.8.6","@babel/preset-typescript":"^7.8.3","@rgrove/parse-xml":"^2.0.2","@types/gulp":"^4.0.6","@types/gulp-concat":"^0.0.32","@types/gulp-rename":"^0.0.33","@types/jest":"^25.1.3","@types/lodash.camelcase":"^4.3.6","@types/lodash.template":"^4.4.6","@types/lodash.upperfirst":"^4.3.6","@types/node":"^13.9.3","@types/ramda":"^0.26.43","@types/rgrove__parse-xml":"^1.1.0","@types/svgo":"^1.3.1","@types/through2":"^2.0.34","@typescript-eslint/eslint-plugin":"^2.21.0","@typescript-eslint/parser":"^2.21.0","babel-jest":"^25.1.0","cross-env":"^7.0.0","del":"^5.1.0","eslint":"^7.16.0","globby":"^11.0.0","gulp":"^4.0.2","gulp-clone":"^2.0.1","gulp-concat":"^2.6.1","gulp-header":"^2.0.9","gulp-rename":"^2.0.0","jest":"^25.1.0","lodash.camelcase":"^4.3.0","lodash.template":"^4.5.0","lodash.upperfirst":"^4.3.1","ramda":"^0.27.0","svgo":"^1.3.2","through2":"^3.0.1","ts-node":"^8.6.2","typescript":"^4.0.0","vinyl":"^2.2.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_lastModified":"2026-07-28T04:39:38.961Z"}
@@ -1 +1 @@
1
- {"name":"acorn","description":"ECMAScript parser","homepage":"https://github.com/acornjs/acorn","main":"dist/acorn.js","types":"dist/acorn.d.ts","module":"dist/acorn.mjs","exports":{".":[{"import":"./dist/acorn.mjs","require":"./dist/acorn.js","default":"./dist/acorn.js"},"./dist/acorn.js"],"./package.json":"./package.json"},"version":"8.11.2","engines":{"node":">=0.4.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"license":"MIT","scripts":{"prepare":"cd ..; npm run build:main"},"bin":{"acorn":"./bin/acorn"},"_lastModified":"2026-07-27T15:39:22.815Z"}
1
+ {"name":"acorn","description":"ECMAScript parser","homepage":"https://github.com/acornjs/acorn","main":"dist/acorn.js","types":"dist/acorn.d.ts","module":"dist/acorn.mjs","exports":{".":[{"import":"./dist/acorn.mjs","require":"./dist/acorn.js","default":"./dist/acorn.js"},"./dist/acorn.js"],"./package.json":"./package.json"},"version":"8.11.2","engines":{"node":">=0.4.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"license":"MIT","scripts":{"prepare":"cd ..; npm run build:main"},"bin":{"acorn":"./bin/acorn"},"_lastModified":"2026-07-28T04:39:40.116Z"}
@@ -1 +1 @@
1
- {"name":"acorn-jsx","description":"Modern, fast React.js JSX parser","homepage":"https://github.com/acornjs/acorn-jsx","version":"5.3.2","maintainers":[{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"http://rreverser.com/"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn-jsx"},"license":"MIT","scripts":{"test":"node test/run.js"},"peerDependencies":{"acorn":"^6.0.0 || ^7.0.0 || ^8.0.0"},"devDependencies":{"acorn":"^8.0.1"},"_lastModified":"2026-07-27T15:39:23.282Z"}
1
+ {"name":"acorn-jsx","description":"Modern, fast React.js JSX parser","homepage":"https://github.com/acornjs/acorn-jsx","version":"5.3.2","maintainers":[{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"http://rreverser.com/"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn-jsx"},"license":"MIT","scripts":{"test":"node test/run.js"},"peerDependencies":{"acorn":"^6.0.0 || ^7.0.0 || ^8.0.0"},"devDependencies":{"acorn":"^8.0.1"},"_lastModified":"2026-07-28T04:39:40.578Z"}
@@ -1 +1 @@
1
- {"name":"acorn-walk","description":"ECMAScript (ESTree) AST walker","homepage":"https://github.com/acornjs/acorn","main":"dist/walk.js","types":"dist/walk.d.ts","module":"dist/walk.mjs","exports":{".":[{"import":"./dist/walk.mjs","require":"./dist/walk.js","default":"./dist/walk.js"},"./dist/walk.js"],"./package.json":"./package.json"},"version":"8.3.4","engines":{"node":">=0.4.0"},"dependencies":{"acorn":"^8.11.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"scripts":{"prepare":"cd ..; npm run build:walk"},"license":"MIT","_lastModified":"2026-07-27T15:39:23.404Z"}
1
+ {"name":"acorn-walk","description":"ECMAScript (ESTree) AST walker","homepage":"https://github.com/acornjs/acorn","main":"dist/walk.js","types":"dist/walk.d.ts","module":"dist/walk.mjs","exports":{".":[{"import":"./dist/walk.mjs","require":"./dist/walk.js","default":"./dist/walk.js"},"./dist/walk.js"],"./package.json":"./package.json"},"version":"8.3.4","engines":{"node":">=0.4.0"},"dependencies":{"acorn":"^8.11.0"},"maintainers":[{"name":"Marijn Haverbeke","email":"marijnh@gmail.com","web":"https://marijnhaverbeke.nl"},{"name":"Ingvar Stepanyan","email":"me@rreverser.com","web":"https://rreverser.com/"},{"name":"Adrian Heine","web":"http://adrianheine.de"}],"repository":{"type":"git","url":"https://github.com/acornjs/acorn.git"},"scripts":{"prepare":"cd ..; npm run build:walk"},"license":"MIT","_lastModified":"2026-07-28T04:39:40.693Z"}
@@ -1 +1 @@
1
- {"name":"ses","version":"1.14.0","description":"Hardened JavaScript for Fearless Cooperation","keywords":["lockdown","harden","Compartment","assert","security","confinement","isolation","object capabilities","ocaps","secure execution","third-party code","prototype pollution","supply-chain attack","plugin"],"author":"Agoric","license":"Apache-2.0","homepage":"https://github.com/Agoric/SES-shim/tree/master/packages/ses#readme","repository":{"type":"git","url":"git+https://github.com/endojs/endo.git","directory":"packages/ses"},"bugs":{"url":"https://github.com/endojs/endo/issues"},"type":"module","main":"./dist/ses.cjs","module":"./index.js","unpkg":"./dist/ses.umd.js","types":"./types.d.ts","exports":{".":{"import":{"types":"./types.d.ts","xs":"./src-xs/index.js","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./lockdown":{"import":{"types":"./types.d.ts","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./hermes":{"require":{"types":"./dist/types.d.cts","default":"./dist/ses-hermes.cjs"}},"./tools.js":"./tools.js","./assert-shim.js":"./assert-shim.js","./lockdown-shim.js":{"xs":"./src-xs/lockdown-shim.js","default":"./lockdown-shim.js"},"./compartment-shim.js":{"xs":"./src-xs/compartment-shim.js","default":"./compartment-shim.js"},"./console-shim.js":"./console-shim.js","./package.json":"./package.json"},"scripts":{"build:vanilla":"node scripts/bundle.js","build:hermes":"node scripts/bundle.js hermes","build":"yarn build:vanilla && yarn build:hermes","clean":"rm -rf dist","cover":"c8 ava","demo":"python3 -m http.server","lint":"yarn lint:types && yarn lint:eslint","lint-fix":"eslint --fix .","lint:eslint":"eslint .","lint:types":"tsc","prepare":"npm run clean && npm run build","qt":"ava","test":"tsd && ava","test:hermes":"./scripts/hermes-test.sh","test:xs":"xst dist/ses.umd.js test/_lockdown-safe.js && node scripts/generate-test-xs.js && xst tmp/test-xs.js && rm -rf tmp","postpack":"git clean -fX \"*.d.ts*\" \"*.d.cts*\" \"*.d.mts*\" \"*.tsbuildinfo\""},"dependencies":{"@endo/cache-map":"^1.1.0","@endo/env-options":"^1.1.11","@endo/immutable-arraybuffer":"^1.1.2"},"devDependencies":{"@babel/generator":"^7.26.3","@babel/parser":"~7.26.2","@babel/traverse":"~7.25.9","@babel/types":"~7.26.0","@endo/compartment-mapper":"^1.6.3","@endo/module-source":"^1.3.3","@endo/test262-runner":"^0.1.48","@types/babel__traverse":"^7.20.5","ava":"^6.1.3","babel-eslint":"^10.1.0","c8":"^7.14.0","core-js":"^3.31.0","eslint":"^8.57.1","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.31.0","hermes-engine-cli":"^0.12.0","prettier":"^3.5.3","terser":"^5.16.6","tsd":"^0.31.2","typescript":"~5.8.3"},"files":["./*.d.ts","./*.js","./*.map","LICENSE*","SECURITY*","dist","lib","src","tools"],"publishConfig":{"access":"public"},"eslintConfig":{"extends":["plugin:@endo/ses"]},"ava":{"files":["test/**/*.test.*"],"timeout":"2m"},"typeCoverage":{"atLeast":81.17},"gitHead":"9815aea9541f241389d2135c6097a7442bdffa17","_lastModified":"2026-07-27T15:39:22.374Z"}
1
+ {"name":"ses","version":"1.14.0","description":"Hardened JavaScript for Fearless Cooperation","keywords":["lockdown","harden","Compartment","assert","security","confinement","isolation","object capabilities","ocaps","secure execution","third-party code","prototype pollution","supply-chain attack","plugin"],"author":"Agoric","license":"Apache-2.0","homepage":"https://github.com/Agoric/SES-shim/tree/master/packages/ses#readme","repository":{"type":"git","url":"git+https://github.com/endojs/endo.git","directory":"packages/ses"},"bugs":{"url":"https://github.com/endojs/endo/issues"},"type":"module","main":"./dist/ses.cjs","module":"./index.js","unpkg":"./dist/ses.umd.js","types":"./types.d.ts","exports":{".":{"import":{"types":"./types.d.ts","xs":"./src-xs/index.js","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./lockdown":{"import":{"types":"./types.d.ts","default":"./index.js"},"require":{"types":"./dist/types.d.cts","default":"./dist/ses.cjs"}},"./hermes":{"require":{"types":"./dist/types.d.cts","default":"./dist/ses-hermes.cjs"}},"./tools.js":"./tools.js","./assert-shim.js":"./assert-shim.js","./lockdown-shim.js":{"xs":"./src-xs/lockdown-shim.js","default":"./lockdown-shim.js"},"./compartment-shim.js":{"xs":"./src-xs/compartment-shim.js","default":"./compartment-shim.js"},"./console-shim.js":"./console-shim.js","./package.json":"./package.json"},"scripts":{"build:vanilla":"node scripts/bundle.js","build:hermes":"node scripts/bundle.js hermes","build":"yarn build:vanilla && yarn build:hermes","clean":"rm -rf dist","cover":"c8 ava","demo":"python3 -m http.server","lint":"yarn lint:types && yarn lint:eslint","lint-fix":"eslint --fix .","lint:eslint":"eslint .","lint:types":"tsc","prepare":"npm run clean && npm run build","qt":"ava","test":"tsd && ava","test:hermes":"./scripts/hermes-test.sh","test:xs":"xst dist/ses.umd.js test/_lockdown-safe.js && node scripts/generate-test-xs.js && xst tmp/test-xs.js && rm -rf tmp","postpack":"git clean -fX \"*.d.ts*\" \"*.d.cts*\" \"*.d.mts*\" \"*.tsbuildinfo\""},"dependencies":{"@endo/cache-map":"^1.1.0","@endo/env-options":"^1.1.11","@endo/immutable-arraybuffer":"^1.1.2"},"devDependencies":{"@babel/generator":"^7.26.3","@babel/parser":"~7.26.2","@babel/traverse":"~7.25.9","@babel/types":"~7.26.0","@endo/compartment-mapper":"^1.6.3","@endo/module-source":"^1.3.3","@endo/test262-runner":"^0.1.48","@types/babel__traverse":"^7.20.5","ava":"^6.1.3","babel-eslint":"^10.1.0","c8":"^7.14.0","core-js":"^3.31.0","eslint":"^8.57.1","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^9.1.0","eslint-plugin-eslint-comments":"^3.2.0","eslint-plugin-import":"^2.31.0","hermes-engine-cli":"^0.12.0","prettier":"^3.5.3","terser":"^5.16.6","tsd":"^0.31.2","typescript":"~5.8.3"},"files":["./*.d.ts","./*.js","./*.map","LICENSE*","SECURITY*","dist","lib","src","tools"],"publishConfig":{"access":"public"},"eslintConfig":{"extends":["plugin:@endo/ses"]},"ava":{"files":["test/**/*.test.*"],"timeout":"2m"},"typeCoverage":{"atLeast":81.17},"gitHead":"9815aea9541f241389d2135c6097a7442bdffa17","_lastModified":"2026-07-28T04:39:39.664Z"}
@@ -1 +1 @@
1
- {"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-07-27T15:39:24.662Z"}
1
+ {"name":"zod","version":"4.3.5","type":"module","license":"MIT","author":"Colin McDonnell <zod@colinhacks.com>","description":"TypeScript-first schema declaration and validation library with static type inference","homepage":"https://zod.dev","llms":"https://zod.dev/llms.txt","llmsFull":"https://zod.dev/llms-full.txt","mcpServer":"https://mcp.inkeep.com/zod/mcp","funding":"https://github.com/sponsors/colinhacks","sideEffects":false,"files":["src","**/*.js","**/*.mjs","**/*.cjs","**/*.d.ts","**/*.d.mts","**/*.d.cts","**/package.json"],"keywords":["typescript","schema","validation","type","inference"],"main":"./index.cjs","types":"./index.d.cts","module":"./index.js","zshy":{"exports":{"./package.json":"./package.json",".":"./src/index.ts","./mini":"./src/mini/index.ts","./locales":"./src/locales/index.ts","./v3":"./src/v3/index.ts","./v4":"./src/v4/index.ts","./v4-mini":"./src/v4-mini/index.ts","./v4/mini":"./src/v4/mini/index.ts","./v4/core":"./src/v4/core/index.ts","./v4/locales":"./src/v4/locales/index.ts","./v4/locales/*":"./src/v4/locales/*"},"conditions":{"@zod/source":"src"}},"exports":{"./package.json":"./package.json",".":{"@zod/source":"./src/index.ts","types":"./index.d.cts","import":"./index.js","require":"./index.cjs"},"./mini":{"@zod/source":"./src/mini/index.ts","types":"./mini/index.d.cts","import":"./mini/index.js","require":"./mini/index.cjs"},"./locales":{"@zod/source":"./src/locales/index.ts","types":"./locales/index.d.cts","import":"./locales/index.js","require":"./locales/index.cjs"},"./v3":{"@zod/source":"./src/v3/index.ts","types":"./v3/index.d.cts","import":"./v3/index.js","require":"./v3/index.cjs"},"./v4":{"@zod/source":"./src/v4/index.ts","types":"./v4/index.d.cts","import":"./v4/index.js","require":"./v4/index.cjs"},"./v4-mini":{"@zod/source":"./src/v4-mini/index.ts","types":"./v4-mini/index.d.cts","import":"./v4-mini/index.js","require":"./v4-mini/index.cjs"},"./v4/mini":{"@zod/source":"./src/v4/mini/index.ts","types":"./v4/mini/index.d.cts","import":"./v4/mini/index.js","require":"./v4/mini/index.cjs"},"./v4/core":{"@zod/source":"./src/v4/core/index.ts","types":"./v4/core/index.d.cts","import":"./v4/core/index.js","require":"./v4/core/index.cjs"},"./v4/locales":{"@zod/source":"./src/v4/locales/index.ts","types":"./v4/locales/index.d.cts","import":"./v4/locales/index.js","require":"./v4/locales/index.cjs"},"./v4/locales/*":{"@zod/source":"./src/v4/locales/*","types":"./v4/locales/*","import":"./v4/locales/*","require":"./v4/locales/*"}},"repository":{"type":"git","url":"git+https://github.com/colinhacks/zod.git"},"bugs":{"url":"https://github.com/colinhacks/zod/issues"},"support":{"backing":{"npm-funding":true}},"scripts":{"clean":"git clean -xdf . -e node_modules","build":"zshy --project tsconfig.build.json","postbuild":"tsx ../../scripts/write-stub-package-jsons.ts && pnpm biome check --write .","test:watch":"pnpm vitest","test":"pnpm vitest run","prepublishOnly":"tsx ../../scripts/check-versions.ts"},"_lastModified":"2026-07-28T04:39:41.848Z"}
@@ -13,7 +13,9 @@ export interface FlowSurfaceAuthoringValidationContext {
13
13
  applyBlueprintScriptAssets?: Record<string, any>;
14
14
  getCollection?: (dataSourceKey: string, collectionName: string) => any;
15
15
  getDefaultFieldGroups?: (dataSourceKey: string, collectionName: string) => any;
16
- findMenuGroupRoutesByTitle?: (title: string, transaction?: any) => Promise<any[]>;
16
+ findMenuGroupRoutesByTitle?: (title: string, transaction?: any, layoutUid?: string | string[], portalUid?: string) => Promise<any[]>;
17
+ getUiLayoutTypeByUid?: (layoutUid: string, transaction?: any) => Promise<string | undefined>;
18
+ getPortalLayoutTypeByUid?: (portalUid: string, transaction?: any) => Promise<string | undefined>;
17
19
  transaction?: any;
18
20
  hostBlockType?: string;
19
21
  hostCollectionName?: string;
@@ -540,10 +540,13 @@ function pushChartBadRequestAuthoringError(errors, error, fallbackPath) {
540
540
  });
541
541
  }
542
542
  async function collectNavigationGroupErrors(actionName, values, context, errors) {
543
- var _a;
543
+ var _a, _b, _c;
544
544
  if (actionName !== "applyBlueprint" || (values == null ? void 0 : values.mode) !== "create" || !_.isPlainObject((_a = values == null ? void 0 : values.navigation) == null ? void 0 : _a.group)) {
545
545
  return;
546
546
  }
547
+ if (await isApplyBlueprintMobileCreateNavigation(values, context)) {
548
+ return;
549
+ }
547
550
  if (!_.isUndefined(values.navigation.group.routeId) || !context.findMenuGroupRoutesByTitle) {
548
551
  return;
549
552
  }
@@ -551,7 +554,9 @@ async function collectNavigationGroupErrors(actionName, values, context, errors)
551
554
  if (!groupTitle) {
552
555
  return;
553
556
  }
554
- const matchedRoutes = await context.findMenuGroupRoutesByTitle(groupTitle, context.transaction);
557
+ const layoutUid = String(((_b = values == null ? void 0 : values.navigation) == null ? void 0 : _b.layoutUid) || "").trim() || void 0;
558
+ const portalUid = String(((_c = values == null ? void 0 : values.navigation) == null ? void 0 : _c.portalUid) || "").trim() || void 0;
559
+ const matchedRoutes = await context.findMenuGroupRoutesByTitle(groupTitle, context.transaction, layoutUid, portalUid);
555
560
  const rootMatchedRoutes = filterRootMenuGroupRoutes(matchedRoutes);
556
561
  if (rootMatchedRoutes.length <= 1) {
557
562
  return;
@@ -568,15 +573,18 @@ async function collectNavigationGroupErrors(actionName, values, context, errors)
568
573
  });
569
574
  }
570
575
  async function collectNavigationIconErrors(actionName, values, context, errors) {
571
- var _a, _b, _c;
576
+ var _a, _b, _c, _d, _e;
572
577
  if (actionName !== "applyBlueprint" || (values == null ? void 0 : values.mode) !== "create") {
573
578
  return;
574
579
  }
580
+ const isMobileCreateNavigation = await isApplyBlueprintMobileCreateNavigation(values, context);
575
581
  const group = _.isPlainObject((_a = values == null ? void 0 : values.navigation) == null ? void 0 : _a.group) ? values.navigation.group : null;
576
582
  const groupRouteId = String((group == null ? void 0 : group.routeId) || "").trim();
577
- if (group && !groupRouteId && group.hideInMenu !== true) {
583
+ const layoutUid = String(((_b = values == null ? void 0 : values.navigation) == null ? void 0 : _b.layoutUid) || "").trim() || void 0;
584
+ const portalUid = String(((_c = values == null ? void 0 : values.navigation) == null ? void 0 : _c.portalUid) || "").trim() || void 0;
585
+ if (!isMobileCreateNavigation && group && !groupRouteId && group.hideInMenu !== true) {
578
586
  const groupIcon = String(group.icon || "").trim();
579
- if (!groupIcon && await shouldRequireNewNavigationGroupIcon(group, context)) {
587
+ if (!groupIcon && await shouldRequireNewNavigationGroupIcon(group, context, layoutUid, portalUid)) {
580
588
  pushAuthoringError(errors, {
581
589
  path: "$.navigation.group.icon",
582
590
  ruleId: "navigation-icon-required",
@@ -595,7 +603,7 @@ async function collectNavigationIconErrors(actionName, values, context, errors)
595
603
  }
596
604
  });
597
605
  }
598
- } else if (group && String(group.icon || "").trim() && !isValidAntDesignIconName(group.icon)) {
606
+ } else if (!isMobileCreateNavigation && group && String(group.icon || "").trim() && !isValidAntDesignIconName(group.icon)) {
599
607
  pushAuthoringError(errors, {
600
608
  path: "$.navigation.group.icon",
601
609
  ruleId: "navigation-icon-unknown",
@@ -605,7 +613,7 @@ async function collectNavigationIconErrors(actionName, values, context, errors)
605
613
  }
606
614
  });
607
615
  }
608
- const item = _.isPlainObject((_b = values == null ? void 0 : values.navigation) == null ? void 0 : _b.item) ? values.navigation.item : null;
616
+ const item = _.isPlainObject((_d = values == null ? void 0 : values.navigation) == null ? void 0 : _d.item) ? values.navigation.item : null;
609
617
  const itemIcon = String((item == null ? void 0 : item.icon) || "").trim();
610
618
  if (itemIcon && !isValidAntDesignIconName(itemIcon)) {
611
619
  pushAuthoringError(errors, {
@@ -617,7 +625,7 @@ async function collectNavigationIconErrors(actionName, values, context, errors)
617
625
  }
618
626
  });
619
627
  }
620
- const pageIcon = String(((_c = values == null ? void 0 : values.page) == null ? void 0 : _c.icon) || "").trim();
628
+ const pageIcon = String(((_e = values == null ? void 0 : values.page) == null ? void 0 : _e.icon) || "").trim();
621
629
  if (pageIcon && !isValidAntDesignIconName(pageIcon)) {
622
630
  pushAuthoringError(errors, {
623
631
  path: "$.page.icon",
@@ -629,12 +637,24 @@ async function collectNavigationIconErrors(actionName, values, context, errors)
629
637
  });
630
638
  }
631
639
  }
632
- async function shouldRequireNewNavigationGroupIcon(group, context) {
640
+ async function isApplyBlueprintMobileCreateNavigation(values, context) {
641
+ var _a, _b;
642
+ const portalUid = String(((_a = values == null ? void 0 : values.navigation) == null ? void 0 : _a.portalUid) || "").trim();
643
+ if (portalUid && context.getPortalLayoutTypeByUid) {
644
+ return await context.getPortalLayoutTypeByUid(portalUid, context.transaction) === "mobile";
645
+ }
646
+ const layoutUid = String(((_b = values == null ? void 0 : values.navigation) == null ? void 0 : _b.layoutUid) || "").trim();
647
+ if (!layoutUid || !context.getUiLayoutTypeByUid) {
648
+ return false;
649
+ }
650
+ return await context.getUiLayoutTypeByUid(layoutUid, context.transaction) === "mobile";
651
+ }
652
+ async function shouldRequireNewNavigationGroupIcon(group, context, layoutUid, portalUid) {
633
653
  const groupTitle = String((group == null ? void 0 : group.title) || "").trim();
634
654
  if (!groupTitle || !context.findMenuGroupRoutesByTitle) {
635
655
  return true;
636
656
  }
637
- const matchedRoutes = await context.findMenuGroupRoutesByTitle(groupTitle, context.transaction);
657
+ const matchedRoutes = await context.findMenuGroupRoutesByTitle(groupTitle, context.transaction, layoutUid, portalUid);
638
658
  return filterRootMenuGroupRoutes(matchedRoutes).length === 0;
639
659
  }
640
660
  function filterRootMenuGroupRoutes(routes) {
@@ -83,19 +83,23 @@ function buildTabSelectorFromUid(uid) {
83
83
  };
84
84
  }
85
85
  function compileCreatePlan(document, getCollection) {
86
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B;
86
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D;
87
87
  const steps = [];
88
88
  const chrome = buildPageChrome(document);
89
- if (import_lodash.default.isPlainObject((_a = document.navigation) == null ? void 0 : _a.group) && import_lodash.default.isUndefined(document.navigation.group.routeId)) {
89
+ const layoutUid = (_a = document.navigation) == null ? void 0 : _a.layoutUid;
90
+ const portalUid = (_b = document.navigation) == null ? void 0 : _b.portalUid;
91
+ if (import_lodash.default.isPlainObject((_c = document.navigation) == null ? void 0 : _c.group) && import_lodash.default.isUndefined(document.navigation.group.routeId)) {
90
92
  steps.push({
91
93
  id: CREATE_MENU_GROUP_STEP_ID,
92
94
  action: "createMenu",
93
95
  values: (0, import_service_utils.buildDefinedPayload)({
94
- title: (_c = (_b = document.navigation) == null ? void 0 : _b.group) == null ? void 0 : _c.title,
96
+ layoutUid,
97
+ portalUid,
98
+ title: (_e = (_d = document.navigation) == null ? void 0 : _d.group) == null ? void 0 : _e.title,
95
99
  type: "group",
96
- icon: (_e = (_d = document.navigation) == null ? void 0 : _d.group) == null ? void 0 : _e.icon,
97
- tooltip: (_g = (_f = document.navigation) == null ? void 0 : _f.group) == null ? void 0 : _g.tooltip,
98
- hideInMenu: (_i = (_h = document.navigation) == null ? void 0 : _h.group) == null ? void 0 : _i.hideInMenu
100
+ icon: (_g = (_f = document.navigation) == null ? void 0 : _f.group) == null ? void 0 : _g.icon,
101
+ tooltip: (_i = (_h = document.navigation) == null ? void 0 : _h.group) == null ? void 0 : _i.tooltip,
102
+ hideInMenu: (_k = (_j = document.navigation) == null ? void 0 : _j.group) == null ? void 0 : _k.hideInMenu
99
103
  })
100
104
  });
101
105
  }
@@ -103,25 +107,29 @@ function compileCreatePlan(document, getCollection) {
103
107
  id: CREATE_MENU_ITEM_STEP_ID,
104
108
  action: "createMenu",
105
109
  values: (0, import_service_utils.buildDefinedPayload)({
106
- title: ((_k = (_j = document.navigation) == null ? void 0 : _j.item) == null ? void 0 : _k.title) || chrome.pageTitle,
110
+ layoutUid,
111
+ portalUid,
112
+ title: ((_m = (_l = document.navigation) == null ? void 0 : _l.item) == null ? void 0 : _m.title) || chrome.pageTitle,
107
113
  type: "item",
108
- icon: ((_m = (_l = document.navigation) == null ? void 0 : _l.item) == null ? void 0 : _m.icon) || ((_n = document.page) == null ? void 0 : _n.icon) || "FileOutlined",
109
- tooltip: (_p = (_o = document.navigation) == null ? void 0 : _o.item) == null ? void 0 : _p.tooltip,
110
- hideInMenu: (_r = (_q = document.navigation) == null ? void 0 : _q.item) == null ? void 0 : _r.hideInMenu,
111
- parentMenuRouteId: import_lodash.default.isUndefined((_t = (_s = document.navigation) == null ? void 0 : _s.group) == null ? void 0 : _t.routeId) ? ((_v = (_u = document.navigation) == null ? void 0 : _u.group) == null ? void 0 : _v.title) ? { step: CREATE_MENU_GROUP_STEP_ID, path: "routeId" } : void 0 : (_x = (_w = document.navigation) == null ? void 0 : _w.group) == null ? void 0 : _x.routeId
114
+ icon: ((_o = (_n = document.navigation) == null ? void 0 : _n.item) == null ? void 0 : _o.icon) || ((_p = document.page) == null ? void 0 : _p.icon) || "FileOutlined",
115
+ tooltip: (_r = (_q = document.navigation) == null ? void 0 : _q.item) == null ? void 0 : _r.tooltip,
116
+ hideInMenu: (_t = (_s = document.navigation) == null ? void 0 : _s.item) == null ? void 0 : _t.hideInMenu,
117
+ parentMenuRouteId: import_lodash.default.isUndefined((_v = (_u = document.navigation) == null ? void 0 : _u.group) == null ? void 0 : _v.routeId) ? ((_x = (_w = document.navigation) == null ? void 0 : _w.group) == null ? void 0 : _x.title) ? { step: CREATE_MENU_GROUP_STEP_ID, path: "routeId" } : void 0 : (_z = (_y = document.navigation) == null ? void 0 : _y.group) == null ? void 0 : _z.routeId
112
118
  })
113
119
  });
114
120
  steps.push({
115
121
  id: CREATE_PAGE_STEP_ID,
116
122
  action: "createPage",
117
123
  values: (0, import_service_utils.buildDefinedPayload)({
124
+ layoutUid,
125
+ portalUid,
118
126
  menuRouteId: { step: CREATE_MENU_ITEM_STEP_ID, path: "routeId" },
119
127
  title: chrome.pageTitle,
120
- icon: (_y = document.page) == null ? void 0 : _y.icon,
121
- documentTitle: (_z = document.page) == null ? void 0 : _z.documentTitle,
122
- enableHeader: (_A = document.page) == null ? void 0 : _A.enableHeader,
128
+ icon: (_A = document.page) == null ? void 0 : _A.icon,
129
+ documentTitle: (_B = document.page) == null ? void 0 : _B.documentTitle,
130
+ enableHeader: (_C = document.page) == null ? void 0 : _C.enableHeader,
123
131
  enableTabs: chrome.enableTabs,
124
- displayTitle: (_B = document.page) == null ? void 0 : _B.displayTitle,
132
+ displayTitle: (_D = document.page) == null ? void 0 : _D.displayTitle,
125
133
  tabTitle: chrome.tabTitle,
126
134
  tabIcon: chrome.tabIcon,
127
135
  tabDocumentTitle: chrome.tabDocumentTitle,