@nocobase/plugin-flow-engine 2.1.0-alpha.14 → 2.1.0-alpha.16

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 (119) hide show
  1. package/dist/externalVersion.js +10 -10
  2. package/dist/locale/en-US.json +1 -0
  3. package/dist/locale/index.d.ts +2 -0
  4. package/dist/locale/zh-CN.json +1 -0
  5. package/dist/node_modules/ses/package.json +1 -1
  6. package/dist/node_modules/zod/package.json +1 -1
  7. package/dist/server/flow-surfaces/{compiler.d.ts → apply/compiler.d.ts} +1 -10
  8. package/dist/server/flow-surfaces/{compiler.js → apply/compiler.js} +41 -280
  9. package/dist/server/flow-surfaces/apply/layout.d.ts +34 -0
  10. package/dist/server/flow-surfaces/apply/layout.js +175 -0
  11. package/dist/server/flow-surfaces/apply/matching.d.ts +16 -0
  12. package/dist/server/flow-surfaces/apply/matching.js +181 -0
  13. package/dist/server/flow-surfaces/association-title-field.d.ts +20 -0
  14. package/dist/server/flow-surfaces/association-title-field.js +158 -0
  15. package/dist/server/flow-surfaces/blueprint/compile-blocks.d.ts +14 -0
  16. package/dist/server/flow-surfaces/blueprint/compile-blocks.js +706 -0
  17. package/dist/server/flow-surfaces/blueprint/compile-plan.d.ts +13 -0
  18. package/dist/server/flow-surfaces/blueprint/compile-plan.js +308 -0
  19. package/dist/server/flow-surfaces/blueprint/compile-reaction.d.ts +11 -0
  20. package/dist/server/flow-surfaces/blueprint/compile-reaction.js +72 -0
  21. package/dist/server/flow-surfaces/blueprint/index.d.ts +12 -0
  22. package/dist/server/flow-surfaces/blueprint/index.js +44 -0
  23. package/dist/server/flow-surfaces/blueprint/normalize-document.d.ts +10 -0
  24. package/dist/server/flow-surfaces/blueprint/normalize-document.js +296 -0
  25. package/dist/server/flow-surfaces/blueprint/private-utils.d.ts +26 -0
  26. package/dist/server/flow-surfaces/blueprint/private-utils.js +182 -0
  27. package/dist/server/flow-surfaces/blueprint/public-types.d.ts +153 -0
  28. package/dist/server/flow-surfaces/blueprint/public-types.js +24 -0
  29. package/dist/server/flow-surfaces/catalog-smart.d.ts +18 -0
  30. package/dist/server/flow-surfaces/catalog-smart.js +239 -0
  31. package/dist/server/flow-surfaces/catalog-smart.projector.d.ts +15 -0
  32. package/dist/server/flow-surfaces/catalog-smart.projector.js +157 -0
  33. package/dist/server/flow-surfaces/catalog-smart.types.d.ts +99 -0
  34. package/dist/server/flow-surfaces/catalog-smart.types.js +24 -0
  35. package/dist/server/flow-surfaces/catalog.d.ts +3 -0
  36. package/dist/server/flow-surfaces/catalog.js +163 -34
  37. package/dist/server/flow-surfaces/compose-compiler.d.ts +104 -0
  38. package/dist/server/flow-surfaces/compose-compiler.js +162 -0
  39. package/dist/server/flow-surfaces/compose-runtime.d.ts +89 -0
  40. package/dist/server/flow-surfaces/compose-runtime.js +338 -0
  41. package/dist/server/flow-surfaces/configure-options.js +12 -3
  42. package/dist/server/flow-surfaces/constants.d.ts +3 -2
  43. package/dist/server/flow-surfaces/constants.js +36 -3
  44. package/dist/server/flow-surfaces/default-action-popup.d.ts +52 -0
  45. package/dist/server/flow-surfaces/default-action-popup.js +258 -0
  46. package/dist/server/flow-surfaces/executor.d.ts +10 -0
  47. package/dist/server/flow-surfaces/executor.js +59 -24
  48. package/dist/server/flow-surfaces/field-binding-registry.d.ts +23 -0
  49. package/dist/server/flow-surfaces/field-binding-registry.js +391 -0
  50. package/dist/server/flow-surfaces/field-semantics.d.ts +1 -1
  51. package/dist/server/flow-surfaces/index.js +75 -0
  52. package/dist/server/flow-surfaces/node-use-sets.d.ts +15 -0
  53. package/dist/server/flow-surfaces/node-use-sets.js +114 -0
  54. package/dist/server/flow-surfaces/payload-shape.d.ts +9 -0
  55. package/dist/server/flow-surfaces/payload-shape.js +64 -0
  56. package/dist/server/flow-surfaces/placement.js +2 -6
  57. package/dist/server/flow-surfaces/planning/action-specs.d.ts +179 -0
  58. package/dist/server/flow-surfaces/planning/action-specs.js +190 -0
  59. package/dist/server/flow-surfaces/planning/compiler.d.ts +37 -0
  60. package/dist/server/flow-surfaces/planning/compiler.js +376 -0
  61. package/dist/server/flow-surfaces/planning/context.d.ts +30 -0
  62. package/dist/server/flow-surfaces/planning/context.js +139 -0
  63. package/dist/server/flow-surfaces/planning/created-keys.d.ts +34 -0
  64. package/dist/server/flow-surfaces/planning/created-keys.js +375 -0
  65. package/dist/server/flow-surfaces/planning/key-kind.d.ts +11 -0
  66. package/dist/server/flow-surfaces/planning/key-kind.js +86 -0
  67. package/dist/server/flow-surfaces/planning/key-persistence.d.ts +34 -0
  68. package/dist/server/flow-surfaces/planning/key-persistence.js +148 -0
  69. package/dist/server/flow-surfaces/planning/key-registry.d.ts +40 -0
  70. package/dist/server/flow-surfaces/planning/key-registry.js +206 -0
  71. package/dist/server/flow-surfaces/planning/runtime.d.ts +37 -0
  72. package/dist/server/flow-surfaces/planning/runtime.js +259 -0
  73. package/dist/server/flow-surfaces/planning/step-link.d.ts +14 -0
  74. package/dist/server/flow-surfaces/planning/step-link.js +104 -0
  75. package/dist/server/flow-surfaces/planning/types.d.ts +55 -0
  76. package/dist/server/flow-surfaces/planning/types.js +24 -0
  77. package/dist/server/flow-surfaces/reaction/errors.d.ts +20 -0
  78. package/dist/server/flow-surfaces/reaction/errors.js +69 -0
  79. package/dist/server/flow-surfaces/reaction/field-value.d.ts +34 -0
  80. package/dist/server/flow-surfaces/reaction/field-value.js +181 -0
  81. package/dist/server/flow-surfaces/reaction/fingerprint.d.ts +16 -0
  82. package/dist/server/flow-surfaces/reaction/fingerprint.js +71 -0
  83. package/dist/server/flow-surfaces/reaction/linkage.d.ts +136 -0
  84. package/dist/server/flow-surfaces/reaction/linkage.js +882 -0
  85. package/dist/server/flow-surfaces/reaction/meta.d.ts +11 -0
  86. package/dist/server/flow-surfaces/reaction/meta.js +451 -0
  87. package/dist/server/flow-surfaces/reaction/registry.d.ts +136 -0
  88. package/dist/server/flow-surfaces/reaction/registry.js +186 -0
  89. package/dist/server/flow-surfaces/reaction/resolver.d.ts +22 -0
  90. package/dist/server/flow-surfaces/reaction/resolver.js +202 -0
  91. package/dist/server/flow-surfaces/reaction/types.d.ts +241 -0
  92. package/dist/server/flow-surfaces/reaction/types.js +24 -0
  93. package/dist/server/flow-surfaces/reaction/utils.d.ts +17 -0
  94. package/dist/server/flow-surfaces/reaction/utils.js +67 -0
  95. package/dist/server/flow-surfaces/reaction/value-expr.d.ts +15 -0
  96. package/dist/server/flow-surfaces/reaction/value-expr.js +209 -0
  97. package/dist/server/flow-surfaces/reference-guards.d.ts +19 -0
  98. package/dist/server/flow-surfaces/reference-guards.js +103 -0
  99. package/dist/server/flow-surfaces/service-helpers.d.ts +42 -0
  100. package/dist/server/flow-surfaces/service-helpers.js +377 -0
  101. package/dist/server/flow-surfaces/service-utils.d.ts +105 -0
  102. package/dist/server/flow-surfaces/service-utils.js +760 -0
  103. package/dist/server/flow-surfaces/service.d.ts +189 -103
  104. package/dist/server/flow-surfaces/service.js +3975 -1770
  105. package/dist/server/flow-surfaces/template-compatibility.d.ts +42 -0
  106. package/dist/server/flow-surfaces/template-compatibility.js +189 -0
  107. package/dist/server/flow-surfaces/template-service-utils.d.ts +62 -0
  108. package/dist/server/flow-surfaces/template-service-utils.js +281 -0
  109. package/dist/server/flow-surfaces/types.d.ts +129 -37
  110. package/dist/swagger/flow-surfaces.d.ts +3773 -1581
  111. package/dist/swagger/flow-surfaces.examples.d.ts +1215 -0
  112. package/dist/swagger/flow-surfaces.examples.js +1363 -0
  113. package/dist/swagger/flow-surfaces.js +2209 -1684
  114. package/dist/swagger/flow-surfaces.template-action-docs.d.ts +62 -0
  115. package/dist/swagger/flow-surfaces.template-action-docs.js +121 -0
  116. package/dist/swagger/flow-surfaces.template-schemas.d.ts +239 -0
  117. package/dist/swagger/flow-surfaces.template-schemas.js +255 -0
  118. package/dist/swagger/index.d.ts +3773 -1581
  119. package/package.json +2 -2
@@ -8,15 +8,15 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.1.0-alpha.14",
11
+ "@nocobase/client": "2.1.0-alpha.16",
12
12
  "lodash": "4.17.21",
13
- "@nocobase/database": "2.1.0-alpha.14",
14
- "@nocobase/data-source-manager": "2.1.0-alpha.14",
15
- "@nocobase/resourcer": "2.1.0-alpha.14",
16
- "@nocobase/utils": "2.1.0-alpha.14",
17
- "@nocobase/cache": "2.1.0-alpha.14",
18
- "@nocobase/plugin-localization": "2.1.0-alpha.14",
19
- "@nocobase/server": "2.1.0-alpha.14",
20
- "@nocobase/actions": "2.1.0-alpha.14",
21
- "@nocobase/ai": "2.1.0-alpha.14"
13
+ "@nocobase/database": "2.1.0-alpha.16",
14
+ "@nocobase/data-source-manager": "2.1.0-alpha.16",
15
+ "@nocobase/resourcer": "2.1.0-alpha.16",
16
+ "@nocobase/utils": "2.1.0-alpha.16",
17
+ "@nocobase/cache": "2.1.0-alpha.16",
18
+ "@nocobase/plugin-localization": "2.1.0-alpha.16",
19
+ "@nocobase/server": "2.1.0-alpha.16",
20
+ "@nocobase/actions": "2.1.0-alpha.16",
21
+ "@nocobase/ai": "2.1.0-alpha.16"
22
22
  };
@@ -34,6 +34,7 @@
34
34
  "Failed to destroy model after creation error": "Failed to destroy model after creation error",
35
35
  "Failed to get action {{action}}": "Failed to get action {{action}}",
36
36
  "Failed to get configurable flows for model {{model}}": "Failed to get configurable flows for model {{model}}",
37
+ "Attributes are unavailable before selecting a record": "Attributes are unavailable before selecting a record",
37
38
  "Failed to import FormDialog": "Failed to import FormDialog",
38
39
  "Failed to import FormDialog or FormStep": "Failed to import FormDialog or FormStep",
39
40
  "Failed to import Formily components": "Failed to import Formily components",
@@ -43,6 +43,7 @@ export declare const locales: {
43
43
  "Failed to destroy model after creation error": string;
44
44
  "Failed to get action {{action}}": string;
45
45
  "Failed to get configurable flows for model {{model}}": string;
46
+ "Attributes are unavailable before selecting a record": string;
46
47
  "Failed to import FormDialog": string;
47
48
  "Failed to import FormDialog or FormStep": string;
48
49
  "Failed to import Formily components": string;
@@ -120,6 +121,7 @@ export declare const locales: {
120
121
  "Failed to destroy model after creation error": string;
121
122
  "Failed to get action {{action}}": string;
122
123
  "Failed to get configurable flows for model {{model}}": string;
124
+ "Attributes are unavailable before selecting a record": string;
123
125
  "Failed to import FormDialog": string;
124
126
  "Failed to import FormDialog or FormStep": string;
125
127
  "Failed to import Formily components": string;
@@ -31,6 +31,7 @@
31
31
  "Failed to destroy model after creation error": "创建错误后销毁模型失败",
32
32
  "Failed to get action {{action}}": "获取 action '{{action}}' 失败",
33
33
  "Failed to get configurable flows for model {{model}}": "获取模型 '{{model}}' 的可配置 flows 失败",
34
+ "Attributes are unavailable before selecting a record": "选择记录之前,当前项属性不可用",
34
35
  "Failed to import FormDialog": "导入 FormDialog 失败",
35
36
  "Failed to import FormDialog or FormStep": "导入 FormDialog 或 FormStep 失败",
36
37
  "Failed to import Formily components": "导入 Formily 组件失败",
@@ -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-04-07T15:54:44.480Z"}
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-04-14T00:04:40.387Z"}
@@ -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-04-07T15:54:45.493Z"}
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-04-14T00:04:41.504Z"}
@@ -6,17 +6,8 @@
6
6
  * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
- import type { FlowSurfaceApplySpec, FlowSurfaceMutateOp, FlowSurfaceWriteTarget } from './types';
9
+ import type { FlowSurfaceApplySpec, FlowSurfaceMutateOp, FlowSurfaceWriteTarget } from '../types';
10
10
  export declare function compileApplySpec(target: FlowSurfaceWriteTarget, currentTree: any, spec: FlowSurfaceApplySpec): {
11
11
  ops: FlowSurfaceMutateOp[];
12
12
  clientKeyToUid: Record<string, string>;
13
13
  };
14
- export declare function buildAutoLayout(itemRefs: any[]): {
15
- rows: {
16
- [k: string]: any[][];
17
- };
18
- sizes: {
19
- [k: string]: number[];
20
- };
21
- rowOrder: string[];
22
- };
@@ -36,22 +36,28 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
36
36
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
37
  var compiler_exports = {};
38
38
  __export(compiler_exports, {
39
- buildAutoLayout: () => buildAutoLayout,
40
39
  compileApplySpec: () => compileApplySpec
41
40
  });
42
41
  module.exports = __toCommonJS(compiler_exports);
43
42
  var import_lodash = __toESM(require("lodash"));
44
- var import_catalog = require("./catalog");
45
- var import_placement = require("./placement");
46
- var import_errors = require("./errors");
43
+ var import_catalog = require("../catalog");
44
+ var import_placement = require("../placement");
45
+ var import_errors = require("../errors");
46
+ var import_node_use_sets = require("../node-use-sets");
47
+ var import_layout = require("./layout");
48
+ var import_matching = require("./matching");
47
49
  function makeOpRef(path) {
48
- return { ref: path };
50
+ const normalized = String(path || "").trim();
51
+ const [step, ...rest] = normalized.split(".");
52
+ return {
53
+ step,
54
+ ...rest.length ? { path: rest.join(".") } : {}
55
+ };
49
56
  }
50
57
  const FORM_GRID_USES = /* @__PURE__ */ new Set(["FormGridModel", "AssignFormGridModel"]);
51
58
  const ACTION_USES = new Set(Array.from(import_catalog.ACTION_KEY_BY_USE.keys()));
52
59
  const BLOCK_USES = new Set(Array.from(import_catalog.BLOCK_KEY_BY_USE.keys()));
53
- const FIELD_WRAPPER_USES = import_placement.FLOW_SURFACE_FIELD_WRAPPER_USES;
54
- const STANDALONE_FIELD_USES = /* @__PURE__ */ new Set(["JSColumnModel", "JSItemModel"]);
60
+ const STANDALONE_FIELD_USES = import_node_use_sets.CREATABLE_STANDALONE_FIELD_USES;
55
61
  const FORM_BLOCK_USES = import_placement.FLOW_SURFACE_FORM_BLOCK_USES;
56
62
  const DETAILS_BLOCK_USES = import_placement.FLOW_SURFACE_DETAILS_BLOCK_USES;
57
63
  const FILTER_FORM_BLOCK_USES = import_placement.FLOW_SURFACE_FILTER_FORM_BLOCK_USES;
@@ -143,12 +149,12 @@ function compileApplySpec(target, currentTree, spec) {
143
149
  function syncExistingNode(ops, state, nodeRef, currentNode, desiredNode, explicitTarget) {
144
150
  emitDomainSettingOps(ops, nodeRef, currentNode, desiredNode, explicitTarget);
145
151
  const childSync = syncChildren(ops, state, nodeRef, currentNode, desiredNode);
146
- emitLayoutOp(ops, explicitTarget || { uid: nodeRef.uidRef }, currentNode, desiredNode, childSync);
152
+ (0, import_layout.emitLayoutOp)(ops, explicitTarget || { uid: nodeRef.uidRef }, currentNode, desiredNode, childSync);
147
153
  }
148
154
  function syncCreatedNode(ops, state, nodeRef, desiredNode) {
149
155
  emitDomainSettingOps(ops, nodeRef, null, desiredNode);
150
156
  const childSync = syncChildren(ops, state, nodeRef, null, desiredNode);
151
- emitLayoutOp(ops, { uid: nodeRef.uidRef }, null, desiredNode, childSync);
157
+ (0, import_layout.emitLayoutOp)(ops, { uid: nodeRef.uidRef }, null, desiredNode, childSync);
152
158
  }
153
159
  function syncRoutePageNode(ops, state, target, currentNode, desiredNode) {
154
160
  const pageTarget = { uid: String(target.uid || currentNode.uid || "").trim() };
@@ -173,16 +179,16 @@ function syncPageNode(ops, state, pageTarget, currentNode, desiredNode) {
173
179
  },
174
180
  pageTarget
175
181
  );
176
- if (!hasExplicitSubModelKey(desiredNode, "tabs")) {
182
+ if (!(0, import_matching.hasExplicitSubModelKey)(desiredNode, "tabs")) {
177
183
  return;
178
184
  }
179
185
  const hasTabsSpec = Object.prototype.hasOwnProperty.call(desiredNode.subModels || {}, "tabs");
180
186
  if (!hasTabsSpec) {
181
187
  return;
182
188
  }
183
- const desiredTabs = normalizeChildren((_a = desiredNode.subModels) == null ? void 0 : _a.tabs);
184
- const currentTabs = normalizeChildren((_b = currentNode.subModels) == null ? void 0 : _b.tabs);
185
- const tabMatchPlan = planArrayChildMatches(currentTabs, desiredTabs, currentNode.use, "tabs");
189
+ const desiredTabs = (0, import_matching.normalizeChildren)((_a = desiredNode.subModels) == null ? void 0 : _a.tabs);
190
+ const currentTabs = (0, import_matching.normalizeChildren)((_b = currentNode.subModels) == null ? void 0 : _b.tabs);
191
+ const tabMatchPlan = (0, import_matching.planArrayChildMatches)(currentTabs, desiredTabs, currentNode.use, "tabs");
186
192
  const desiredRefs = [];
187
193
  for (const [desiredIndex, desiredTab] of desiredTabs.entries()) {
188
194
  const currentMatch = tabMatchPlan.matchesByDesiredIndex.get(desiredIndex);
@@ -226,7 +232,7 @@ function syncPageNode(ops, state, pageTarget, currentNode, desiredNode) {
226
232
  });
227
233
  }
228
234
  }
229
- emitMoveTabOps(ops, desiredRefs);
235
+ (0, import_layout.emitMoveTabOps)(ops, desiredRefs);
230
236
  }
231
237
  function syncRouteTabNode(ops, state, target, currentNode, desiredNode) {
232
238
  const tabTarget = { uid: String(target.uid || currentNode.uid || "").trim() };
@@ -251,15 +257,15 @@ function syncTabNode(ops, state, tabTarget, currentNode, desiredNode) {
251
257
  },
252
258
  tabTarget
253
259
  );
254
- if (!hasExplicitSubModelKey(desiredNode, "grid")) {
260
+ if (!(0, import_matching.hasExplicitSubModelKey)(desiredNode, "grid")) {
255
261
  return;
256
262
  }
257
263
  const hasGridSpec = Object.prototype.hasOwnProperty.call(desiredNode.subModels || {}, "grid");
258
264
  if (!hasGridSpec) {
259
265
  return;
260
266
  }
261
- const desiredGrid = normalizeChildren((_a = desiredNode.subModels) == null ? void 0 : _a.grid)[0];
262
- const currentGrid = normalizeChildren((_b = currentNode.subModels) == null ? void 0 : _b.grid)[0];
267
+ const desiredGrid = (0, import_matching.normalizeChildren)((_a = desiredNode.subModels) == null ? void 0 : _a.grid)[0];
268
+ const currentGrid = (0, import_matching.normalizeChildren)((_b = currentNode.subModels) == null ? void 0 : _b.grid)[0];
263
269
  if (!desiredGrid || !currentGrid) {
264
270
  return;
265
271
  }
@@ -291,8 +297,8 @@ function syncChildren(ops, state, parentRef, currentParent, desiredParent) {
291
297
  for (const subKey of subKeys) {
292
298
  const desiredRaw = desiredSubModels[subKey];
293
299
  const currentRaw = currentSubModels[subKey];
294
- const desiredChildren = normalizeChildren(desiredRaw);
295
- const currentChildren = normalizeChildren(currentRaw);
300
+ const desiredChildren = (0, import_matching.normalizeChildren)(desiredRaw);
301
+ const currentChildren = (0, import_matching.normalizeChildren)(currentRaw);
296
302
  const isArraySubModel = Array.isArray(desiredRaw) || Array.isArray(currentRaw);
297
303
  if (parentRef.use === "ChildPageModel" && subKey === "tabs") {
298
304
  const tabSync = syncPopupTabs(ops, state, parentRef, currentChildren, desiredChildren);
@@ -317,7 +323,7 @@ function syncChildren(ops, state, parentRef, currentParent, desiredParent) {
317
323
  if (!desiredChild) {
318
324
  continue;
319
325
  }
320
- if (currentChild && matchesObjectChild(currentChild, desiredChild)) {
326
+ if (currentChild && (0, import_matching.matchesObjectChild)(currentChild, desiredChild)) {
321
327
  bindClientKey(state, desiredChild.clientKey, currentChild.uid);
322
328
  if (desiredChild.clientKey) {
323
329
  result.childClientKeyRefs[desiredChild.clientKey] = currentChild.uid;
@@ -354,7 +360,7 @@ function syncChildren(ops, state, parentRef, currentParent, desiredParent) {
354
360
  }
355
361
  continue;
356
362
  }
357
- const childMatchPlan = planArrayChildMatches(currentChildren, desiredChildren, parentRef.use, subKey);
363
+ const childMatchPlan = (0, import_matching.planArrayChildMatches)(currentChildren, desiredChildren, parentRef.use, subKey);
358
364
  const desiredRefs = [];
359
365
  for (const [desiredIndex, desiredChild] of desiredChildren.entries()) {
360
366
  const currentMatch = childMatchPlan.matchesByDesiredIndex.get(desiredIndex);
@@ -394,10 +400,10 @@ function syncChildren(ops, state, parentRef, currentParent, desiredParent) {
394
400
  });
395
401
  }
396
402
  }
397
- emitMoveOps(ops, desiredRefs);
403
+ (0, import_layout.emitMoveOps)(ops, desiredRefs);
398
404
  if (subKey === "items") {
399
405
  result.finalItemRefs = desiredRefs;
400
- result.itemsChanged = didItemRefsChange(currentChildren, desiredRefs);
406
+ result.itemsChanged = (0, import_layout.didItemRefsChange)(currentChildren, desiredRefs);
401
407
  result.itemsSpecified = true;
402
408
  }
403
409
  }
@@ -429,7 +435,7 @@ function createDesiredChild(ops, state, parentRef, subKey, desiredChild, current
429
435
  }
430
436
  return createBlockNode(ops, state, parentRef, desiredChild);
431
437
  }
432
- if (isFieldContainer(parentRef.use, subKey) && !FIELD_WRAPPER_USES.has(desiredChild.use) && !STANDALONE_FIELD_USES.has(desiredChild.use)) {
438
+ if (isFieldContainer(parentRef.use, subKey) && !import_node_use_sets.FIELD_WRAPPER_USES.has(desiredChild.use) && !STANDALONE_FIELD_USES.has(desiredChild.use)) {
433
439
  throw new import_errors.FlowSurfaceBadRequestError(
434
440
  `flowSurfaces apply field wrapper '${desiredChild.use}' is not a public capability`
435
441
  );
@@ -525,7 +531,7 @@ function createFieldNode(ops, state, parentRef, desiredNode) {
525
531
  syncCreatedNode(ops, state, ref2, desiredNode);
526
532
  return ref2;
527
533
  }
528
- const innerField = normalizeChildren((_a = desiredNode.subModels) == null ? void 0 : _a.field)[0];
534
+ const innerField = (0, import_matching.normalizeChildren)((_a = desiredNode.subModels) == null ? void 0 : _a.field)[0];
529
535
  const requestedRenderer = (innerField == null ? void 0 : innerField.use) === "JSFieldModel" || (innerField == null ? void 0 : innerField.use) === "JSEditableFieldModel" ? "js" : void 0;
530
536
  const fieldCapability = (0, import_catalog.resolveSupportedFieldCapability)({
531
537
  containerUse: parentRef.use,
@@ -569,9 +575,9 @@ function createFieldNode(ops, state, parentRef, desiredNode) {
569
575
  }
570
576
  function compilePopupPageSpec(ops, state, hostRef, pageSpec) {
571
577
  var _a, _b, _c;
572
- const tabSpec = normalizeChildren((_a = pageSpec.subModels) == null ? void 0 : _a.tabs)[0];
573
- const gridSpec = normalizeChildren((_b = tabSpec == null ? void 0 : tabSpec.subModels) == null ? void 0 : _b.grid)[0];
574
- const popupItems = normalizeChildren((_c = gridSpec == null ? void 0 : gridSpec.subModels) == null ? void 0 : _c.items);
578
+ const tabSpec = (0, import_matching.normalizeChildren)((_a = pageSpec.subModels) == null ? void 0 : _a.tabs)[0];
579
+ const gridSpec = (0, import_matching.normalizeChildren)((_b = tabSpec == null ? void 0 : tabSpec.subModels) == null ? void 0 : _b.grid)[0];
580
+ const popupItems = (0, import_matching.normalizeChildren)((_c = gridSpec == null ? void 0 : gridSpec.subModels) == null ? void 0 : _c.items);
575
581
  if (!tabSpec || !gridSpec) {
576
582
  throw new import_errors.FlowSurfaceBadRequestError(
577
583
  `flowSurfaces apply popup page creation under '${hostRef.use}' requires popup page -> tab -> grid`
@@ -604,13 +610,13 @@ function compilePopupPageSpec(ops, state, hostRef, pageSpec) {
604
610
  }
605
611
  });
606
612
  }
607
- emitLayoutOp(ops, { uid: popupGridUidRef }, null, gridSpec, {
613
+ (0, import_layout.emitLayoutOp)(ops, { uid: popupGridUidRef }, null, gridSpec, {
608
614
  childClientKeyRefs,
609
615
  finalItemRefs: childRefs,
610
616
  itemsChanged: true,
611
617
  itemsSpecified: true
612
618
  });
613
- emitMoveOps(ops, childRefs);
619
+ (0, import_layout.emitMoveOps)(ops, childRefs);
614
620
  }
615
621
  }
616
622
  function bootstrapPopupShellCreation(ops, state, hostRef, pageSpec, tabSpec, popupItems) {
@@ -664,8 +670,8 @@ function bootstrapPopupShellCreation(ops, state, hostRef, pageSpec, tabSpec, pop
664
670
  return result;
665
671
  }
666
672
  function emitDomainSettingOps(ops, nodeRef, currentNode, desiredNode, explicitTarget) {
667
- const props = omitLayoutProps(desiredNode.props);
668
- const currentProps = omitLayoutProps(currentNode == null ? void 0 : currentNode.props);
673
+ const props = (0, import_layout.omitLayoutProps)(desiredNode.props);
674
+ const currentProps = (0, import_layout.omitLayoutProps)(currentNode == null ? void 0 : currentNode.props);
669
675
  const values = {};
670
676
  if (!import_lodash.default.isNil(props) && !import_lodash.default.isEqual(props, currentProps)) {
671
677
  values.props = props;
@@ -693,33 +699,6 @@ function emitDomainSettingOps(ops, nodeRef, currentNode, desiredNode, explicitTa
693
699
  });
694
700
  }
695
701
  }
696
- function emitLayoutOp(ops, target, currentNode, desiredNode, childSync) {
697
- const explicitLayout = resolveLayoutRefs(extractLayout(desiredNode.props), childSync.childClientKeyRefs);
698
- const desiredLayout = explicitLayout || (isGridNode((currentNode == null ? void 0 : currentNode.use) || desiredNode.use) && childSync.itemsSpecified ? buildAutoLayout(childSync.finalItemRefs.map((item) => item.uidRef)) : null);
699
- if (!desiredLayout) {
700
- return;
701
- }
702
- if (!hasRefValue(desiredLayout) && import_lodash.default.isEqual(desiredLayout, extractLayout(currentNode == null ? void 0 : currentNode.props))) {
703
- return;
704
- }
705
- ops.push({
706
- type: "setLayout",
707
- target,
708
- values: desiredLayout
709
- });
710
- }
711
- function emitMoveOps(ops, desiredRefs) {
712
- for (let index = desiredRefs.length - 2; index >= 0; index -= 1) {
713
- ops.push({
714
- type: "moveNode",
715
- values: {
716
- sourceUid: desiredRefs[index].uidRef,
717
- targetUid: desiredRefs[index + 1].uidRef,
718
- position: "before"
719
- }
720
- });
721
- }
722
- }
723
702
  function getDefaultChildRef(parentRef, subKey, childUse) {
724
703
  if (!parentRef.sourceOpId || !childUse) {
725
704
  return null;
@@ -784,7 +763,7 @@ function getDefaultChildRef(parentRef, subKey, childUse) {
784
763
  use: childUse
785
764
  };
786
765
  }
787
- if (FIELD_WRAPPER_USES.has(parentRef.use) && subKey === "field") {
766
+ if (import_node_use_sets.FIELD_WRAPPER_USES.has(parentRef.use) && subKey === "field") {
788
767
  return {
789
768
  uidRef: makeOpRef(`${parentRef.sourceOpId}.fieldUid`),
790
769
  use: childUse
@@ -810,140 +789,9 @@ function resolveRecordActionCreateTargetUidRef(parentRef, currentParent) {
810
789
  `flowSurfaces apply cannot resolve owning surface for record action container '${parentRef.use}'`
811
790
  );
812
791
  }
813
- function normalizeChildren(input) {
814
- if (!input) {
815
- return [];
816
- }
817
- return import_lodash.default.castArray(input).filter(Boolean);
818
- }
819
- function hasExplicitSubModelKey(node, key) {
820
- return !!(node == null ? void 0 : node.subModels) && Object.prototype.hasOwnProperty.call(node.subModels, key);
821
- }
822
- function matchesObjectChild(currentChild, desiredChild) {
823
- return currentChild.uid === desiredChild.uid || !desiredChild.uid && currentChild.use === desiredChild.use;
824
- }
825
- function planArrayChildMatches(currentChildren, desiredChildren, parentUse, subKey) {
826
- const matchesByDesiredIndex = /* @__PURE__ */ new Map();
827
- const matchedCurrentUids = /* @__PURE__ */ new Set();
828
- const remainingDesiredByUse = /* @__PURE__ */ new Map();
829
- for (const [desiredIndex, desiredChild] of desiredChildren.entries()) {
830
- const matchedCurrent = findExactArrayChildMatch(currentChildren, desiredChild, matchedCurrentUids);
831
- if (matchedCurrent) {
832
- matchesByDesiredIndex.set(desiredIndex, matchedCurrent);
833
- if (matchedCurrent.uid) {
834
- matchedCurrentUids.add(matchedCurrent.uid);
835
- }
836
- continue;
837
- }
838
- if ((desiredChild == null ? void 0 : desiredChild.use) && !desiredChild.uid) {
839
- const desiredIndexes = remainingDesiredByUse.get(desiredChild.use) || [];
840
- desiredIndexes.push(desiredIndex);
841
- remainingDesiredByUse.set(desiredChild.use, desiredIndexes);
842
- }
843
- }
844
- const remainingCurrentByUse = /* @__PURE__ */ new Map();
845
- for (const currentChild of currentChildren) {
846
- if (!(currentChild == null ? void 0 : currentChild.use) || matchedCurrentUids.has(currentChild.uid || "")) {
847
- continue;
848
- }
849
- const currentGroup = remainingCurrentByUse.get(currentChild.use) || [];
850
- currentGroup.push(currentChild);
851
- remainingCurrentByUse.set(currentChild.use, currentGroup);
852
- }
853
- const uses = /* @__PURE__ */ new Set([...remainingCurrentByUse.keys(), ...remainingDesiredByUse.keys()]);
854
- for (const use of uses) {
855
- const currentGroup = remainingCurrentByUse.get(use) || [];
856
- const desiredIndexes = remainingDesiredByUse.get(use) || [];
857
- const shouldReuseByOrder = currentGroup.length > 1 || desiredIndexes.length > 1;
858
- if (currentGroup.length > 0 && desiredIndexes.length > 0 && currentGroup.length !== desiredIndexes.length && shouldReuseByOrder) {
859
- throw new import_errors.FlowSurfaceBadRequestError(
860
- `flowSurfaces apply cannot safely match duplicate '${use}' nodes under '${parentUse}.${subKey}' without explicit uid or signature`
861
- );
862
- }
863
- if (!shouldReuseByOrder) {
864
- continue;
865
- }
866
- const reuseCount = Math.min(currentGroup.length, desiredIndexes.length);
867
- for (let index = 0; index < reuseCount; index += 1) {
868
- const currentChild = currentGroup[index];
869
- const desiredIndex = desiredIndexes[index];
870
- matchesByDesiredIndex.set(desiredIndex, currentChild);
871
- if (currentChild == null ? void 0 : currentChild.uid) {
872
- matchedCurrentUids.add(currentChild.uid);
873
- }
874
- }
875
- }
876
- return {
877
- matchesByDesiredIndex,
878
- matchedCurrentUids
879
- };
880
- }
881
- function findExactArrayChildMatch(currentChildren, desiredChild, matchedCurrent) {
882
- if (desiredChild.uid) {
883
- return currentChildren.find((item) => (item == null ? void 0 : item.uid) === desiredChild.uid);
884
- }
885
- const desiredStrongSignature = getStrongNodeSignature(desiredChild);
886
- if (desiredStrongSignature) {
887
- return currentChildren.find(
888
- (item) => !matchedCurrent.has(item.uid || "") && getStrongNodeSignature(item) === desiredStrongSignature
889
- );
890
- }
891
- const desiredWeakSignature = getWeakNodeSignature(desiredChild);
892
- if (desiredWeakSignature) {
893
- return currentChildren.find(
894
- (item) => !matchedCurrent.has(item.uid || "") && getWeakNodeSignature(item) === desiredWeakSignature
895
- );
896
- }
897
- return void 0;
898
- }
899
- function getStrongNodeSignature(node) {
900
- if (!(node == null ? void 0 : node.use)) {
901
- return null;
902
- }
903
- const resourceInit = import_lodash.default.get(node, ["stepParams", "resourceSettings", "init"]);
904
- if ((resourceInit == null ? void 0 : resourceInit.dataSourceKey) || (resourceInit == null ? void 0 : resourceInit.collectionName) || (resourceInit == null ? void 0 : resourceInit.associationName) || (resourceInit == null ? void 0 : resourceInit.associationPathName) || !import_lodash.default.isUndefined(resourceInit == null ? void 0 : resourceInit.sourceId)) {
905
- return [
906
- "resource",
907
- node.use,
908
- resourceInit.dataSourceKey || "",
909
- resourceInit.collectionName || "",
910
- resourceInit.associationName || "",
911
- resourceInit.associationPathName || "",
912
- import_lodash.default.isUndefined(resourceInit.sourceId) ? "" : String(resourceInit.sourceId)
913
- ].join(":");
914
- }
915
- const fieldInit = import_lodash.default.get(node, ["stepParams", "fieldSettings", "init"]) || import_lodash.default.get(node, ["subModels", "field", "stepParams", "fieldSettings", "init"]);
916
- if (fieldInit == null ? void 0 : fieldInit.fieldPath) {
917
- return [
918
- "field",
919
- node.use,
920
- fieldInit.dataSourceKey || "",
921
- fieldInit.collectionName || "",
922
- fieldInit.associationPathName || "",
923
- fieldInit.fieldPath
924
- ].join(":");
925
- }
926
- if (node.use === "TableActionsColumnModel") {
927
- return "slot:table-actions-column";
928
- }
929
- return null;
930
- }
931
- function getWeakNodeSignature(node) {
932
- if (!(node == null ? void 0 : node.use)) {
933
- return null;
934
- }
935
- const title = import_lodash.default.get(node, ["stepParams", "pageTabSettings", "tab", "title"]) || import_lodash.default.get(node, ["stepParams", "buttonSettings", "general", "title"]) || import_lodash.default.get(node, ["props", "title"]);
936
- if (typeof title === "string" && title.trim()) {
937
- return ["title", node.use, title.trim()].join(":");
938
- }
939
- return null;
940
- }
941
792
  function isFieldWrapperNode(use) {
942
793
  return (0, import_placement.isFieldWrapperUse)(use);
943
794
  }
944
- function isGridNode(use) {
945
- return (0, import_placement.isGridUse)(use);
946
- }
947
795
  function isFieldContainer(parentUse, subKey) {
948
796
  return (0, import_placement.isFieldContainerUse)(parentUse, subKey);
949
797
  }
@@ -956,96 +804,10 @@ function isActionContainer(parentUse) {
956
804
  function extractResourceInit(node) {
957
805
  return import_lodash.default.get(node, ["stepParams", "resourceSettings", "init"]);
958
806
  }
959
- function extractLayout(props) {
960
- if (!props || !("rows" in props) && !("sizes" in props) && !("rowOrder" in props)) {
961
- return null;
962
- }
963
- return {
964
- rows: props.rows || {},
965
- sizes: props.sizes || {},
966
- rowOrder: props.rowOrder || Object.keys(props.rows || {})
967
- };
968
- }
969
- function omitLayoutProps(props) {
970
- if (!props) {
971
- return props;
972
- }
973
- const next = import_lodash.default.omit(props, ["rows", "sizes", "rowOrder"]);
974
- return Object.keys(next).length ? next : void 0;
975
- }
976
- function resolveLayoutRefs(layout, childClientKeyRefs) {
977
- if (!layout) {
978
- return layout;
979
- }
980
- return {
981
- rows: Object.fromEntries(
982
- Object.entries(layout.rows || {}).map(([rowId, cells]) => [
983
- rowId,
984
- import_lodash.default.castArray(cells).map(
985
- (cell) => import_lodash.default.castArray(cell).map((itemUid) => childClientKeyRefs[itemUid] ?? itemUid)
986
- )
987
- ])
988
- ),
989
- sizes: layout.sizes || {},
990
- rowOrder: layout.rowOrder || []
991
- };
992
- }
993
- function hasRefValue(value) {
994
- if (Array.isArray(value)) {
995
- return value.some((item) => hasRefValue(item));
996
- }
997
- if (import_lodash.default.isPlainObject(value)) {
998
- if (typeof value.ref === "string") {
999
- return true;
1000
- }
1001
- return Object.values(value).some((item) => hasRefValue(item));
1002
- }
1003
- return false;
1004
- }
1005
- function buildAutoLayout(itemRefs) {
1006
- if (!itemRefs.length) {
1007
- return {
1008
- rows: {},
1009
- sizes: {},
1010
- rowOrder: []
1011
- };
1012
- }
1013
- return {
1014
- rows: Object.fromEntries(itemRefs.map((itemRef, index) => [`autoRow${index + 1}`, [[itemRef]]])),
1015
- sizes: Object.fromEntries(itemRefs.map((_2, index) => [`autoRow${index + 1}`, [24]])),
1016
- rowOrder: itemRefs.map((_2, index) => `autoRow${index + 1}`)
1017
- };
1018
- }
1019
- function didItemRefsChange(currentChildren, desiredRefs) {
1020
- if (currentChildren.length !== desiredRefs.length) {
1021
- return true;
1022
- }
1023
- return desiredRefs.some(
1024
- (item, index) => {
1025
- var _a;
1026
- return typeof item.uidRef !== "string" || ((_a = currentChildren[index]) == null ? void 0 : _a.uid) !== item.uidRef;
1027
- }
1028
- );
1029
- }
1030
807
  function nextOpId(state, prefix) {
1031
808
  state.seq += 1;
1032
809
  return `${prefix}_${state.seq}`;
1033
810
  }
1034
- function emitMoveTabOps(ops, desiredRefs) {
1035
- emitOrderedTabMoves(ops, desiredRefs, "moveTab");
1036
- }
1037
- function emitOrderedTabMoves(ops, desiredRefs, type) {
1038
- for (let index = desiredRefs.length - 2; index >= 0; index -= 1) {
1039
- ops.push({
1040
- type,
1041
- values: {
1042
- sourceUid: desiredRefs[index].uidRef,
1043
- targetUid: desiredRefs[index + 1].uidRef,
1044
- position: "before"
1045
- }
1046
- });
1047
- }
1048
- }
1049
811
  function bindClientKey(state, clientKey, uid) {
1050
812
  if (!clientKey || typeof uid !== "string") {
1051
813
  return;
@@ -1059,7 +821,7 @@ function syncPopupTabs(ops, state, popupPageRef, currentTabs, desiredTabs) {
1059
821
  itemsChanged: false,
1060
822
  itemsSpecified: false
1061
823
  };
1062
- const tabMatchPlan = planArrayChildMatches(currentTabs, desiredTabs, popupPageRef.use, "tabs");
824
+ const tabMatchPlan = (0, import_matching.planArrayChildMatches)(currentTabs, desiredTabs, popupPageRef.use, "tabs");
1063
825
  const desiredRefs = [];
1064
826
  for (const [desiredIndex, desiredTab] of desiredTabs.entries()) {
1065
827
  const currentMatch = tabMatchPlan.matchesByDesiredIndex.get(desiredIndex);
@@ -1094,7 +856,7 @@ function syncPopupTabs(ops, state, popupPageRef, currentTabs, desiredTabs) {
1094
856
  });
1095
857
  }
1096
858
  }
1097
- emitOrderedTabMoves(ops, desiredRefs, "movePopupTab");
859
+ (0, import_layout.emitMovePopupTabOps)(ops, desiredRefs);
1098
860
  return result;
1099
861
  }
1100
862
  function createPopupTabNode(ops, state, popupPageRef, desiredNode) {
@@ -1124,6 +886,5 @@ function createPopupTabNode(ops, state, popupPageRef, desiredNode) {
1124
886
  }
1125
887
  // Annotate the CommonJS export names for ESM import in node:
1126
888
  0 && (module.exports = {
1127
- buildAutoLayout,
1128
889
  compileApplySpec
1129
890
  });