@objectstack/console 12.3.0 → 12.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.objectui-sha +1 -1
- package/dist/assets/{AdapterProvider-_4c7hk3d.js → AdapterProvider-DYYVhErE.js} +1 -1
- package/dist/assets/{AiPendingActionsPage-Gc2Wh8Kh.js → AiPendingActionsPage-BRZ9smBE.js} +1 -1
- package/dist/assets/ApiConsolePage-DqCLFtg6.js +1 -0
- package/dist/assets/AppDocsIndex-ChTjYsgs.js +1 -0
- package/dist/assets/AppManagementPage-CpBtMYk7.js +1 -0
- package/dist/assets/ApprovalsInboxPage-Cm6RlF50.js +1 -0
- package/dist/assets/{AuditLogPage-C-rDSpPt.js → AuditLogPage-BUapxa-t.js} +1 -1
- package/dist/assets/{ComponentNavView-DX23dzZd.js → ComponentNavView-CV-L0t8o.js} +1 -1
- package/dist/assets/ConsoleFloatingChatbot-BtSnKZ5C.js +1 -0
- package/dist/assets/CreateViewDialog-CMNLzv6j.js +1 -0
- package/dist/assets/DashboardView-DTeb8b6a.js +1 -0
- package/dist/assets/DashboardWidgetInspector-CUJFDeER.js +1 -0
- package/dist/assets/DeveloperHubPage-CigDAiDQ.js +1 -0
- package/dist/assets/{ExpressionProvider-w-HoWEV1.js → ExpressionProvider-ODpzkcN3.js} +1 -1
- package/dist/assets/FlowRunsPage-BCTyVNQV.js +1 -0
- package/dist/assets/{IntegrationsPage-COvUlRq2.js → IntegrationsPage-D8453O8m.js} +2 -2
- package/dist/assets/InterfaceListPage-CaG6oJ3-.js +1 -0
- package/dist/assets/{ManagedByBadge-BZofhfqM.js → ManagedByBadge-BGSB7vGi.js} +1 -1
- package/dist/assets/MarketplaceAccessDenied-CAuxNcMw.js +1 -0
- package/dist/assets/MarketplaceInstalledPage-DIKAvmEt.js +1 -0
- package/dist/assets/MarketplacePackagePage-CxoOdisY.js +4 -0
- package/dist/assets/MarketplacePage-SkUEdd3B.js +1 -0
- package/dist/assets/{MetadataInspector-CpceGXDL.js → MetadataInspector-RvnQ-QOT.js} +1 -1
- package/dist/assets/MetadataProvider-BpQl3Bw2.js +1 -0
- package/dist/assets/{MonacoImpl-DoDns4Vj.js → MonacoImpl-nyLaER8_.js} +1 -1
- package/dist/assets/ObjectDataPage-CnMdpBNe.js +1 -0
- package/dist/assets/PageView-Ckvi7QO6.js +1 -0
- package/dist/assets/ProfilePage-7etuxYZk.js +1 -0
- package/dist/assets/PublicFormsPage-xWq9jZzJ.js +1 -0
- package/dist/assets/RecordDetailView-CzR6BAUv.js +9 -0
- package/dist/assets/{RecordFormPage-CbvOD5UT.js → RecordFormPage-DTyNzewM.js} +1 -1
- package/dist/assets/ReportDefaultInspector-BA-D9th_.js +11 -0
- package/dist/assets/ReportView-CHBbT7mP.js +2 -0
- package/dist/assets/{SearchResultsPage-D0nbmFox.js → SearchResultsPage-BIuFjDoa.js} +1 -1
- package/dist/assets/{SettingsHub-BsZee-2C.js → SettingsHub-ZMQjBQwP.js} +1 -1
- package/dist/assets/SettingsView-eCnpX1vu.js +1 -0
- package/dist/assets/SystemHubPage-f4hYqDoI.js +1 -0
- package/dist/assets/{abnfDiagram-VRR7QNED-DWrainSQ.js → abnfDiagram-VRR7QNED-o_fBNeYD.js} +1 -1
- package/dist/assets/architecture-TIHT7OUA-BF_0SrOH.js +1 -0
- package/dist/assets/{architectureDiagram-ZJ3FMSHR-BqIfH_cZ.js → architectureDiagram-ZJ3FMSHR-Bk_LES5L.js} +1 -1
- package/dist/assets/{assistantBus-DosfPCbN.js → assistantBus-BFk4fCbM.js} +1 -1
- package/dist/assets/{blockDiagram-677ZJIJ3-BDhRO3KX.js → blockDiagram-677ZJIJ3-BmONypzo.js} +1 -1
- package/dist/assets/{c4Diagram-LMCZKHZV-DBmvkEa3.js → c4Diagram-LMCZKHZV-DqIiaVjm.js} +1 -1
- package/dist/assets/channel-CvRTB8GE.js +1 -0
- package/dist/assets/{chunk-32BRIVSS-1_aHOdgh.js → chunk-32BRIVSS-BbTX8O4m.js} +1 -1
- package/dist/assets/{chunk-52WLFC77-C-mFgIG6.js → chunk-52WLFC77-DkgICN4F.js} +1 -1
- package/dist/assets/{chunk-C7G6YPKG-DvvI9WqY.js → chunk-C7G6YPKG-UMP_bNDd.js} +1 -1
- package/dist/assets/{chunk-EX3LRPZG-BaKE258M.js → chunk-EX3LRPZG-B0dJ64Ff.js} +1 -1
- package/dist/assets/{chunk-FWX5IMBZ-BZ1KYToN.js → chunk-FWX5IMBZ-B8cCL4T7.js} +1 -1
- package/dist/assets/{chunk-HOUHSVGY-BjQmUg1D.js → chunk-HOUHSVGY-B5nScni0.js} +1 -1
- package/dist/assets/{chunk-ICXQ74PX-DGFLQjwm.js → chunk-ICXQ74PX-zJg8KmvA.js} +1 -1
- package/dist/assets/{chunk-KEIR6QF5-MVybfwhZ.js → chunk-KEIR6QF5-CxDrFr0l.js} +3 -3
- package/dist/assets/{chunk-MOJQB5TN-aPZk6pC8.js → chunk-MOJQB5TN-DBKCpvOi.js} +1 -1
- package/dist/assets/{chunk-OGEWGWER-C_9e4OS0.js → chunk-OGEWGWER-bKk51Nxt.js} +1 -1
- package/dist/assets/{chunk-PUDLZKDR-c0kZKR-G.js → chunk-PUDLZKDR-CKn_9iXM.js} +1 -1
- package/dist/assets/{chunk-Q4XR5HBZ-o24M5lkF.js → chunk-Q4XR5HBZ-BP9atbVx.js} +1 -1
- package/dist/assets/{chunk-RYQCIY6F-DUMnfbFk.js → chunk-RYQCIY6F-B5RR1tIz.js} +1 -1
- package/dist/assets/{chunk-V7JOEXUC-BP0RE3_V.js → chunk-V7JOEXUC-DTerDTcg.js} +1 -1
- package/dist/assets/chunk-VAUOI2AC-BrcFPe7Z.js +1 -0
- package/dist/assets/{chunk-VR4S4FIN-DykLEeqy.js → chunk-VR4S4FIN-jB_W-MHs.js} +1 -1
- package/dist/assets/chunk-WYO6CB5R-Cndg0Yo5.js +127 -0
- package/dist/assets/chunk-XXDRQBXY-DGANY6E3.js +1 -0
- package/dist/assets/{chunk-ZGVPDNZ5-DQH9cJwj.js → chunk-ZGVPDNZ5-BUUSzPje.js} +1 -1
- package/dist/assets/classDiagram-OUVF2IWQ-BGL42sFI.js +1 -0
- package/dist/assets/classDiagram-v2-EOCWNBFH-BGL42sFI.js +1 -0
- package/dist/assets/{cose-bilkent-JH36ORCC-CDWwyRUu.js → cose-bilkent-JH36ORCC-DJ-X6wmF.js} +1 -1
- package/dist/assets/cynefin-VYW2F7L2-CXt4AgYW.js +1 -0
- package/dist/assets/{cynefinDiagram-TSTJHNR4-Dn83Cn2D.js → cynefinDiagram-TSTJHNR4-C5mKt5aU.js} +1 -1
- package/dist/assets/{cytoscape.esm-Djp6vQyU.js → cytoscape.esm-B3I8pqwA.js} +1 -1
- package/dist/assets/{dagre-VKFMJZFB-DYKhgtL2.js → dagre-VKFMJZFB-Crs38V5P.js} +2 -2
- package/dist/assets/{data-adapter-W6WwA2ln.js → data-adapter-DLOPVTZ2.js} +1 -1
- package/dist/assets/{diagram-FQU43EPY-84kGXmcJ.js → diagram-FQU43EPY-Bkx8ccpS.js} +1 -1
- package/dist/assets/{diagram-G47NLZAW-FzYRzXJF.js → diagram-G47NLZAW-CSNJrWDK.js} +1 -1
- package/dist/assets/{diagram-NH7WQ7WH-D2_7Upma.js → diagram-NH7WQ7WH-PaRAbfdR.js} +1 -1
- package/dist/assets/{diagram-OA4YK3LP-uqOHgtNB.js → diagram-OA4YK3LP-C2A07yOA.js} +1 -1
- package/dist/assets/{diagram-WEI45ONY-BoLpoJXF.js → diagram-WEI45ONY-BEyyGNpU.js} +1 -1
- package/dist/assets/{dist-CfcbLQde.js → dist-YwlXXOlT.js} +1 -1
- package/dist/assets/{ebnfDiagram-CCIWWBDH-DLYgN3Ab.js → ebnfDiagram-CCIWWBDH-CtfwkNuv.js} +1 -1
- package/dist/assets/{erDiagram-Q63AITRT-BmagGyFR.js → erDiagram-Q63AITRT-DjK6P1sf.js} +1 -1
- package/dist/assets/eventmodeling-45OFAUF4-Dmacb12o.js +1 -0
- package/dist/assets/{exceljs.min-DIyttv_G.js → exceljs.min-Dpb6mnud.js} +2 -2
- package/dist/assets/flowDiagram-23GEKE2U-DfQvGNQk.js +1 -0
- package/dist/assets/framework-B3O15Lsq.js +36 -0
- package/dist/assets/{ganttDiagram-NO4QXBWP-DdGzwLRB.js → ganttDiagram-NO4QXBWP-UPhpWlEd.js} +1 -1
- package/dist/assets/getIcon-B5xaQx5N.js +1 -0
- package/dist/assets/gitGraph-TEB2WS4Q-ChM6j6Bd.js +1 -0
- package/dist/assets/{gitGraphDiagram-IHSO6WYX-Dv8qb0qh.js → gitGraphDiagram-IHSO6WYX-B6Qcltd9.js} +2 -2
- package/dist/assets/{highlighted-body-OFNGDK62-CLUabCIi.js → highlighted-body-OFNGDK62-B_roNkgm.js} +1 -1
- package/dist/assets/index-B-sF8xtC.css +2 -0
- package/dist/assets/index-TdJi7kFM.js +2 -0
- package/dist/assets/info-DKCQHKI2-C0RTkygr.js +1 -0
- package/dist/assets/{infoDiagram-FWYZ7A6U-BnI8Gbdt.js → infoDiagram-FWYZ7A6U-CgEoZeWY.js} +1 -1
- package/dist/assets/infrastructure-Bcx6-8du.js +3 -0
- package/dist/assets/{ishikawaDiagram-FXEZZL3T-BfpmvVA0.js → ishikawaDiagram-FXEZZL3T-DvmRhm8H.js} +1 -1
- package/dist/assets/{journeyDiagram-5HDEW3XC-8UQvh7pY.js → journeyDiagram-5HDEW3XC-DFf6bjOX.js} +2 -2
- package/dist/assets/{kanban-definition-HUTT4EX6-CFX7QbbK.js → kanban-definition-HUTT4EX6-DLK5X8Ol.js} +1 -1
- package/dist/assets/maplibre-gl-R0DO2NBr.js +748 -0
- package/dist/assets/{marketplaceApi-BLyDDfGk.js → marketplaceApi-zYQofLEk.js} +1 -1
- package/dist/assets/mermaid-GHXKKRXX-B7uCX_yo.js +1 -0
- package/dist/assets/{mermaid-parser.core-qFqgm_H6.js → mermaid-parser.core-DV_Ys_OF.js} +2 -2
- package/dist/assets/{mermaid.core-T8rJXbMH.js → mermaid.core-D3axazyv.js} +2 -2
- package/dist/assets/metadata-admin-DJAg5WLs.js +22 -0
- package/dist/assets/{mindmap-definition-LN4V7U3C-BmcygCh7.js → mindmap-definition-LN4V7U3C-DwbonLR_.js} +1 -1
- package/dist/assets/packet-7NZHBO7P-DSHvkxBR.js +1 -0
- package/dist/assets/{pegDiagram-2B236MQR-D3IbyQE9.js → pegDiagram-2B236MQR-B4IMkAIV.js} +1 -1
- package/dist/assets/pie-RZYD4A2V-DjNUdL88.js +1 -0
- package/dist/assets/{pieDiagram-ENE6RG2P-BZteOl-k.js → pieDiagram-ENE6RG2P-D8jBhNXT.js} +1 -1
- package/dist/assets/plugin-calendar-BKbWgkod.js +1 -0
- package/dist/assets/plugin-charts-BZo5ApEF.js +7 -0
- package/dist/assets/plugin-chatbot-D2Uv-hn9.js +120 -0
- package/dist/assets/plugin-dashboard-CRFZp7gC.js +6 -0
- package/dist/assets/plugin-form-FeZEoC2R.js +1 -0
- package/dist/assets/plugin-gantt-D9YRdBGD.js +93 -0
- package/dist/assets/plugin-grid-eiIl2HN_.js +8 -0
- package/dist/assets/plugin-kanban-3rFMGC21.js +1 -0
- package/dist/assets/plugin-map-BHQrQ_Wu.js +1 -0
- package/dist/assets/{plugin-markdown-CWbusz5W.js → plugin-markdown-DesFSRDB.js} +1 -1
- package/dist/assets/{plugin-report-Cy6FwNfk.js → plugin-report-BKD6SOp5.js} +4 -4
- package/dist/assets/plugin-timeline-BrkABjqu.js +1 -0
- package/dist/assets/{plugin-tree-CtakCCIf.js → plugin-tree-CKck3lEJ.js} +1 -1
- package/dist/assets/plugin-view-BJ9uLrnO.js +1 -0
- package/dist/assets/plugins-views-CibWNUsP.js +4 -0
- package/dist/assets/{quadrantDiagram-ABIIQ3AL-DPVvulM5.js → quadrantDiagram-ABIIQ3AL-Do3adYzz.js} +1 -1
- package/dist/assets/radar-I7S5WNFK-qO0bWLwF.js +1 -0
- package/dist/assets/railroad-3IZDKUUU-CAj9esX-.js +1 -0
- package/dist/assets/railroad-abnf-AHOZXSZD-Ci_Yg729.js +1 -0
- package/dist/assets/railroad-ebnf-EBAXGLYW-Tz7H2Jrw.js +1 -0
- package/dist/assets/railroad-peg-LSFZ7HO6-BJIalSaK.js +1 -0
- package/dist/assets/{railroadDiagram-RFXS5EU6-CgLSy8wn.js → railroadDiagram-RFXS5EU6-DDA7XtKq.js} +1 -1
- package/dist/assets/{requirementDiagram-TGXJPOKE-DYX2pMfn.js → requirementDiagram-TGXJPOKE-CClkXauU.js} +1 -1
- package/dist/assets/{sankeyDiagram-HTMAVEWB-amvhkMhz.js → sankeyDiagram-HTMAVEWB-DlUFch6E.js} +1 -1
- package/dist/assets/{sequenceDiagram-DBY2YBRQ-CPxWMCbb.js → sequenceDiagram-DBY2YBRQ-BEDTwji4.js} +1 -1
- package/dist/assets/{skeletons-BK6x7CYd.js → skeletons-CzC0fiXD.js} +1 -1
- package/dist/assets/src-6xqJEeiC.js +15 -0
- package/dist/assets/{src-BPEDMjfw.js → src-BeTFx9-N.js} +1 -1
- package/dist/assets/{src-BvIm_4jD.js → src-CSRoqdRD.js} +1 -1
- package/dist/assets/{src-6rOMKMLU.js → src-D0ZYDfff.js} +1 -1
- package/dist/assets/{stateDiagram-2N3HPSRC-DkFPpTq2.js → stateDiagram-2N3HPSRC-BN6M4MGy.js} +1 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-DCaXJLPh.js +1 -0
- package/dist/assets/{swimlanes-5IMT3BWC-DMPnpahc.js → swimlanes-5IMT3BWC-Bycq06w3.js} +1 -1
- package/dist/assets/swimlanesDiagram-G3AALYLV-DWFAvAh7.js +8 -0
- package/dist/assets/{timeline-definition-FHXFAJF6-DMhg5ZmV.js → timeline-definition-FHXFAJF6-B6Oiv_gP.js} +1 -1
- package/dist/assets/treeView-QDETBFTQ-Cc2FYETg.js +1 -0
- package/dist/assets/treemap-6X3UGDF4-a4EjGpO3.js +1 -0
- package/dist/assets/{types-X8W-qTHJ.js → types-UYoEctl-.js} +1 -1
- package/dist/assets/ui-components-rkvkkTxO.js +42 -0
- package/dist/assets/{ui-layout-BdFgfR9C.js → ui-layout-CAjjF5_S.js} +1 -1
- package/dist/assets/{useMetadata-DAEfn7ks.js → useMetadata-Eb5o6ihl.js} +1 -1
- package/dist/assets/useOpenRecordList-DIo7M1au.js +1 -0
- package/dist/assets/{usePackageL10n-CasuagU5.js → usePackageL10n-CiFMHfKe.js} +1 -1
- package/dist/assets/{useReconcileOnError-CtvIPgmD.js → useReconcileOnError-4is_Tic6.js} +1 -1
- package/dist/assets/{useRecordApprovals-BHkgfYJW.js → useRecordApprovals-obyIj2_8.js} +1 -1
- package/dist/assets/vendor-charts-D_CNNxD5.js +67 -0
- package/dist/assets/vendor-dndkit-CzBh0_98.js +5 -0
- package/dist/assets/vendor-i18n-B6GOGCem.js +1 -0
- package/dist/assets/{vendor-icons-core-CPQTXONm.js → vendor-icons-core-DvLgTVYc.js} +1 -1
- package/dist/assets/{vendor-markdown-Cbritblm.js → vendor-markdown-BJvgKhXw.js} +18 -18
- package/dist/assets/vendor-objectstack-Bw0HRuFa.js +95 -0
- package/dist/assets/vendor-radix-DCTEpigg.js +46 -0
- package/dist/assets/vendor-react-BGDDiZfJ.js +13 -0
- package/dist/assets/vendor-sentry-CHRc7_3y.js +501 -0
- package/dist/assets/{vendor-ui-utils-C1OpMExs.js → vendor-ui-utils-BzQBRdq3.js} +1 -1
- package/dist/assets/{vennDiagram-L72KCM5P-BCn9MNWT.js → vennDiagram-L72KCM5P-DqRcgOxS.js} +1 -1
- package/dist/assets/wardley-OPB4EBWU-CuNyH0xZ.js +1 -0
- package/dist/assets/{wardleyDiagram-EHGQE667-ShqmBgOZ.js → wardleyDiagram-EHGQE667-BDyIMWfB.js} +1 -1
- package/dist/assets/{xychartDiagram-FW5EYKEG-D1hShMP_.js → xychartDiagram-FW5EYKEG-BRNQk20I.js} +1 -1
- package/dist/index.html +6 -6
- package/package.json +1 -1
- package/dist/assets/ApiConsolePage-CmiLmtuU.js +0 -1
- package/dist/assets/AppDocsIndex-CG7e4V2y.js +0 -1
- package/dist/assets/AppManagementPage-C7T-9Exg.js +0 -1
- package/dist/assets/ApprovalsInboxPage-D9PFFxKD.js +0 -1
- package/dist/assets/ConsoleFloatingChatbot-CmLazUxX.js +0 -1
- package/dist/assets/CreateViewDialog-6JmiAMxS.js +0 -1
- package/dist/assets/DashboardView-Al7ce4gm.js +0 -1
- package/dist/assets/DashboardWidgetInspector-BmIMgSGO.js +0 -1
- package/dist/assets/DeveloperHubPage-D8eYekI9.js +0 -1
- package/dist/assets/FlowRunsPage-Hs5i7s3C.js +0 -1
- package/dist/assets/InterfaceListPage-JNxR3qlQ.js +0 -1
- package/dist/assets/MarketplaceAccessDenied-Cur1UQ0U.js +0 -1
- package/dist/assets/MarketplaceInstalledPage-D9ow2tlx.js +0 -1
- package/dist/assets/MarketplacePackagePage-0AKyKbMD.js +0 -4
- package/dist/assets/MarketplacePage-DUzZZa8D.js +0 -1
- package/dist/assets/MetadataProvider-MNkZn-bR.js +0 -1
- package/dist/assets/ObjectDataPage-CUJksP8e.js +0 -1
- package/dist/assets/PageView-AS6xg5z-.js +0 -1
- package/dist/assets/ProfilePage-iJeMD7FK.js +0 -1
- package/dist/assets/PublicFormsPage-C-wbtEXG.js +0 -1
- package/dist/assets/RecordDetailView-Ba0xool8.js +0 -9
- package/dist/assets/ReportDefaultInspector-OSqdhKEL.js +0 -11
- package/dist/assets/ReportView-Df7cdlQo.js +0 -2
- package/dist/assets/SettingsView-CSBwd4YP.js +0 -1
- package/dist/assets/SystemHubPage-n41ly_cC.js +0 -1
- package/dist/assets/architecture-TIHT7OUA-D3WxD8aQ.js +0 -1
- package/dist/assets/channel-MM6d7ooS.js +0 -1
- package/dist/assets/chunk-VAUOI2AC-Bgyec1On.js +0 -1
- package/dist/assets/chunk-WYO6CB5R-BBbafnWJ.js +0 -127
- package/dist/assets/chunk-XXDRQBXY-V26l8fww.js +0 -1
- package/dist/assets/classDiagram-OUVF2IWQ-BOtUpfWB.js +0 -1
- package/dist/assets/classDiagram-v2-EOCWNBFH-BOtUpfWB.js +0 -1
- package/dist/assets/cynefin-VYW2F7L2-v0nc1IZv.js +0 -1
- package/dist/assets/eventmodeling-45OFAUF4-CHsG6T7D.js +0 -1
- package/dist/assets/flowDiagram-23GEKE2U-BZtO2Jjx.js +0 -1
- package/dist/assets/framework-B9PMswdm.js +0 -36
- package/dist/assets/getIcon-DkcFniPV.js +0 -1
- package/dist/assets/gitGraph-TEB2WS4Q-DEB3Nljf.js +0 -1
- package/dist/assets/index-Oki50z-M.js +0 -2
- package/dist/assets/index-rbBh03NP.css +0 -2
- package/dist/assets/info-DKCQHKI2-BMNzABlv.js +0 -1
- package/dist/assets/infrastructure-BnbfcrX8.js +0 -3
- package/dist/assets/maplibre-gl-DGbvC0OV.js +0 -748
- package/dist/assets/mermaid-GHXKKRXX-Df_DEhBm.js +0 -1
- package/dist/assets/metadata-admin-DiOg8Tx8.js +0 -22
- package/dist/assets/packet-7NZHBO7P-CVEX3X_K.js +0 -1
- package/dist/assets/pie-RZYD4A2V-VzBvughO.js +0 -1
- package/dist/assets/plugin-calendar-CVeG5Hhb.js +0 -1
- package/dist/assets/plugin-charts-BTfOaZVx.js +0 -7
- package/dist/assets/plugin-chatbot-COpsZSy4.js +0 -120
- package/dist/assets/plugin-dashboard-Bi5WrqPG.js +0 -6
- package/dist/assets/plugin-form-CzotVFc-.js +0 -1
- package/dist/assets/plugin-gantt-BUcqVYxX.js +0 -93
- package/dist/assets/plugin-grid-BXfwTczT.js +0 -8
- package/dist/assets/plugin-kanban-Dw_QTU-e.js +0 -1
- package/dist/assets/plugin-map-D89OX2_H.js +0 -1
- package/dist/assets/plugin-timeline-BAImk_4t.js +0 -1
- package/dist/assets/plugin-view-DZC_ZJtv.js +0 -1
- package/dist/assets/plugins-views-CxFTNQJ7.js +0 -4
- package/dist/assets/radar-I7S5WNFK-BvMfKOT_.js +0 -1
- package/dist/assets/railroad-3IZDKUUU-DfKQD3PJ.js +0 -1
- package/dist/assets/railroad-abnf-AHOZXSZD-DVyrJPzV.js +0 -1
- package/dist/assets/railroad-ebnf-EBAXGLYW-Cri8VQ5d.js +0 -1
- package/dist/assets/railroad-peg-LSFZ7HO6-Bmvxxxt6.js +0 -1
- package/dist/assets/src-CCztNT-4.js +0 -15
- package/dist/assets/stateDiagram-v2-6OUMAXLB-C_tQckF_.js +0 -1
- package/dist/assets/swimlanesDiagram-G3AALYLV-BLVdl7Q4.js +0 -8
- package/dist/assets/treeView-QDETBFTQ-Cz0fwXom.js +0 -1
- package/dist/assets/treemap-6X3UGDF4-BlqJD81v.js +0 -1
- package/dist/assets/ui-components-DsYvPIox.js +0 -42
- package/dist/assets/useOpenRecordList-DL3H_OJi.js +0 -1
- package/dist/assets/vendor-charts-DVOdzzh2.js +0 -67
- package/dist/assets/vendor-dndkit-0M_nRjzm.js +0 -5
- package/dist/assets/vendor-i18n-sU23bKX1.js +0 -1
- package/dist/assets/vendor-objectstack-sPlD8LgO.js +0 -95
- package/dist/assets/vendor-radix-DniuRzL-.js +0 -46
- package/dist/assets/vendor-react-slxo-5GC.js +0 -11
- package/dist/assets/vendor-sentry-BnfuR4xu.js +0 -501
- package/dist/assets/wardley-OPB4EBWU-DdYQ8RHK.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DAXXjFlN.js";import{Gt as t,t as n}from"./framework-B9PMswdm.js";import{n as r}from"./vendor-zod-DNgwlUUI.js";var i=e((e=>{var t=r();function n(e){if(typeof process<`u`&&{}.OS_EAGER_SCHEMAS===`1`)return e();let t,n=()=>(t===void 0&&(t=e()),t);return new Proxy(function(){},{get(e,t){let r=n(),i=r[t];return typeof i==`function`?i.bind(r):i},set(e,t,r){let i=n();return i[t]=r,!0},has(e,t){return t in n()},ownKeys(){return Reflect.ownKeys(n())},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(n(),t)},getPrototypeOf(){return Reflect.getPrototypeOf(n())}})}var i=n(()=>t.z.object({$field:t.z.string().describe(`Field Reference/Column Name`)})),a=n(()=>t.z.object({$eq:t.z.any().optional(),$ne:t.z.any().optional()})),o=n(()=>t.z.object({$gt:t.z.union([t.z.number(),t.z.date(),i]).optional(),$gte:t.z.union([t.z.number(),t.z.date(),i]).optional(),$lt:t.z.union([t.z.number(),t.z.date(),i]).optional(),$lte:t.z.union([t.z.number(),t.z.date(),i]).optional()})),s=n(()=>t.z.object({$in:t.z.array(t.z.any()).optional(),$nin:t.z.array(t.z.any()).optional()})),c=n(()=>t.z.object({$between:t.z.tuple([t.z.union([t.z.number(),t.z.date(),i]),t.z.union([t.z.number(),t.z.date(),i])]).optional()})),l=n(()=>t.z.object({$contains:t.z.string().optional(),$notContains:t.z.string().optional(),$startsWith:t.z.string().optional(),$endsWith:t.z.string().optional()})),u=n(()=>t.z.object({$null:t.z.boolean().optional(),$exists:t.z.boolean().optional()})),d=n(()=>t.z.object({$eq:t.z.any().optional(),$ne:t.z.any().optional(),$gt:t.z.union([t.z.number(),t.z.date(),i]).optional(),$gte:t.z.union([t.z.number(),t.z.date(),i]).optional(),$lt:t.z.union([t.z.number(),t.z.date(),i]).optional(),$lte:t.z.union([t.z.number(),t.z.date(),i]).optional(),$in:t.z.array(t.z.any()).optional(),$nin:t.z.array(t.z.any()).optional(),$between:t.z.tuple([t.z.union([t.z.number(),t.z.date(),i]),t.z.union([t.z.number(),t.z.date(),i])]).optional(),$contains:t.z.string().optional(),$notContains:t.z.string().optional(),$startsWith:t.z.string().optional(),$endsWith:t.z.string().optional(),$null:t.z.boolean().optional(),$exists:t.z.boolean().optional()})),f=t.z.lazy(()=>t.z.record(t.z.string(),t.z.unknown()).and(t.z.object({$and:t.z.array(f).optional(),$or:t.z.array(f).optional(),$not:f.optional()}))),ee=n(()=>t.z.object({where:f.optional()})),p=t.z.lazy(()=>t.z.object({$and:t.z.array(t.z.union([t.z.record(t.z.string(),d),p])).optional(),$or:t.z.array(t.z.union([t.z.record(t.z.string(),d),p])).optional(),$not:t.z.union([t.z.record(t.z.string(),d),p]).optional()})),m=new Set([`=`,`==`,`!=`,`<>`,`>`,`>=`,`<`,`<=`,`in`,`nin`,`not_in`,`contains`,`notcontains`,`not_contains`,`like`,`startswith`,`starts_with`,`endswith`,`ends_with`,`between`,`is_null`,`is_not_null`]);function h(e){if(!Array.isArray(e)||e.length===0)return!1;let t=e[0];if(typeof t==`string`){let n=t.toLowerCase();if(n===`and`||n===`or`)return e.length>=2&&e.slice(1).every(e=>h(e));if(e.length>=2&&typeof e[1]==`string`)return m.has(e[1].toLowerCase())}return e.every(e=>h(e))?e.length>0:!1}var g={"=":`$eq`,"==":`$eq`,"!=":`$ne`,"<>":`$ne`,">":`$gt`,">=":`$gte`,"<":`$lt`,"<=":`$lte`,in:`$in`,nin:`$nin`,not_in:`$nin`,contains:`$contains`,notcontains:`$notContains`,not_contains:`$notContains`,like:`$contains`,startswith:`$startsWith`,starts_with:`$startsWith`,endswith:`$endsWith`,ends_with:`$endsWith`,between:`$between`,is_null:`$null`,is_not_null:`$null`};function _(e){let[t,n,r]=e,i=n.toLowerCase();if(i===`=`||i===`==`)return{[t]:r};if(i===`is_null`)return{[t]:{$null:!0}};if(i===`is_not_null`)return{[t]:{$null:!1}};let a=g[i];return a?{[t]:{[a]:r}}:{[t]:{[`$${i}`]:r}}}function v(e){if(e==null)return;if(!Array.isArray(e))return e;if(e.length===0)return;let t=e[0];if(typeof t==`string`&&(t.toLowerCase()===`and`||t.toLowerCase()===`or`)){let n=`$${t.toLowerCase()}`,r=e.slice(1).map(e=>v(e)).filter(Boolean);return r.length===0?void 0:r.length===1?r[0]:{[n]:r}}if(e.length>=2&&typeof t==`string`)return _(e);if(e.every(e=>Array.isArray(e))){let t=e.map(e=>v(e)).filter(Boolean);return t.length===0?void 0:t.length===1?t[0]:{$and:t}}}var y=[`$eq`,`$ne`,`$gt`,`$gte`,`$lt`,`$lte`,`$in`,`$nin`,`$between`,`$contains`,`$notContains`,`$startsWith`,`$endsWith`,`$null`,`$exists`],te=[`$and`,`$or`,`$not`],ne=[...y,...te],b=n(()=>t.z.object({field:t.z.string(),order:t.z.enum([`asc`,`desc`]).default(`asc`)})),x=t.z.enum([`count`,`sum`,`avg`,`min`,`max`,`count_distinct`,`array_agg`,`string_agg`]),S=t.z.enum([`day`,`week`,`month`,`quarter`,`year`]),C=n(()=>t.z.union([t.z.string(),t.z.object({field:t.z.string().describe(`Field to group by`),dateGranularity:S.optional().describe(`Bucket date values into uniform periods (day/week/month/quarter/year)`),alias:t.z.string().optional().describe(`Alias for the projected group value`)})])),w=n(()=>t.z.object({function:x.describe(`Aggregation function`),field:t.z.string().optional().describe(`Field to aggregate (optional for COUNT(*))`),alias:t.z.string().describe(`Result column alias`),distinct:t.z.boolean().optional().describe(`Apply DISTINCT before aggregation`),filter:f.optional().describe(`Filter/Condition to apply to the aggregation (FILTER WHERE clause)`)})),T=t.z.enum([`inner`,`left`,`right`,`full`]),re=t.z.enum([`auto`,`database`,`hash`,`loop`]),E=t.z.lazy(()=>t.z.object({type:T.describe(`Join type`),strategy:re.optional().describe(`Execution strategy hint`),object:t.z.string().describe(`Object/table to join`),alias:t.z.string().optional().describe(`Table alias`),on:f.describe(`Join condition`),subquery:t.z.lazy(()=>k).optional().describe(`Subquery instead of object`)})),ie=t.z.enum([`row_number`,`rank`,`dense_rank`,`percent_rank`,`lag`,`lead`,`first_value`,`last_value`,`sum`,`avg`,`count`,`min`,`max`]),D=n(()=>t.z.object({partitionBy:t.z.array(t.z.string()).optional().describe(`PARTITION BY fields`),orderBy:t.z.array(b).optional().describe(`ORDER BY specification`),frame:t.z.object({type:t.z.enum([`rows`,`range`]).optional(),start:t.z.string().optional().describe(`Frame start (e.g., "UNBOUNDED PRECEDING", "1 PRECEDING")`),end:t.z.string().optional().describe(`Frame end (e.g., "CURRENT ROW", "1 FOLLOWING")`)}).optional().describe(`Window frame specification`)})),ae=n(()=>t.z.object({function:ie.describe(`Window function name`),field:t.z.string().optional().describe(`Field to operate on (for aggregate window functions)`),alias:t.z.string().describe(`Result column alias`),over:D.describe(`Window specification (OVER clause)`)})),O=t.z.lazy(()=>t.z.union([t.z.string(),t.z.object({field:t.z.string(),fields:t.z.array(O).optional(),alias:t.z.string().optional()})])),oe=n(()=>t.z.object({query:t.z.string().describe(`Search query text`),fields:t.z.array(t.z.string()).optional().describe(`Fields to search in (if not specified, searches all text fields)`),fuzzy:t.z.boolean().optional().default(!1).describe(`Enable fuzzy matching (tolerates typos)`),operator:t.z.enum([`and`,`or`]).optional().default(`or`).describe(`Logical operator between terms`),boost:t.z.record(t.z.string(),t.z.number()).optional().describe(`Field-specific relevance boosting (field name -> boost factor)`),minScore:t.z.number().optional().describe(`Minimum relevance score threshold`),language:t.z.string().optional().describe(`Language for text analysis (e.g., "en", "zh", "es")`),highlight:t.z.boolean().optional().default(!1).describe(`Enable search result highlighting`)})),se=t.z.object({object:t.z.string().describe(`Object name (e.g. account)`),fields:t.z.array(O).optional().describe(`Fields to retrieve`),where:f.optional().describe(`Filtering criteria (WHERE)`),search:oe.optional().describe(`Full-text search configuration ($search parameter)`),orderBy:t.z.array(b).optional().describe(`Sorting instructions (ORDER BY)`),limit:t.z.number().optional().describe(`Max records to return (LIMIT)`),offset:t.z.number().optional().describe(`Records to skip (OFFSET)`),top:t.z.number().optional().describe(`Alias for limit (OData compatibility)`),cursor:t.z.record(t.z.string(),t.z.unknown()).optional().describe(`Cursor for keyset pagination`),joins:t.z.array(E).optional().describe(`Explicit Table Joins`),aggregations:t.z.array(w).optional().describe(`Aggregation functions`),groupBy:t.z.array(C).optional().describe("GROUP BY targets (strings or `{field, dateGranularity?}` objects for date bucketing)"),having:f.optional().describe(`HAVING clause for aggregation filtering`),windowFunctions:t.z.array(ae).optional().describe(`Window functions with OVER clause`),distinct:t.z.boolean().optional().describe(`SELECT DISTINCT flag`)}),k=n(()=>se.extend({expand:t.z.lazy(()=>t.z.record(t.z.string(),k)).optional().describe("Recursive relation loading map. Keys are lookup/master_detail field names; values are nested QueryAST objects that control select (`fields`) and filter (`where`, AND-merged with the batch $in), plus further expansion on the related object. The engine resolves expand via batch $in queries (driver-agnostic) with a default max depth of 3; per-parent `limit`/`offset`/`orderBy` are NOT applied on this path.")})),ce=[`today`,`yesterday`,`tomorrow`,`now`],le=[`current_week_start`,`current_week_end`,`current_month_start`,`current_month_end`,`current_quarter_start`,`current_quarter_end`,`current_year_start`,`current_year_end`,`last_week_start`,`last_week_end`,`last_month_start`,`last_month_end`,`last_quarter_start`,`last_quarter_end`,`last_year_start`,`last_year_end`,`next_week_start`,`next_week_end`,`next_month_start`,`next_month_end`,`next_quarter_start`,`next_quarter_end`,`next_year_start`,`next_year_end`],ue=[`week_start`,`week_end`,`month_start`,`month_end`,`quarter_start`,`quarter_end`,`year_start`,`year_end`],de=[...ce,...le,...ue],fe=/^(\d+)_(minutes?|hours?|days?|weeks?|months?|years?)_(ago|from_now)$/,pe=[`minute`,`hour`,`day`,`week`,`month`,`year`];function me(e){return de.includes(e)||fe.test(e)}function he(e){let t=e.match(fe);if(!t)return null;let n=t[2].replace(/s$/,``);return{n:parseInt(t[1],10),unit:n,direction:t[3]}}var ge=t.z.string().refine(me,{message:`Unknown date macro. Must be a fixed token (see DATE_MACRO_TOKENS) or match {N_<unit>_(ago|from_now)} where unit is one of: `+pe.join(`, `)}),_e=/^\$?\{([a-zA-Z0-9_]+)\}$/,ve=t.z.string().refine(e=>{let t=e.match(_e);return!!t&&me(t[1])},{message:`Not a recognised {date-macro} placeholder`}),ye={today:`Start of today (YYYY-MM-DD).`,yesterday:`Start of yesterday.`,tomorrow:`Start of tomorrow.`,now:`Current timestamp (full ISO).`,current_week_start:`Monday 00:00 of this week.`,current_week_end:`Sunday of this week.`,current_month_start:`1st of this month.`,current_month_end:`Last day of this month.`,current_quarter_start:`1st day of this quarter.`,current_quarter_end:`Last day of this quarter.`,current_year_start:`Jan 1 of this year.`,current_year_end:`Dec 31 of this year.`,last_week_start:`Monday of last week.`,last_week_end:`Sunday of last week.`,last_month_start:`1st of last month.`,last_month_end:`Last day of last month.`,last_quarter_start:`1st day of last quarter.`,last_quarter_end:`Last day of last quarter.`,last_year_start:`Jan 1 of last year.`,last_year_end:`Dec 31 of last year.`,next_week_start:`Monday of next week.`,next_week_end:`Sunday of next week.`,next_month_start:`1st of next month.`,next_month_end:`Last day of next month.`,next_quarter_start:`1st day of next quarter.`,next_quarter_end:`Last day of next quarter.`,next_year_start:`Jan 1 of next year.`,next_year_end:`Dec 31 of next year.`,week_start:`Alias for current_week_start.`,week_end:`Alias for current_week_end.`,month_start:`Alias for current_month_start.`,month_end:`Alias for current_month_end.`,quarter_start:`Alias for current_quarter_start.`,quarter_end:`Alias for current_quarter_end.`,year_start:`Alias for current_year_start.`,year_end:`Alias for current_year_end.`},be=n(()=>t.z.string().min(2,{message:`System identifier must be at least 2 characters`}).regex(/^[a-z][a-z0-9_.]*$/,{message:`System identifier must be lowercase, starting with a letter, and may contain letters, numbers, underscores, or dots (e.g., "user_profile" or "order.created")`}).describe(`System identifier (lowercase with underscores or dots)`)),A=n(()=>t.z.string().min(2,{message:`Identifier must be at least 2 characters`}).regex(/^[a-z][a-z0-9_]*$/,{message:`Identifier must be lowercase snake_case, starting with a letter, and may contain only letters, numbers, and underscores (e.g., "user_profile")`}).describe(`Snake case identifier (lowercase with underscores only)`));n(()=>t.z.string().min(3,{message:`Event name must be at least 3 characters`}).regex(/^[a-z][a-z0-9_.]*$/,{message:`Event name must be lowercase with dots for namespacing (e.g., "user.created", "order.paid")`}).describe(`Event name (lowercase with dot notation for namespacing)`));var xe=t.z.enum([`cel`,`js`,`cron`,`template`]),Se=t.z.object({rationale:t.z.string().optional(),generatedBy:t.z.string().optional()}),Ce=t.z.object({dialect:xe,source:t.z.string().min(1).optional(),ast:t.z.unknown().optional(),meta:Se.optional()}).refine(e=>e.source!==void 0||e.ast!==void 0,{message:"Expression requires at least one of `source` or `ast`"}),j=t.z.union([t.z.string().min(1).transform(e=>({dialect:`cel`,source:e})),Ce]);t.z.union([t.z.string().min(1).transform(e=>({dialect:`cron`,source:e})),Ce]);var we=t.z.union([t.z.string().min(1).transform(e=>({dialect:`template`,source:e})),Ce]),M=t.z.enum(`text.textarea.email.url.phone.password.secret.markdown.html.richtext.number.currency.percent.date.datetime.time.boolean.toggle.select.multiselect.radio.checkboxes.lookup.master_detail.tree.user.image.file.avatar.video.audio.formula.summary.autonumber.composite.repeater.record.location.address.code.json.color.rating.slider.signature.qrcode.progress.tags.vector`.split(`.`)),N=n(()=>t.z.object({label:t.z.string().describe(`Display label (human-readable, any case allowed)`),value:be.describe(`Stored value (lowercase machine identifier)`),color:t.z.string().optional().describe(`Color code for badges/charts`),default:t.z.boolean().optional().describe(`Is default option`),visibleWhen:j.optional().describe("Per-option visibility predicate (CEL) — option is offered only when TRUE (else omitted). Same env as field visibleWhen (record + current_user). e.g. P`record.country == 'cn'` or P`'admin' in current_user.roles`")})),Te=n(()=>t.z.object({latitude:t.z.number().min(-90).max(90).describe(`Latitude coordinate`),longitude:t.z.number().min(-180).max(180).describe(`Longitude coordinate`),altitude:t.z.number().optional().describe(`Altitude in meters`),accuracy:t.z.number().optional().describe(`Accuracy in meters`)})),Ee=n(()=>t.z.object({precision:t.z.number().int().min(0).max(10).default(2).describe(`Decimal precision (default: 2)`),currencyMode:t.z.enum([`dynamic`,`fixed`]).default(`dynamic`).describe(`Currency mode: dynamic (user selectable) or fixed (single currency)`),defaultCurrency:t.z.string().length(3).default(`CNY`).describe(`Default or fixed currency code (ISO 4217, e.g., USD, CNY, EUR)`)})),De=n(()=>t.z.object({value:t.z.number().describe(`Monetary amount`),currency:t.z.string().length(3).describe(`Currency code (ISO 4217)`)})),Oe=n(()=>t.z.object({street:t.z.string().optional().describe(`Street address`),city:t.z.string().optional().describe(`City name`),state:t.z.string().optional().describe(`State/Province`),postalCode:t.z.string().optional().describe(`Postal/ZIP code`),country:t.z.string().optional().describe(`Country name or code`),countryCode:t.z.string().optional().describe(`ISO country code (e.g., US, GB)`),formatted:t.z.string().optional().describe(`Formatted address string`)})),ke=n(()=>t.z.object({dimensions:t.z.number().int().min(1).max(1e4).describe(`Vector dimensionality (e.g., 1536 for OpenAI embeddings)`),distanceMetric:t.z.enum([`cosine`,`euclidean`,`dotProduct`,`manhattan`]).default(`cosine`).describe(`Distance/similarity metric for vector search`),normalized:t.z.boolean().default(!1).describe(`Whether vectors are normalized (unit length)`),indexed:t.z.boolean().default(!0).describe(`Whether to create a vector index for fast similarity search`),indexType:t.z.enum([`hnsw`,`ivfflat`,`flat`]).optional().describe(`Vector index algorithm (HNSW for high accuracy, IVFFlat for large datasets)`)})),Ae=n(()=>t.z.object({minSize:t.z.number().min(0).optional().describe(`Minimum file size in bytes`),maxSize:t.z.number().min(1).optional().describe(`Maximum file size in bytes (e.g., 10485760 = 10MB)`),allowedTypes:t.z.array(t.z.string()).optional().describe(`Allowed file extensions (e.g., [".pdf", ".docx", ".jpg"])`),blockedTypes:t.z.array(t.z.string()).optional().describe(`Blocked file extensions (e.g., [".exe", ".bat", ".sh"])`),allowedMimeTypes:t.z.array(t.z.string()).optional().describe(`Allowed MIME types (e.g., ["image/jpeg", "application/pdf"])`),blockedMimeTypes:t.z.array(t.z.string()).optional().describe(`Blocked MIME types`),virusScan:t.z.boolean().default(!1).describe(`Enable virus scanning for uploaded files`),virusScanProvider:t.z.enum([`clamav`,`virustotal`,`metadefender`,`custom`]).optional().describe(`Virus scanning service provider`),virusScanOnUpload:t.z.boolean().default(!0).describe(`Scan files immediately on upload`),quarantineOnThreat:t.z.boolean().default(!0).describe(`Quarantine files if threat detected`),storageProvider:t.z.string().optional().describe(`Object storage provider name (references ObjectStorageConfig)`),storageBucket:t.z.string().optional().describe(`Target bucket name`),storagePrefix:t.z.string().optional().describe(`Storage path prefix (e.g., "uploads/documents/")`),imageValidation:t.z.object({minWidth:t.z.number().min(1).optional().describe(`Minimum image width in pixels`),maxWidth:t.z.number().min(1).optional().describe(`Maximum image width in pixels`),minHeight:t.z.number().min(1).optional().describe(`Minimum image height in pixels`),maxHeight:t.z.number().min(1).optional().describe(`Maximum image height in pixels`),aspectRatio:t.z.string().optional().describe(`Required aspect ratio (e.g., "16:9", "1:1")`),generateThumbnails:t.z.boolean().default(!1).describe(`Auto-generate thumbnails`),thumbnailSizes:t.z.array(t.z.object({name:t.z.string().describe(`Thumbnail variant name (e.g., "small", "medium", "large")`),width:t.z.number().min(1).describe(`Thumbnail width in pixels`),height:t.z.number().min(1).describe(`Thumbnail height in pixels`),crop:t.z.boolean().default(!1).describe(`Crop to exact dimensions`)})).optional().describe(`Thumbnail size configurations`),preserveMetadata:t.z.boolean().default(!1).describe(`Preserve EXIF metadata`),autoRotate:t.z.boolean().default(!0).describe(`Auto-rotate based on EXIF orientation`)}).optional().describe(`Image-specific validation rules`),allowMultiple:t.z.boolean().default(!1).describe(`Allow multiple file uploads (overrides field.multiple)`),allowReplace:t.z.boolean().default(!0).describe(`Allow replacing existing files`),allowDelete:t.z.boolean().default(!0).describe(`Allow deleting uploaded files`),requireUpload:t.z.boolean().default(!1).describe(`Require at least one file when field is required`),extractMetadata:t.z.boolean().default(!0).describe(`Extract file metadata (name, size, type, etc.)`),extractText:t.z.boolean().default(!1).describe(`Extract text content from documents (OCR/parsing)`),versioningEnabled:t.z.boolean().default(!1).describe(`Keep previous versions of replaced files`),maxVersions:t.z.number().min(1).optional().describe(`Maximum number of versions to retain`),publicRead:t.z.boolean().default(!1).describe(`Allow public read access to uploaded files`),presignedUrlExpiry:t.z.number().min(60).max(604800).default(3600).describe(`Presigned URL expiration in seconds (default: 1 hour)`)}).refine(e=>!(e.minSize!==void 0&&e.maxSize!==void 0&&e.minSize>e.maxSize),{message:`minSize must be less than or equal to maxSize`}).refine(e=>!(e.virusScanProvider!==void 0&&e.virusScan!==!0),{message:`virusScanProvider requires virusScan to be enabled`})),je=n(()=>t.z.object({uniqueness:t.z.boolean().default(!1).describe(`Enforce unique values across all records`),completeness:t.z.number().min(0).max(1).default(0).describe(`Minimum ratio of non-null values (0-1, default: 0 = no requirement)`),accuracy:t.z.object({source:t.z.string().describe(`Reference data source for validation (e.g., "api.verify.com", "master_data")`),threshold:t.z.number().min(0).max(1).describe(`Minimum accuracy threshold (0-1, e.g., 0.95 = 95% match required)`)}).optional().describe(`Accuracy validation configuration`)})),Me=n(()=>t.z.object({enabled:t.z.boolean().describe(`Enable caching for computed field results`),ttl:t.z.number().min(0).describe(`Cache TTL in seconds (0 = no expiration)`),invalidateOn:t.z.array(t.z.string()).describe(`Field paths that invalidate cache (e.g., ["inventory.quantity", "pricing.base_price"])`)})),P=n(()=>t.z.object({name:t.z.string().regex(/^[a-z_][a-z0-9_]*$/).describe(`Machine name (snake_case)`).optional(),label:t.z.string().optional().describe(`Human readable label`),type:M.describe(`Field Data Type`),description:t.z.string().optional().describe(`Tooltip/Help text`),format:t.z.string().optional().describe(`Format string (e.g. email, phone)`),columnName:t.z.string().optional().describe(`Physical column name in the target datasource. Defaults to the field key when not set.`),required:t.z.boolean().default(!1).describe(`Is required`),searchable:t.z.boolean().default(!1).describe(`Is searchable`),multiple:t.z.boolean().default(!1).describe(`Allow multiple values (Stores as Array/JSON). Applicable for select, lookup, file, image.`),unique:t.z.boolean().default(!1).describe(`Is unique constraint`),defaultValue:t.z.unknown().optional().describe(`Default value`),maxLength:t.z.number().optional().describe(`Max character length`),minLength:t.z.number().optional().describe(`Min character length`),precision:t.z.number().optional().describe(`Total digits`),scale:t.z.number().optional().describe(`Decimal places`),min:t.z.number().optional().describe(`Minimum value`),max:t.z.number().optional().describe(`Maximum value`),options:t.z.array(N).optional().describe(`Static options for select/multiselect`),reference:t.z.string().optional().describe(`Target object name (snake_case) for lookup/master_detail fields. Required for relationship types. Used by $expand to resolve foreign key IDs into full objects.`),referenceFilters:t.z.array(t.z.string()).optional().describe(`Filters applied to lookup dialogs (e.g. "active = true")`),deleteBehavior:t.z.enum([`set_null`,`cascade`,`restrict`]).optional().default(`set_null`).describe(`What happens if referenced record is deleted`),inlineEdit:t.z.union([t.z.boolean(),t.z.enum([`grid`,`form`])]).optional().describe(`Edit these child records inline within the parent's form (atomic master-detail). true = auto-pick grid/form by child shape; 'grid' = editable line-item grid; 'form' = list + per-row full form.`),inlineTitle:t.z.string().optional().describe(`Title for the inline master-detail grid`),inlineColumns:t.z.array(t.z.any()).optional().describe(`Explicit columns for the inline grid (derived from the child object when omitted)`),inlineAmountField:t.z.string().optional().describe(`Numeric child field summed for the inline grid total`),relatedList:t.z.union([t.z.boolean(),t.z.literal(`primary`)]).optional().describe(`Show this child collection as a related list on the parent's detail page (read-side mirror of inlineEdit). false = suppress; true/absent = shown (stacked under the shared "Related" tab); 'primary' = core relationship, promoted to its own tab. Prominence intent, not a layout switch (ADR-0085).`),relatedListTitle:t.z.string().optional().describe(`Title for the detail-page related list`),relatedListColumns:t.z.array(t.z.any()).optional().describe(`Explicit columns for the detail-page related list (derived from the child object when omitted)`),displayField:t.z.string().optional().describe(`Field shown as each candidate's label in the picker/popover (defaults to the referenced object's name/title).`),descriptionField:t.z.string().optional().describe(`Secondary field shown under the label in the quick-select popover.`),lookupColumns:t.z.array(t.z.union([t.z.string(),t.z.object({field:t.z.string(),label:t.z.string().optional(),width:t.z.string().optional(),type:t.z.string().optional()})])).optional().describe(`Explicit columns for the record-picker table; auto-derived from the referenced object when omitted.`),lookupPageSize:t.z.number().int().positive().optional().describe(`Rows per page in the record-picker dialog (default 10).`),lookupFilters:t.z.array(t.z.object({field:t.z.string(),operator:t.z.enum([`eq`,`ne`,`gt`,`lt`,`gte`,`lte`,`contains`,`in`,`notIn`]),value:t.z.any()})).optional().describe(`Base filters restricting which records are selectable (e.g. only active). Structured, picker-honoured form of referenceFilters.`),dependsOn:t.z.array(t.z.union([t.z.string(),t.z.object({field:t.z.string(),param:t.z.string().optional()})])).optional().describe("Declares that this field's available values depend on the value of other field(s) on the same record — the form gates the field until they are set and re-evaluates as they change. For `lookup`/`master_detail` it scopes the candidate query (string = same local/remote key; {field,param} when the remote filter key differs — the {field,param} form is lookup-only). For `select`/`multiselect`/`radio` the actual per-option rule lives in each option's `visibleWhen`; list the referenced fields here (string form) so the option list gates and refreshes with the parent."),allowCreate:t.z.boolean().optional().describe(`Allow inline quick-create from the record picker: when no match exists the user can create a record from the typed text (optimistic dataSource.create with the display field). Best for simple objects whose only required field is the display field.`),expression:j.optional().describe("Formula expression (CEL). e.g. F`record.amount * 0.1`"),returnType:t.z.enum([`number`,`text`,`boolean`,`date`]).optional().describe(`Inferred value type of a formula field (number/text/boolean/date)`),summaryOperations:t.z.object({object:t.z.string().describe(`Source child object name for roll-up`),field:t.z.string().describe(`Field on child object to aggregate (ignored for count)`),function:t.z.enum([`count`,`sum`,`min`,`max`,`avg`]).describe(`Aggregation function to apply`),relationshipField:t.z.string().optional().describe(`FK field on the child pointing back to this parent. Auto-detected from the child's lookup/master_detail field referencing this object when omitted; set explicitly only when the child has more than one such reference.`)}).optional().describe(`Roll-up summary definition. The engine recomputes the value when child records are inserted/updated/deleted.`),language:t.z.string().optional().describe(`Programming language for syntax highlighting (e.g., javascript, python, sql)`),step:t.z.number().optional().describe(`Step increment for slider (default: 1)`),currencyConfig:Ee.optional().describe(`Configuration for currency field type`),dimensions:t.z.number().int().min(1).max(1e4).optional().describe(`Vector dimensionality (e.g., 1536 for OpenAI embeddings)`),vectorConfig:ke.optional().describe(`Configuration for vector field type (AI/ML embeddings)`),fileAttachmentConfig:Ae.optional().describe(`Configuration for file and attachment field types`),trackHistory:t.z.boolean().optional().describe(`Render this field's value changes as human-readable entries on the record activity timeline (ADR-0052 §5b). Opt-in per field.`),dependencies:t.z.array(t.z.string()).optional().describe(`Array of field names that this field depends on (for formulas, visibility rules, etc.)`),group:t.z.string().optional().describe(`Field group name for organizing fields in forms and layouts (e.g., "contact_info", "billing", "system")`),visibleWhen:j.optional().describe("Predicate (CEL) — field is shown only when TRUE (else hidden). e.g. P`record.type == 'invoice'`"),readonlyWhen:j.optional().describe("Predicate (CEL) — field is read-only when TRUE. e.g. P`record.status == 'paid'`"),requiredWhen:j.optional().describe("Predicate (CEL) — field is required when TRUE. Canonical name for `conditionalRequired`."),conditionalRequired:j.optional().describe("Predicate (CEL) — field is required when TRUE. Alias of `requiredWhen`."),hidden:t.z.boolean().default(!1).describe(`Hidden from default UI`),readonly:t.z.boolean().default(!1).describe(`Read-only in UI`),requiredPermissions:t.z.array(t.z.string()).optional().describe(`[ADR-0066 D3] Capabilities required to read/edit this field (mask on read, deny on write; AND-gate).`),system:t.z.boolean().optional().describe(`Auto-injected system/audit field (e.g. created_at, updated_by, organization_id). Tools that surface system fields separately from author-declared business fields should branch on this flag.`),sortable:t.z.boolean().optional().default(!0).describe(`Whether field is sortable in list views`),inlineHelpText:t.z.string().optional().describe(`Help text displayed below the field in forms`),autonumberFormat:t.z.string().optional().describe(`Auto-number format: literal text + {0000} counter, {YYYY}/{MM}/{DD}/{YYYYMMDD} date tokens (business tz), and {field_name} interpolation. Counter resets per rendered prefix (e.g. AD{YYYYMMDD}{0000} resets daily).`),index:t.z.boolean().default(!1).describe(`Create standard database index`),externalId:t.z.boolean().default(!1).describe(`Is external ID for upsert operations`)})),Ne={text:(e={})=>({type:`text`,...e}),textarea:(e={})=>({type:`textarea`,...e}),number:(e={})=>({type:`number`,...e}),boolean:(e={})=>({type:`boolean`,...e}),date:(e={})=>({type:`date`,...e}),datetime:(e={})=>({type:`datetime`,...e}),currency:(e={})=>({type:`currency`,...e}),percent:(e={})=>({type:`percent`,...e}),url:(e={})=>({type:`url`,...e}),email:(e={})=>({type:`email`,...e}),phone:(e={})=>({type:`phone`,...e}),image:(e={})=>({type:`image`,...e}),file:(e={})=>({type:`file`,...e}),avatar:(e={})=>({type:`avatar`,...e}),formula:(e={})=>({type:`formula`,...e}),summary:(e={})=>({type:`summary`,...e}),autonumber:(e={})=>({type:`autonumber`,...e}),markdown:(e={})=>({type:`markdown`,...e}),html:(e={})=>({type:`html`,...e}),password:(e={})=>({type:`password`,...e}),secret:(e={})=>({type:`secret`,...e}),select:(e,t)=>{let n=e=>e.toLowerCase().replace(/\s+/g,`_`).replace(/[^a-z0-9_]/g,``),r,i;if(Array.isArray(e))r=e.map(e=>typeof e==`string`?{label:e,value:n(e)}:{...e,value:e.value.toLowerCase()}),i=t||{};else{r=(e.options||[]).map(e=>typeof e==`string`?{label:e,value:n(e)}:{...e,value:e.value.toLowerCase()});let{options:t,...a}=e;i=a}return{type:`select`,options:r,...i}},lookup:(e,t={})=>({type:`lookup`,reference:e,...t}),masterDetail:(e,t={})=>({type:`master_detail`,reference:e,...t}),user:(e={})=>({type:`user`,reference:`sys_user`,...e}),location:(e={})=>({type:`location`,...e}),address:(e={})=>({type:`address`,...e}),richtext:(e={})=>({type:`richtext`,...e}),code:(e,t={})=>({type:`code`,language:e,...t}),color:(e={})=>({type:`color`,...e}),rating:(e=5,t={})=>({type:`rating`,max:e,...t}),signature:(e={})=>({type:`signature`,...e}),slider:(e={})=>({type:`slider`,...e}),qrcode:(e={})=>({type:`qrcode`,...e}),json:(e={})=>({type:`json`,...e}),vector:(e,t={})=>({type:`vector`,dimensions:e,...t})},F=t.z.object({name:t.z.string().regex(/^[a-z_][a-z0-9_]*$/).describe(`Unique rule name (snake_case)`),label:t.z.string().optional().describe(`Human-readable label for the rule listing`),description:t.z.string().optional().describe(`Administrative notes explaining the business reason`),active:t.z.boolean().default(!0),events:t.z.array(t.z.enum([`insert`,`update`,`delete`])).default([`insert`,`update`]).describe(`Validation contexts`),priority:t.z.number().int().min(0).max(9999).default(100).describe(`Execution priority (lower runs first, default: 100)`),tags:t.z.array(t.z.string()).optional().describe(`Categorization tags (e.g., "compliance", "billing")`),severity:t.z.enum([`error`,`warning`,`info`]).default(`error`),message:t.z.string().describe(`Error message to display to the user`)}),Pe=n(()=>F.extend({type:t.z.literal(`script`),condition:j.describe("Predicate (CEL). If TRUE, validation fails. e.g. P`record.amount < 0`")})),Fe=n(()=>F.extend({type:t.z.literal(`state_machine`),field:t.z.string().describe(`State field (e.g. status)`),transitions:t.z.record(t.z.string(),t.z.array(t.z.string())).describe(`Map of { OldState: [AllowedNewStates] }`)})),Ie=n(()=>F.extend({type:t.z.literal(`format`),field:t.z.string(),regex:t.z.string().optional(),format:t.z.enum([`email`,`url`,`phone`,`json`]).optional()})),Le=n(()=>F.extend({type:t.z.literal(`cross_field`),condition:j.describe("Predicate (CEL) comparing fields. e.g. P`record.end_date > record.start_date`"),fields:t.z.array(t.z.string()).describe(`Fields involved in the validation`)})),Re=n(()=>F.extend({type:t.z.literal(`json_schema`),field:t.z.string().describe(`JSON field to validate`),schema:t.z.record(t.z.string(),t.z.unknown()).describe(`JSON Schema object definition`)})),I=t.z.lazy(()=>t.z.discriminatedUnion(`type`,[Pe,Fe,Ie,Le,Re,ze])),ze=n(()=>F.extend({type:t.z.literal(`conditional`),when:j.describe("Predicate (CEL). e.g. P`record.type == 'enterprise'`"),then:I.describe(`Validation rule to apply when condition is true`),otherwise:I.optional().describe(`Validation rule to apply when condition is false`)}));n(()=>t.z.object({key:t.z.string().describe(`Translation key (e.g., "views.task_list.label")`),defaultValue:t.z.string().optional().describe(`Fallback value when translation key is not found`),params:t.z.record(t.z.string(),t.z.union([t.z.string(),t.z.number(),t.z.boolean()])).optional().describe(`Interpolation parameters (e.g., { count: 5 })`)}));var L=n(()=>t.z.string().describe(`Display label (plain string; i18n keys are auto-generated by the framework)`)),Be=n(()=>t.z.object({ariaLabel:L.optional().describe(`Accessible label for screen readers (WAI-ARIA aria-label)`),ariaDescribedBy:t.z.string().optional().describe(`ID of element providing additional description (WAI-ARIA aria-describedby)`),role:t.z.string().optional().describe(`WAI-ARIA role attribute (e.g., "dialog", "navigation", "alert")`)}).describe(`ARIA accessibility attributes`));n(()=>t.z.object({key:t.z.string().describe(`Translation key`),zero:t.z.string().optional().describe(`Zero form (e.g., "No items")`),one:t.z.string().optional().describe(`Singular form (e.g., "{count} item")`),two:t.z.string().optional().describe(`Dual form (e.g., "{count} items" for exactly 2)`),few:t.z.string().optional().describe(`Few form (e.g., for 2-4 in some languages)`),many:t.z.string().optional().describe(`Many form (e.g., for 5+ in some languages)`),other:t.z.string().describe(`Default plural form (e.g., "{count} items")`)}).describe(`ICU plural rules for a translation key`));var Ve=n(()=>t.z.object({style:t.z.enum([`decimal`,`currency`,`percent`,`unit`]).default(`decimal`).describe(`Number formatting style`),currency:t.z.string().optional().describe(`ISO 4217 currency code (e.g., "USD", "EUR")`),unit:t.z.string().optional().describe(`Unit for unit formatting (e.g., "kilometer", "liter")`),minimumFractionDigits:t.z.number().optional().describe(`Minimum number of fraction digits`),maximumFractionDigits:t.z.number().optional().describe(`Maximum number of fraction digits`),useGrouping:t.z.boolean().optional().describe(`Whether to use grouping separators (e.g., 1,000)`)}).describe(`Number formatting rules`)),He=n(()=>t.z.object({dateStyle:t.z.enum([`full`,`long`,`medium`,`short`]).optional().describe(`Date display style`),timeStyle:t.z.enum([`full`,`long`,`medium`,`short`]).optional().describe(`Time display style`),timeZone:t.z.string().optional().describe(`IANA time zone (e.g., "America/New_York")`),hour12:t.z.boolean().optional().describe(`Use 12-hour format`)}).describe(`Date/time formatting rules`));n(()=>t.z.object({code:t.z.string().describe(`BCP 47 language code (e.g., "en-US", "zh-CN")`),fallbackChain:t.z.array(t.z.string()).optional().describe(`Fallback language codes in priority order (e.g., ["zh-TW", "en"])`),direction:t.z.enum([`ltr`,`rtl`]).default(`ltr`).describe(`Text direction: left-to-right or right-to-left`),numberFormat:Ve.optional().describe(`Default number formatting rules`),dateFormat:He.optional().describe(`Default date/time formatting rules`)}).describe(`Locale configuration`));var Ue=t.z.enum([`api.read`,`api.write`,`api.transaction`,`crypto.uuid`,`crypto.hash`,`log`]),We=t.z.object({language:t.z.literal(`expression`),source:t.z.string().min(1).describe(`Formula expression source`)}).describe(`L1 expression body — pure formula, no IO`),Ge=t.z.object({language:t.z.literal(`js`),source:t.z.string().min(1).describe(`Function body source`),capabilities:t.z.array(Ue).default([]).describe(`Granted capability tokens`),timeoutMs:t.z.number().int().positive().max(3e4).optional().describe(`Per-invocation timeout (ms)`),memoryMb:t.z.number().int().positive().max(256).optional().describe(`Per-invocation memory cap (MB)`)}).describe(`L2 sandboxed JS body — runs inside an isolated VM with declared capabilities`),R=t.z.discriminatedUnion(`language`,[We,Ge]).describe(`Hook/Action body — expression (L1) or sandboxed JS (L2)`),Ke=n(()=>t.z.object({name:t.z.string().optional(),field:A.optional(),objectOverride:A.optional(),label:L.optional(),type:M.optional(),required:t.z.boolean().optional().default(!1),options:t.z.array(t.z.object({label:L,value:t.z.string()})).optional(),placeholder:t.z.string().optional(),helpText:t.z.string().optional(),defaultValue:t.z.unknown().optional(),defaultFromRow:t.z.boolean().optional()}).refine(e=>!!e.name||!!e.field,{message:`ActionParam requires either "name" or "field"`})),qe=t.z.enum([`script`,`url`,`modal`,`flow`,`api`,`form`]),Je=new Set(qe.options.filter(e=>e!==`script`)),Ye=t.z.enum([`list_toolbar`,`list_item`,`record_header`,`record_more`,`record_related`,`record_section`,`global_nav`]),Xe=t.z.enum([`data`,`action`,`flow`,`integration`,`vector_search`,`analytics`,`utility`]),Ze=t.z.object({exposed:t.z.boolean().default(!1).describe("Expose this action to AI agents. Requires `description` when true."),description:t.z.string().min(40).optional().describe(`LLM-facing description (≥40 chars). Required when exposed.`),category:Xe.optional().describe(`Tool category override (defaults to "action").`),paramHints:t.z.record(t.z.string(),t.z.object({description:t.z.string().optional(),enum:t.z.array(t.z.union([t.z.string(),t.z.number()])).optional(),examples:t.z.array(t.z.unknown()).optional()})).optional().describe(`Per-parameter AI hints keyed by param name.`),outputSchema:t.z.record(t.z.string(),t.z.unknown()).optional().describe(`JSON Schema for the action return value.`),requiresConfirmation:t.z.boolean().optional().describe(`Override HITL confirmation for AI invocations.`)}),Qe=n(()=>t.z.object({name:A.describe(`Machine name (lowercase snake_case)`),label:L.describe(`Display label`),objectName:t.z.string().regex(/^[a-z_][a-z0-9_]*$/).optional().describe(`Target object this action belongs to. When set, the action is auto-merged into the object's actions array by defineStack().`),icon:t.z.string().optional().describe(`Icon name`),locations:t.z.array(Ye).optional().describe(`Locations where this action is visible`),component:t.z.enum([`action:button`,`action:icon`,`action:menu`,`action:group`]).optional().describe(`Visual component override`),type:qe.default(`script`).describe(`Action functionality type`),target:t.z.string().optional().describe("URL, Script Name, Flow ID, or API Endpoint. Supports ${param.X} and ${ctx.X} interpolation."),openIn:t.z.enum([`self`,`new-tab`]).optional().describe("For type:'url' — where to open `target`. 'new-tab' opens a new browser tab; 'self' navigates in place. When omitted, external/absolute URLs open in a new tab and relative URLs navigate in place. Static execution option — keep it OUT of `params` (which is user-input-collection only)."),body:R.optional().describe("Action body — expression (L1) or sandboxed JS (L2). Only used when type is `script`."),execute:t.z.string().optional().describe(`@deprecated — Use target instead. Auto-migrated to target during parsing.`),params:t.z.array(Ke).optional().describe(`Input parameters required from user`),variant:t.z.enum([`primary`,`secondary`,`danger`,`ghost`,`link`]).optional().describe(`Button visual variant for styling (primary = highlighted, danger = destructive, ghost = transparent)`),confirmText:L.optional().describe(`Confirmation message before execution`),successMessage:L.optional().describe(`Success message to show after execution`),errorMessage:L.optional().describe(`Error message to show when the action fails (overrides the raw error).`),refreshAfter:t.z.boolean().default(!1).describe(`Refresh view after execution`),undoable:t.z.boolean().optional().describe(`Offer an Undo affordance after this single-record update action succeeds.`),resultDialog:t.z.object({title:L.optional(),description:L.optional(),acknowledge:L.optional().describe(`Acknowledge button label, e.g. "I have saved this"`),format:t.z.enum([`qrcode`,`code-list`,`secret`,`text`,`json`]).optional().describe(`Default format for fields without their own format. Defaults to json when omitted.`),fields:t.z.array(t.z.object({path:t.z.string().describe(`Dot path into result.data (e.g. "totpURI", "client.client_secret").`),label:L.optional(),format:t.z.enum([`qrcode`,`code-list`,`secret`,`text`,`json`]).optional().describe(`Per-field format override.`)})).optional().describe(`Which fields from result.data to render. Omit to dump full JSON.`)}).optional().describe(`Render API response in a one-shot reveal dialog (suppresses successMessage when set).`),visible:j.optional().describe(`Visibility predicate (CEL).`),disabled:t.z.union([t.z.boolean(),j]).optional().describe(`Boolean or predicate (CEL) — action is disabled when TRUE.`),requiredPermissions:t.z.array(t.z.string()).optional().describe(`[ADR-0066 D4] Capabilities required to invoke this action (server-enforced 403 + UI hide/disable).`),shortcut:t.z.string().optional().describe(`Keyboard shortcut to trigger this action (e.g., "Ctrl+S")`),bulkEnabled:t.z.boolean().optional().describe(`Whether this action can be applied to multiple selected records`),ai:Ze.optional().describe(`AI exposure (opt-in). Set ai.exposed=true + ai.description to make this callable by agents.`),recordIdParam:t.z.string().optional().describe(`Body key to inject the row id into when running from a list_item context.`),recordIdField:t.z.string().optional().describe(`Row field whose value seeds recordIdParam. Defaults to "id".`),bodyShape:t.z.union([t.z.literal(`flat`),t.z.object({wrap:t.z.string()})]).optional().describe(`Body wrapping: flat (default) or { wrap: key } to nest user-collected params under a key.`),method:t.z.enum([`POST`,`PATCH`,`PUT`,`DELETE`]).optional().describe(`HTTP method for type:"api" actions. Defaults to POST.`),bodyExtra:t.z.record(t.z.string(),t.z.unknown()).optional().describe(`Constant body fields merged into the API request (applied last; overrides user params).`),mode:t.z.enum([`create`,`edit`,`delete`,`custom`]).optional().describe(`Semantic mode of the action.`),opensInNewTab:t.z.boolean().optional().describe(`Open the action result in a new tab. The renderer pre-opens the tab synchronously on click (popup-blocker-safe) and navigates it to the handler's redirectUrl.`),newTabUrl:t.z.string().optional().describe(`Direct new-tab URL template ({recordId} placeholder). When set with opensInNewTab, the renderer navigates the pre-opened tab here immediately — no action POST. The endpoint must enforce auth itself.`),timeout:t.z.number().optional().describe(`Maximum execution time in milliseconds for the action`),aria:Be.optional().describe(`ARIA accessibility attributes`)}).transform(e=>e.execute&&!e.target?{...e,target:e.execute}:e).refine(e=>!(Je.has(e.type)&&!e.target),{message:`Action 'target' is required when type is 'url', 'flow', 'modal', 'api', or 'form'.`,path:[`target`]}).refine(e=>!(e.type===`script`&&!e.body&&!e.target),{message:"A 'script' action requires either an inline `body` (sandboxed L1/L2 handler) or a `target` (a registered bundle function name).",path:[`body`]}).refine(e=>!(e.ai?.exposed===!0&&!e.ai.description),{message:`ai.description is required (≥40 chars) when ai.exposed is true.`,path:[`ai`,`description`]}).refine(e=>{let t=e.ai?.paramHints;if(!t)return!0;let n=new Set([`recordId`]);for(let t of e.params??[]){let e=t.name??t.field;e&&n.add(e)}return Object.keys(t).every(e=>n.has(e))},{message:`ai.paramHints keys must match a declared param name (or "recordId").`,path:[`ai`,`paramHints`]})),$e=t.z.enum([`none`,`no-overlay`,`no-delete`,`full`]),et=t.z.enum([`artifact`,`package`,`env-forced`]),tt=t.z.enum([`package`,`org`,`env-forced`]),z={_lock:$e.optional().describe(`Item-level lock — controls overlay & delete (ADR-0010).`),_lockReason:t.z.string().max(500).optional().describe(`Human-readable reason shown when a write is refused by _lock.`),_lockSource:et.optional().describe(`Layer that set _lock (artifact | package | env-forced).`),_provenance:tt.optional().describe(`Origin of the item (package | org | env-forced).`),_packageId:t.z.string().optional().describe(`Owning package machine id.`),_packageVersion:t.z.string().optional().describe(`Owning package version.`),_lockDocsUrl:t.z.string().optional().describe(`Optional documentation link surfaced next to _lockReason.`)},B=t.z.object({lock:$e.describe(`Lock policy — none | no-overlay | no-delete | full.`),reason:t.z.string().min(1).max(500).describe(`User-visible reason shown when the lock blocks an action.`),docsUrl:t.z.string().url().optional().describe(`Optional URL the Studio banner links to for more context.`)}).strict(),nt=n(()=>t.z.object({enabled:t.z.boolean().default(!1).describe(`Enable public sharing`),publicLink:t.z.string().optional().describe(`Generated public share URL`),password:t.z.string().optional().describe(`Password required to access shared link`),allowedDomains:t.z.array(t.z.string()).optional().describe(`Restrict access to specific email domains (e.g. ["example.com"])`),expiresAt:t.z.string().optional().describe(`Expiration date/time in ISO 8601 format`),allowAnonymous:t.z.boolean().optional().default(!1).describe(`Allow access without authentication`)}));n(()=>t.z.object({enabled:t.z.boolean().default(!1).describe(`Enable iframe embedding`),allowedOrigins:t.z.array(t.z.string()).optional().describe(`Allowed iframe parent origins (e.g. ["https://example.com"])`),width:t.z.string().optional().default(`100%`).describe(`Embed width (CSS value)`),height:t.z.string().optional().default(`600px`).describe(`Embed height (CSS value)`),showHeader:t.z.boolean().optional().default(!0).describe(`Show interface header in embed`),showNavigation:t.z.boolean().optional().default(!1).describe(`Show navigation in embed`),responsive:t.z.boolean().optional().default(!0).describe(`Enable responsive resizing`)}));var rt=t.z.enum([`xs`,`sm`,`md`,`lg`,`xl`,`2xl`]),it=n(()=>t.z.object({xs:t.z.number().min(1).max(12).optional(),sm:t.z.number().min(1).max(12).optional(),md:t.z.number().min(1).max(12).optional(),lg:t.z.number().min(1).max(12).optional(),xl:t.z.number().min(1).max(12).optional(),"2xl":t.z.number().min(1).max(12).optional()}).describe(`Grid columns per breakpoint (1-12)`)),at=n(()=>t.z.object({xs:t.z.number().optional(),sm:t.z.number().optional(),md:t.z.number().optional(),lg:t.z.number().optional(),xl:t.z.number().optional(),"2xl":t.z.number().optional()}).describe(`Display order per breakpoint`)),ot=n(()=>t.z.object({breakpoint:rt.optional().describe(`Minimum breakpoint for visibility`),hiddenOn:t.z.array(rt).optional().describe(`Hide on these breakpoints`),columns:it.optional().describe(`Grid columns per breakpoint`),order:at.optional().describe(`Display order per breakpoint`)}).describe(`Responsive layout configuration`)),V=n(()=>t.z.record(t.z.string(),t.z.union([t.z.string(),t.z.number()])).describe(`CSS property → value map (camelCase keys; design tokens encouraged)`));n(()=>t.z.object({large:V.optional().describe(`Unconditional base (desktop-first)`),medium:V.optional().describe(`Applied at ≤ medium breakpoint`),small:V.optional().describe(`Applied at ≤ small breakpoint`),xsmall:V.optional().describe(`Applied at ≤ xsmall breakpoint`)}).describe(`Per-breakpoint scoped style maps (ADR-0065)`));var st=n(()=>t.z.object({lazyLoad:t.z.boolean().optional().describe(`Enable lazy loading (defer rendering until visible)`),virtualScroll:t.z.object({enabled:t.z.boolean().default(!1).describe(`Enable virtual scrolling`),itemHeight:t.z.number().optional().describe(`Fixed item height in pixels (for estimation)`),overscan:t.z.number().optional().describe(`Number of extra items to render outside viewport`)}).optional().describe(`Virtual scrolling configuration`),cacheStrategy:t.z.enum([`none`,`cache-first`,`network-first`,`stale-while-revalidate`]).optional().describe(`Client-side data caching strategy`),prefetch:t.z.boolean().optional().describe(`Prefetch data before component is visible`),pageSize:t.z.number().optional().describe(`Number of items per page for pagination`),debounceMs:t.z.number().optional().describe(`Debounce interval for user interactions in milliseconds`)}).describe(`Performance optimization configuration`)),ct=t.z.enum([`GET`,`POST`,`PUT`,`DELETE`,`PATCH`,`HEAD`,`OPTIONS`]),lt=n(()=>t.z.enum([`GET`,`POST`,`PUT`,`PATCH`,`DELETE`])),ut=n(()=>t.z.object({url:t.z.string().describe(`API endpoint URL`),method:lt.optional().default(`GET`).describe(`HTTP method`),headers:t.z.record(t.z.string(),t.z.string()).optional().describe(`Custom HTTP headers`),params:t.z.record(t.z.string(),t.z.unknown()).optional().describe(`Query parameters`),body:t.z.unknown().optional().describe(`Request body for POST/PUT/PATCH`)}));n(()=>t.z.object({enabled:t.z.boolean().default(!0).describe(`Enable CORS`),origins:t.z.union([t.z.string(),t.z.array(t.z.string())]).default(`*`).describe(`Allowed origins (* for all)`),methods:t.z.array(ct).optional().describe(`Allowed HTTP methods`),credentials:t.z.boolean().default(!1).describe(`Allow credentials (cookies, authorization headers)`),maxAge:t.z.number().int().optional().describe(`Preflight cache duration in seconds`)})),n(()=>t.z.object({enabled:t.z.boolean().default(!1).describe(`Enable rate limiting`),windowMs:t.z.number().int().default(6e4).describe(`Time window in milliseconds`),maxRequests:t.z.number().int().default(100).describe(`Max requests per window`)})),n(()=>t.z.object({path:t.z.string().describe(`URL path to serve from`),directory:t.z.string().describe(`Physical directory to serve`),cacheControl:t.z.string().optional().describe(`Cache-Control header value`)}));var dt=n(()=>t.z.discriminatedUnion(`provider`,[t.z.object({provider:t.z.literal(`object`),object:t.z.string().describe(`Target object name`)}),t.z.object({provider:t.z.literal(`api`),read:ut.optional().describe(`Configuration for fetching data`),write:ut.optional().describe(`Configuration for submitting data (for forms/editable tables)`)}),t.z.object({provider:t.z.literal(`value`),items:t.z.array(t.z.unknown()).describe(`Static data array`)}),t.z.object({provider:t.z.literal(`schema`),schemaId:t.z.string().describe(`Schema identifier — typically the metadata type name`),schema:t.z.record(t.z.string(),t.z.unknown()).optional().describe(`Inline JSON Schema (Draft 2020-12). Optional when schemaId is resolvable.`)})])),ft=n(()=>t.z.object({field:t.z.string().describe(`Field name to filter on`),operator:t.z.string().describe(`Filter operator (e.g. equals, not_equals, contains, this_quarter)`),value:t.z.union([t.z.string(),t.z.number(),t.z.boolean(),t.z.null(),t.z.array(t.z.union([t.z.string(),t.z.number()]))]).optional().describe(`Filter value`)}).describe(`View filter rule`)),pt=n(()=>t.z.enum([`none`,`count`,`count_empty`,`count_filled`,`count_unique`,`percent_empty`,`percent_filled`,`sum`,`avg`,`min`,`max`]).describe(`Aggregation function for column footer summary`)),mt=n(()=>t.z.object({field:t.z.string().describe(`Field name (snake_case)`),label:L.optional().describe(`Display label override`),width:t.z.number().positive().optional().describe(`Column width in pixels`),align:t.z.enum([`left`,`center`,`right`]).optional().describe(`Text alignment`),hidden:t.z.boolean().optional().describe(`Hide column by default`),sortable:t.z.boolean().optional().describe(`Allow sorting by this column`),resizable:t.z.boolean().optional().describe(`Allow resizing this column`),wrap:t.z.boolean().optional().describe(`Allow text wrapping`),type:t.z.string().optional().describe(`Renderer type override (e.g., "currency", "date")`),pinned:t.z.enum([`left`,`right`]).optional().describe(`Pin/freeze column to left or right side`),summary:pt.optional().describe(`Footer aggregation function for this column`),link:t.z.boolean().optional().describe(`Functions as the primary navigation link (triggers View navigation)`),action:t.z.string().optional().describe(`Registered Action ID to execute when clicked`)})),ht=n(()=>t.z.object({type:t.z.enum([`none`,`single`,`multiple`]).default(`none`).describe(`Selection mode`)})),gt=n(()=>t.z.object({pageSize:t.z.number().int().positive().default(25).describe(`Number of records per page`),pageSizeOptions:t.z.array(t.z.number().int().positive()).optional().describe(`Available page size options`)})),_t=n(()=>t.z.enum([`compact`,`short`,`medium`,`tall`,`extra_tall`]).describe(`Row height / density setting for list view`)),vt=n(()=>t.z.object({field:t.z.string().describe(`Field name to group by`),order:t.z.enum([`asc`,`desc`]).default(`asc`).describe(`Group sort order`),collapsed:t.z.boolean().default(!1).describe(`Collapse groups by default`)})),yt=n(()=>t.z.object({fields:t.z.array(vt).min(1).describe(`Fields to group by (supports up to 3 levels)`)}).describe(`Record grouping configuration`)),bt=n(()=>t.z.object({coverField:t.z.string().optional().describe(`Attachment/image field to display as card cover`),coverFit:t.z.enum([`cover`,`contain`]).default(`cover`).describe(`Image fit mode for card cover`),cardSize:t.z.enum([`small`,`medium`,`large`]).default(`medium`).describe(`Card size in gallery view`),titleField:t.z.string().optional().describe(`Field to display as card title`),visibleFields:t.z.array(t.z.string()).optional().describe(`Fields to display on card body`)}).describe(`Gallery/card view configuration`)),xt=n(()=>t.z.object({startDateField:t.z.string().describe(`Field for timeline item start date`),endDateField:t.z.string().optional().describe(`Field for timeline item end date`),titleField:t.z.string().describe(`Field to display as timeline item title`),groupByField:t.z.string().optional().describe(`Field to group timeline rows`),colorField:t.z.string().optional().describe(`Field to determine item color`),scale:t.z.enum([`hour`,`day`,`week`,`month`,`quarter`,`year`]).default(`week`).describe(`Default timeline scale`)}).describe(`Timeline view configuration`)),St=n(()=>t.z.object({type:t.z.enum([`personal`,`collaborative`]).default(`collaborative`).describe(`View ownership type`),lockedBy:t.z.string().optional().describe(`User who locked the view configuration`)}).describe(`View sharing and access configuration`)),Ct=n(()=>t.z.object({field:t.z.string().describe(`Field to derive color from (typically a select/status field)`),colors:t.z.record(t.z.string(),t.z.string()).optional().describe(`Map of field value to color (hex/token)`)}).describe(`Row color configuration based on field values`)),wt=n(()=>t.z.enum([`grid`,`kanban`,`gallery`,`calendar`,`timeline`,`gantt`,`map`,`chart`,`tree`]).describe(`Visualization type that users can switch to`)),Tt=n(()=>t.z.object({sort:t.z.boolean().default(!0).describe(`Allow users to sort records`),search:t.z.boolean().default(!0).describe(`Allow users to search records`),filter:t.z.boolean().default(!0).describe(`Allow users to filter records`),rowHeight:t.z.boolean().default(!0).describe(`Allow users to toggle row height/density`),addRecordForm:t.z.boolean().default(!1).describe(`Add records through a form instead of inline`),editInline:t.z.boolean().default(!1).describe(`Allow users to edit records inline — click a cell to edit it with the field's type-aware widget (the same control the form uses). Off by default: the list is read-only unless the author opts in.`),buttons:t.z.array(t.z.string()).optional().describe(`Custom action button IDs to show in the toolbar`)}).describe(`User action toggles for the view toolbar`)),Et=n(()=>t.z.object({showDescription:t.z.boolean().default(!0).describe(`Show the view description text`),allowedVisualizations:t.z.array(wt).optional().describe(`Whitelist of visualization types users can switch between (e.g. ["grid", "gallery", "kanban"])`)}).describe(`Appearance and visualization configuration`)),Dt=n(()=>t.z.object({name:A.describe(`Tab identifier (snake_case)`),label:L.optional().describe(`Display label`),icon:t.z.string().optional().describe(`Tab icon name`),view:t.z.string().optional().describe(`Referenced list view name from listViews`),filter:t.z.array(ft).optional().describe(`Tab-specific filter criteria`),order:t.z.number().int().min(0).optional().describe(`Tab display order`),pinned:t.z.boolean().default(!1).describe(`Pin tab (cannot be removed by users)`),isDefault:t.z.boolean().default(!1).describe(`Set as the default active tab`),visible:t.z.boolean().default(!0).describe(`Tab visibility`)}).describe(`Tab configuration for multi-tab view interface`)),Ot=n(()=>t.z.object({field:t.z.string().describe(`Field name on the source object (must exist — checked by reference diagnostics)`),label:L.optional().describe(`Display label override (defaults to the field label)`),type:t.z.enum([`select`,`multi-select`,`boolean`,`date-range`,`text`]).optional().describe(`Filter control type. Omit to infer from the field definition`),options:t.z.array(t.z.object({value:t.z.union([t.z.string(),t.z.number(),t.z.boolean()]).describe(`Option value`),label:L.describe(`Option label`),color:t.z.string().optional().describe(`Option color token/hex`)})).optional().describe(`Static options. Omit to derive from the field definition (select options / lookup records)`),showCount:t.z.boolean().optional().describe(`Show per-option record counts`),defaultValues:t.z.array(t.z.union([t.z.string(),t.z.number(),t.z.boolean()])).optional().describe(`Pre-selected values when the view loads`)}).describe(`Quick-filter field configuration`)),kt=n(()=>t.z.object({element:t.z.enum([`dropdown`,`tabs`,`toggle`]).default(`dropdown`).describe(`Filter control style: "dropdown" (per-field value selectors) or "tabs" (named presets). "toggle" is deprecated.`),fields:t.z.array(Ot).optional().describe(`Fields exposed as quick filters (dropdown/toggle elements)`),tabs:t.z.array(Dt).optional().describe(`Named filter presets rendered as tabs (tabs element). Reuses ViewTabSchema`),showAllRecords:t.z.boolean().optional().describe(`Show an "All records" tab before the presets (tabs element)`)}).describe(`End-user quick-filter configuration (Airtable "User filters" parity)`)),At=n(()=>t.z.object({enabled:t.z.boolean().default(!0).describe(`Show the add record entry point`),position:t.z.enum([`top`,`bottom`,`both`]).default(`bottom`).describe(`Position of the add record button`),mode:t.z.enum([`inline`,`form`,`modal`]).default(`inline`).describe(`How to add a new record`),formView:t.z.string().optional().describe(`Named form view to use when mode is "form" or "modal"`)}).describe(`Add record entry point configuration`)),jt=n(()=>t.z.object({groupByField:t.z.string().describe(`Field to group columns by (usually status/select)`),summarizeField:t.z.string().optional().describe(`Field to sum at top of column (e.g. amount)`),columns:t.z.array(t.z.string()).describe(`Fields to show on cards`)})),Mt=n(()=>t.z.object({chartType:t.z.enum([`bar`,`line`,`pie`,`area`,`scatter`]).default(`bar`).describe(`Chart visualisation type`),dataset:A.describe(`Dataset name to bind (ADR-0021)`),dimensions:t.z.array(t.z.string()).optional().describe(`Dimension names — X/group/split`),values:t.z.array(t.z.string()).min(1).describe(`Measure names — Y (at least one)`)}).describe(`List chart view configuration`)),Nt=n(()=>t.z.object({startDateField:t.z.string(),endDateField:t.z.string().optional(),titleField:t.z.string(),colorField:t.z.string().optional()})),Pt=n(()=>t.z.object({field:t.z.string().describe(`Record field / dot-path the dimension filters on`),label:t.z.string().optional().describe(`Trigger label (falls back to the field label)`),options:t.z.array(t.z.union([t.z.string(),t.z.object({value:t.z.union([t.z.string(),t.z.number()]),label:t.z.string().optional()})])).optional().describe(`Explicit option override for fixed enums`)})),Ft=n(()=>t.z.object({startDateField:t.z.string(),endDateField:t.z.string(),titleField:t.z.string(),progressField:t.z.string().optional(),dependenciesField:t.z.string().optional(),colorField:t.z.string().optional().describe(`Field that drives the bar color`),parentField:t.z.string().optional().describe(`Field holding the parent task id (builds the summary → step tree)`),typeField:t.z.string().optional().describe(`Field whose value maps to task/summary/milestone`),baselineStartField:t.z.string().optional().describe(`Baseline (planned) start field`),baselineEndField:t.z.string().optional().describe(`Baseline (planned) end field`),groupByField:t.z.string().optional().describe(`Field to group leaf tasks by (synthesized summary rows)`),resourceView:t.z.boolean().optional().describe(`Render a per-resource workload histogram instead of the timeline`),assigneeField:t.z.string().optional().describe(`Resource field to bucket load by (resource view)`),effortField:t.z.string().optional().describe(`Per-task load units (resource view; default 1)`),capacity:t.z.number().optional().describe(`Per-resource capacity ceiling; loads above this flag overload`),tooltipFields:t.z.array(t.z.union([t.z.string(),t.z.object({field:t.z.string(),label:t.z.string().optional()})])).optional().describe(`Fields to surface in the hover tooltip, in display order`),quickFilters:t.z.array(Pt).optional().describe(`Multi-select filter dropdowns rendered above the chart`),autoZoomToFilter:t.z.boolean().optional().describe(`When true (default), filtering zooms the range to the filtered tasks`)}).passthrough()),It=n(()=>t.z.object({parentField:t.z.string().optional().describe(`Single-parent pointer field (auto-detected from the object schema when omitted)`),labelField:t.z.string().optional().describe(`Field rendered indented in the first column (defaults to "name")`),fields:t.z.array(t.z.string()).optional().describe(`Additional fields rendered as flat columns alongside the label`),defaultExpandedDepth:t.z.number().int().min(0).optional().describe(`Initial expansion depth (0 = roots only; omit = expand all)`)}).passthrough()),Lt=n(()=>t.z.enum([`page`,`drawer`,`modal`,`split`,`popover`,`new_window`,`none`])),Rt=n(()=>t.z.object({mode:Lt.default(`page`),view:t.z.string().optional().describe(`Name of the form view to use for details (e.g. "summary_view", "edit_form")`),preventNavigation:t.z.boolean().default(!1).describe(`Disable standard navigation entirely`),openNewTab:t.z.boolean().default(!1).describe(`Force open in new tab (applies to page mode)`),size:t.z.enum([`auto`,`sm`,`md`,`lg`,`xl`,`full`]).default(`auto`).describe("[#2578] Overlay size bucket for drawer/modal detail: 'auto' (default — renderer derives from field count + viewport; AI writes nothing) or a coarse override sm/md/lg/xl/full. Prefer this over the pixel `width`; page mode ignores it."),width:t.z.union([t.z.string(),t.z.number()]).optional().describe('[DEPRECATED → size] Pixel/percent width of the drawer/modal (e.g. "600px"). A pixel width cannot be chosen at authoring time without knowing the client viewport — use the `size` bucket.')})),zt=n(()=>t.z.object({name:A.optional().describe(`Internal view name (lowercase snake_case)`),label:L.optional(),type:t.z.enum([`grid`,`kanban`,`gallery`,`calendar`,`timeline`,`gantt`,`map`,`chart`,`tree`]).default(`grid`),data:dt.optional().describe(`Data source configuration (defaults to "object" provider)`),columns:t.z.union([t.z.array(t.z.string()),t.z.array(mt)]).describe(`Fields to display as columns`),filter:t.z.array(ft).optional().describe(`Filter criteria (JSON Rules)`),sort:t.z.union([t.z.string(),t.z.array(t.z.object({field:t.z.string(),order:t.z.enum([`asc`,`desc`])}))]).optional(),searchableFields:t.z.array(t.z.string()).optional().describe(`Fields enabled for search`),filterableFields:t.z.array(t.z.string()).optional().describe(`Legacy shorthand for userFilters.fields — bare field names enabled for end-user filtering. Prefer userFilters`),userFilters:kt.optional().describe(`End-user quick-filter bar: dropdown/toggle fields or tab presets. Omit to let the renderer derive filters from select/boolean fields`),resizable:t.z.boolean().optional().describe(`Enable column resizing`),striped:t.z.boolean().optional().describe(`Striped row styling`),bordered:t.z.boolean().optional().describe(`Show borders`),compactToolbar:t.z.boolean().optional().describe(`Collapse Group/Color/Density/Hide-fields into a single View settings popover`),selection:ht.optional().describe(`Row selection configuration`),navigation:Rt.optional().describe(`Configuration for item click navigation (page, drawer, modal, etc.)`),pagination:gt.optional().describe(`Pagination configuration`),kanban:jt.optional(),calendar:Nt.optional(),gantt:Ft.optional(),gallery:bt.optional(),timeline:xt.optional(),chart:Mt.optional(),tree:It.optional(),description:L.optional().describe(`View description for documentation/tooltips`),sharing:St.optional().describe(`View sharing and access configuration`),rowHeight:_t.optional().describe(`Row height / density setting`),grouping:yt.optional().describe(`Group records by one or more fields`),rowColor:Ct.optional().describe(`Color rows based on field value`),hiddenFields:t.z.array(t.z.string()).optional().describe(`Fields to hide in this specific view`),fieldOrder:t.z.array(t.z.string()).optional().describe(`Explicit field display order for this view`),rowActions:t.z.array(t.z.string()).optional().describe(`Actions available for individual row items`),bulkActions:t.z.array(t.z.string()).optional().describe(`Actions available when multiple rows are selected`),bulkActionDefs:t.z.array(t.z.record(t.z.string(),t.z.any())).optional().describe(`Rich bulk action definitions (schema-driven, executed via BulkActionDialog)`),virtualScroll:t.z.boolean().optional().describe(`Enable virtual scrolling for large datasets`),conditionalFormatting:t.z.array(t.z.object({condition:j.describe(`Predicate (CEL) to evaluate.`),style:t.z.record(t.z.string(),t.z.string()).describe(`CSS styles to apply when condition is true`)})).optional().describe(`Conditional formatting rules for list rows`),inlineEdit:t.z.boolean().optional().describe(`Allow inline editing of records directly in the list view`),exportOptions:t.z.array(t.z.enum([`csv`,`xlsx`,`pdf`,`json`])).optional().describe(`Available export format options`),userActions:Tt.optional().describe(`User action toggles for the view toolbar`),appearance:Et.optional().describe(`Appearance and visualization configuration`),tabs:t.z.array(Dt).optional().describe(`Tab definitions for multi-tab view interface`),addRecord:At.optional().describe(`Add record entry point configuration`),showRecordCount:t.z.boolean().optional().describe(`Show record count at the bottom of the list`),allowPrinting:t.z.boolean().optional().describe(`Allow users to print the view`),emptyState:t.z.object({title:L.optional(),message:L.optional(),icon:t.z.string().optional()}).optional().describe(`Empty state configuration when no records found`),aria:Be.optional().describe(`ARIA accessibility attributes for the list view`),responsive:ot.optional().describe(`Responsive layout configuration`),performance:st.optional().describe(`Performance optimization settings`)})),Bt=n(()=>t.z.object({field:t.z.string().describe(`Field name (snake_case)`),type:M.optional().describe(`Field type (auto-infers widget if omitted)`),options:t.z.array(N).optional().describe(`Options for select/multiselect/radio/checkboxes fields`),reference:t.z.string().optional().describe(`Target object name for lookup/master_detail fields`),maxLength:t.z.number().optional().describe(`Maximum character length (for text/textarea/email/url/phone)`),minLength:t.z.number().optional().describe(`Minimum character length`),min:t.z.number().optional().describe(`Minimum value (for number/currency/percent/slider)`),max:t.z.number().optional().describe(`Maximum value`),precision:t.z.number().optional().describe(`Total digits (for number/currency)`),scale:t.z.number().optional().describe(`Decimal places`),multiple:t.z.boolean().optional().describe(`Allow multiple values (for select/lookup/file/image)`),label:L.optional().describe(`Display label override`),placeholder:L.optional().describe(`Placeholder text`),helpText:L.optional().describe(`Help/hint text`),readonly:t.z.boolean().optional().describe(`Read-only override`),immutable:t.z.boolean().optional().describe(`Editable on create, locked once the record exists (e.g. machine names).`),required:t.z.boolean().optional().describe(`Required override`),hidden:t.z.boolean().optional().describe(`Hidden override`),colSpan:t.z.number().int().min(1).max(4).optional().describe("[legacy — prefer `span`] Absolute column span (1-4). Fragile when the column count is derived per surface (mobile 1 / modal 2 / page 3-4): a fixed span only lines up at the width the author imagined. The renderer clamps it to the current column count. Prefer `span`."),span:t.z.enum([`auto`,`full`]).default(`auto`).describe("Relative field width. 'auto' (default — omit it): the renderer sizes the field from its widget type × the current column count (wide widgets like textarea/richtext/json/file/subform take the whole row). 'full': whole row at any column count. Prefer this over the absolute `colSpan`."),widget:t.z.string().optional().describe(`Custom widget/component name (overrides type-based inference)`),language:t.z.string().optional().describe(`Code editor language (for type=code)`),fields:t.z.array(t.z.lazy(()=>Bt)).optional().describe(`Sub-fields for composite/repeater/record types`),keyField:t.z.object({field:t.z.string().default(`name`).describe(`Property name that holds the key inside each item (defaults to "name")`),label:L.optional().describe(`Display label for the key column`),placeholder:L.optional().describe(`Placeholder when entering a new key`),helpText:L.optional().describe(`Help text under the key input`),regex:t.z.string().optional().describe(`JS regex source string the key must match (no flags)`),immutable:t.z.boolean().default(!0).describe(`If true, the key is read-only after creation`)}).optional().describe(`Key column config for record-typed fields`),dependsOn:t.z.string().optional().describe(`Parent field name for cascading`),visibleOn:j.optional().describe(`Visibility predicate (CEL).`),disclosure:t.z.enum([`inline`,`popover`]).optional().describe(`Composite rendering: inline bordered box (default) or a summary line + gear popover (progressive disclosure).`)})),Vt=n(()=>t.z.object({name:t.z.string().optional().describe(`Stable section identifier for i18n lookup (snake_case)`),label:L.optional(),description:t.z.string().optional().describe(`Optional description rendered under the section header.`),collapsible:t.z.boolean().default(!1),collapsed:t.z.boolean().default(!1),visibleOn:j.optional().describe(`Visibility predicate (CEL). Hides the whole section when false.`),columns:t.z.union([t.z.enum([`1`,`2`,`3`,`4`]),t.z.literal(1),t.z.literal(2),t.z.literal(3),t.z.literal(4)]).default(1).transform(e=>typeof e==`string`?parseInt(e):e),fields:t.z.array(t.z.union([t.z.string(),Bt]))})),H=n(()=>t.z.object({type:t.z.enum([`simple`,`tabbed`,`wizard`,`split`,`drawer`,`modal`]).default(`simple`),layout:t.z.enum([`vertical`,`horizontal`,`inline`,`grid`]).optional().describe(`Field layout direction`),columns:t.z.number().int().min(1).optional().describe(`Number of columns for the form body`),title:t.z.string().optional().describe(`Form title`),description:t.z.string().optional().describe(`Form description`),defaultTab:t.z.string().optional().describe(`Initially active tab (tabbed forms)`),tabPosition:t.z.enum([`top`,`bottom`,`left`,`right`]).optional().describe(`Tab strip position (tabbed forms)`),allowSkip:t.z.boolean().optional().describe(`Allow skipping steps (wizard forms)`),showStepIndicator:t.z.boolean().optional().describe(`Show the step indicator (wizard forms)`),splitDirection:t.z.enum([`horizontal`,`vertical`]).optional().describe(`Split orientation (split forms)`),splitSize:t.z.number().optional().describe(`Primary split panel size, % (split forms)`),splitResizable:t.z.boolean().optional().describe(`Whether the split is resizable (split forms)`),drawerSide:t.z.enum([`top`,`bottom`,`left`,`right`]).optional().describe(`Drawer side (drawer forms)`),drawerWidth:t.z.string().optional().describe(`[DEPRECATED → size buckets] Drawer width, e.g. "480px". A pixel width cannot be chosen without knowing the client viewport — the renderer derives it.`),modalSize:t.z.enum([`sm`,`default`,`lg`,`xl`,`full`]).optional().describe(`Modal size (modal forms)`),data:dt.optional().describe(`Data source configuration (defaults to "object" provider)`),sections:t.z.array(Vt).optional(),groups:t.z.array(Vt).optional(),subforms:t.z.array(t.z.object({childObject:t.z.string().describe(`Child object whose records are entered inline`),relationshipField:t.z.string().optional().describe(`FK on the child pointing back to the parent (auto-detected when omitted)`),columns:t.z.array(t.z.any()).optional().describe(`Editable grid columns (derived from the child object when omitted)`),amountField:t.z.string().optional().describe(`Numeric child column summed for the running total`),totalField:t.z.string().optional().describe(`Parent field to receive the rolled-up sum`),title:t.z.string().optional().describe(`Section title`),addLabel:t.z.string().optional().describe(`Add-row button label`),minRows:t.z.number().optional(),maxRows:t.z.number().optional()})).optional().describe(`Inline master-detail child collections`),defaultSort:t.z.array(t.z.object({field:t.z.string().describe(`Field name to sort by`),order:t.z.enum([`asc`,`desc`]).default(`desc`).describe(`Sort direction`)})).optional().describe(`Default sort order for related list views within this form`),sharing:nt.optional().describe(`Public sharing configuration for this form`),submitBehavior:t.z.union([t.z.object({kind:t.z.literal(`thank-you`),title:t.z.string().optional(),message:t.z.string().optional()}),t.z.object({kind:t.z.literal(`redirect`),url:t.z.string(),delayMs:t.z.number().int().min(0).optional()}),t.z.object({kind:t.z.literal(`continue`)}),t.z.object({kind:t.z.literal(`next-record`)})]).optional().describe(`Post-submit behavior`),aria:Be.optional().describe(`ARIA accessibility attributes for the form view`)})),U=n(()=>zt.omit({userFilters:!0}));n(()=>t.z.object({list:U.optional(),form:H.optional(),listViews:t.z.record(t.z.string(),U).optional().describe(`Additional named list views (views mode — no userFilters, ADR-0053)`),formViews:t.z.record(t.z.string(),H).optional().describe(`Additional named form views`),protection:B.optional().describe(`Package author protection block — lock policy for this view.`),...z}));var Ht=t.z.string().regex(/^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$/,`View item name must be a dotted snake_case qualified name, e.g. "crm_lead.pipeline".`).describe("Globally-unique view id, `<object>.<viewKey>`."),Ut=t.z.enum([`package`,`shared`,`personal`]).describe(`View identity layer: package | shared | personal.`);t.z.enum([`list`,`form`]).describe("Whether `config` is a ListView (list family) or a FormView.");function Wt(){return{name:Ht,object:t.z.string().describe(`Bound object name — the foreign key used to aggregate views.`),label:L.optional().describe(`Display label (supports i18n).`),isDefault:t.z.boolean().optional().describe(`Whether this is the object's default view in the switcher.`),order:t.z.number().int().optional().describe(`Sort order within the object's view switcher / left rail.`),scope:Ut.optional().describe("Identity layer (defaults to `package` for source-loaded views)."),owner:t.z.string().optional().describe("Owner user id — set when `scope` is `personal`."),hidden:t.z.boolean().optional().describe(`Hidden from the switcher (per-user / per-org declutter).`),protection:B.optional().describe(`Package author protection block — lock policy for this view.`),...z}}n(()=>t.z.discriminatedUnion(`viewKind`,[t.z.object({viewKind:t.z.literal(`list`),config:zt.describe(`List-family view configuration.`),...Wt()}),t.z.object({viewKind:t.z.literal(`form`),config:H.describe(`Form view configuration.`),...Wt()})]));function W(e){let{schemaId:t,...n}=e;return H.parse({...n,data:{provider:`schema`,schemaId:t}})}var Gt=t.z.enum([`get`,`list`,`create`,`update`,`delete`,`upsert`,`bulk`,`aggregate`,`history`,`search`,`restore`,`purge`,`import`,`export`]),Kt=t.z.object({trackHistory:t.z.boolean().default(!1).describe(`Enable field history tracking for audit compliance`),searchable:t.z.boolean().default(!0).describe(`Index records for global search`),apiEnabled:t.z.boolean().default(!0).describe(`Expose object via automatic APIs`),apiMethods:t.z.array(Gt).optional().describe(`Whitelist of allowed API operations`),files:t.z.boolean().default(!1).describe(`Enable file attachments and document management`),feeds:t.z.boolean().default(!1).describe(`Enable social feed, comments, and mentions (Chatter-like)`),activities:t.z.boolean().default(!1).describe(`Enable standard tasks and events tracking`),trash:t.z.boolean().default(!0).describe(`Enable soft-delete with restore capability`),mru:t.z.boolean().default(!0).describe(`Track Most Recently Used (MRU) list for users`),clone:t.z.boolean().default(!0).describe(`Allow record deep cloning`)}),qt=n(()=>t.z.object({name:t.z.string().optional().describe(`Index name (auto-generated if not provided)`),fields:t.z.array(t.z.string()).describe(`Fields included in the index`),type:t.z.enum([`btree`,`hash`,`gin`,`gist`,`fulltext`]).optional().default(`btree`).describe(`Index algorithm type`),unique:t.z.boolean().optional().default(!1).describe(`Whether the index enforces uniqueness`),partial:t.z.string().optional().describe(`Partial index condition (SQL WHERE clause for conditional indexes)`)})),Jt=n(()=>t.z.object({fields:t.z.array(t.z.string()).describe(`Fields to index for full-text search weighting`),displayFields:t.z.array(t.z.string()).optional().describe(`Fields to display in search result cards`),filters:t.z.array(t.z.string()).optional().describe(`Default filters for search results`)})),Yt=n(()=>t.z.object({enabled:t.z.boolean().describe(`Enable multi-tenancy for this object`),strategy:t.z.enum([`shared`,`isolated`,`hybrid`]).describe(`Tenant isolation strategy: shared (single DB, row-level), isolated (separate DB per tenant), hybrid (mix)`),tenantField:t.z.string().default(`tenant_id`).describe(`Field name for tenant identifier`),crossTenantAccess:t.z.boolean().default(!1).describe(`Allow cross-tenant data access (with explicit permission)`)})),Xt=n(()=>t.z.object({default:t.z.enum([`public`,`private`]).default(`public`).describe(`Default exposure posture: public (covered by wildcard grants) | private (needs explicit grant; exempt from wildcard RLS).`)})),Zt=n(()=>t.z.object({enabled:t.z.boolean().describe(`Enable soft delete (trash/recycle bin)`),field:t.z.string().default(`deleted_at`).describe(`Field name for soft delete timestamp`),cascadeDelete:t.z.boolean().default(!1).describe(`Cascade soft delete to related records`)})),Qt=n(()=>t.z.object({enabled:t.z.boolean().describe(`Enable record versioning`),strategy:t.z.enum([`snapshot`,`delta`,`event-sourcing`]).describe(`Versioning strategy: snapshot (full copy), delta (changes only), event-sourcing (event log)`),retentionDays:t.z.number().min(1).optional().describe(`Number of days to retain old versions (undefined = infinite)`),versionField:t.z.string().default(`version`).describe(`Field name for version number/timestamp`)})),$t=n(()=>t.z.object({key:t.z.string().regex(/^[a-z_][a-z0-9_]*$/,{message:`Field group key must be lowercase snake_case (e.g., "contact_info", "billing", "system")`}).describe(`Group machine key (snake_case). Referenced by Field.group.`),label:t.z.string().describe(`Group display label`),icon:t.z.string().optional().describe(`Icon name (Lucide/Material) for the group header`),description:t.z.string().optional().describe(`Optional description shown under the group header`),collapse:t.z.enum([`none`,`expanded`,`collapsed`]).optional().default(`none`).describe(`[ADR-0085] Section collapse behaviour: 'none' (always open, no toggle), 'expanded' (collapsible, starts open), 'collapsed' (collapsible, starts closed).`),defaultExpanded:t.z.boolean().optional().describe(`[DEPRECATED → collapse] true → 'expanded', false → 'collapsed'.`),collapsible:t.z.boolean().optional().describe("[DEPRECATED → collapse] Boolean pair with `collapsed`; use the `collapse` enum."),collapsed:t.z.boolean().optional().describe("[DEPRECATED → collapse] Boolean pair with `collapsible`; use the `collapse` enum.")})),en=t.z.object({remoteName:t.z.string().optional().describe(`Remote table/view name. Defaults to object.name.`),remoteSchema:t.z.string().optional().describe(`Remote schema/database qualifier.`),writable:t.z.boolean().default(!1).describe(`Per-object write opt-in (also requires datasource.external.allowWrites).`),columnMap:t.z.record(t.z.string(),t.z.string()).optional().describe(`Remote column name → local field name.`),introspectedAt:t.z.string().datetime().optional().describe("Set by `os datasource introspect`; informational."),ignoreColumns:t.z.array(t.z.string()).optional().describe(`Remote columns to skip during validation (dev convenience).`)}).describe(`External datasource binding (ADR-0015)`),G=t.z.object({name:t.z.string().regex(/^[a-z_][a-z0-9_]*$/).describe(`Machine unique key (snake_case). Immutable.`),label:t.z.string().optional().describe(`Human readable singular label (e.g. "Account")`),pluralLabel:t.z.string().optional().describe(`Human readable plural label (e.g. "Accounts")`),description:t.z.string().optional().describe(`Developer documentation / description`),icon:t.z.string().optional().describe(`Icon name (Lucide/Material) for UI representation`),tags:t.z.array(t.z.string()).optional().describe(`Categorization tags (e.g. "sales", "system", "reference")`),active:t.z.boolean().optional().default(!0).describe(`Is the object active and usable`),isSystem:t.z.boolean().optional().default(!1).describe(`Is system object (protected from deletion)`),abstract:t.z.boolean().optional().default(!1).describe(`Is abstract base object (cannot be instantiated)`),managedBy:t.z.enum([`platform`,`config`,`system`,`append-only`,`better-auth`]).optional().describe(`Lifecycle bucket — platform (user CRUD) | config (admin authored) | system (engine-managed) | append-only (audit) | better-auth (identity). UI clients honour the resolved affordance matrix.`),userActions:t.z.object({create:t.z.boolean().optional().describe(`Show generic "New" button.`),import:t.z.boolean().optional().describe(`Show CSV import wizard entry.`),edit:t.z.boolean().optional().describe(`Allow inline / form edit of existing rows.`),delete:t.z.boolean().optional().describe(`Show row-level delete + bulk delete.`),exportCsv:t.z.boolean().optional().describe(`Show CSV export entry.`)}).optional().describe(`Per-object override of the resolved CRUD affordance matrix.`),systemFields:t.z.union([t.z.literal(!1),t.z.object({tenant:t.z.boolean().optional().describe(`Inject organization_id (multi-tenant only). Default true.`),owner:t.z.boolean().optional().describe(`Reserved for future owner_id auto-injection.`),audit:t.z.boolean().optional().describe(`Reserved for future created_by/updated_by auto-injection.`)})]).optional().describe(`Opt out of, or selectively disable, registry-level system-field auto-injection.`),datasource:t.z.string().optional().default(`default`).describe(`Target Datasource ID. "default" is the primary DB.`),external:en.optional().describe(`Remote table binding for federated (external) objects.`),fields:t.z.record(t.z.string().regex(/^[a-z_][a-z0-9_]*$/,{message:`Field names must be lowercase snake_case (e.g., "first_name", "company", "annual_revenue")`}),P).describe(`Field definitions map. Keys must be snake_case identifiers.`),indexes:t.z.array(qt).optional().describe(`Database performance indexes`),fieldGroups:t.z.array($t).refine(e=>new Set(e.map(e=>e.key)).size===e.length,{message:`fieldGroups[].key must be unique within an object`}).optional().describe(`Ordered list of field groups (array order = display order). See ObjectFieldGroupSchema.`),tenancy:Yt.optional().describe(`Multi-tenancy configuration for SaaS applications`),access:Xt.optional().describe(`[ADR-0066 D2] Object exposure posture (public-by-default vs private secure-by-default).`),requiredPermissions:t.z.array(t.z.string()).optional().describe(`[ADR-0066 D3] Capabilities required to access this object (AND-gate, checked alongside CRUD grants).`),softDelete:Zt.optional().describe(`Soft delete (trash/recycle bin) configuration`),versioning:Qt.optional().describe(`Record versioning and history tracking configuration`),validations:t.z.array(I).optional().describe(`Object-level validation rules`),activityMilestones:t.z.array(t.z.object({field:t.z.string().describe(`Field to watch (typically a status/stage select).`),value:t.z.string().describe(`The value the field must transition INTO to fire the milestone.`),summary:t.z.string().describe(`Activity summary template; {field} tokens interpolate the record value. e.g. "Deal won: {name}".`),type:t.z.string().optional().describe(`Activity type for the emitted row (default "completed").`)})).optional().describe(`Declarative semantic activity milestones — emit a templated timeline row when a field transitions into a value, no hook code (ADR-0052 §5b.2).`),nameField:t.z.string().optional().describe(`[ADR-0079] Canonical primary title field — the stored field used as the record display name (e.g. "name", "title"). Pairs with recordName.`),displayNameField:t.z.string().optional().describe(`[DEPRECATED → nameField] Field to use as the record display name (e.g., "name", "title"). Accepted as an alias for nameField.`),recordName:t.z.object({type:t.z.enum([`text`,`autonumber`]).describe(`Record name type: text (user-entered) or autonumber (system-generated)`),displayFormat:t.z.string().optional().describe(`Auto-number format pattern (e.g., "CASE-{0000}", "INV-{YYYY}-{0000}")`),startNumber:t.z.number().int().min(0).optional().describe(`Starting number for autonumber (default: 1)`)}).optional().describe(`Record name generation configuration (Salesforce pattern)`),titleFormat:we.optional().describe(`[DEPRECATED → nameField (ADR-0079)] Render-only title template; the server cannot return or query it, and an explicit nameField now takes precedence. Migrate a single-field title to nameField, a composite to a formula field designated as nameField.`),highlightFields:t.z.array(t.z.string()).optional().describe(`[ADR-0085] Ordered most-important fields; first entry wins where only one fits. Drives default columns, cards, previews, detail highlight strip. Renamed from compactLayout.`),stageField:t.z.union([t.z.string(),t.z.literal(!1)]).optional().describe(`[ADR-0085] Lifecycle stage field (linear/ordered), or false to declare the status field non-linear and suppress stage heuristics. Absent = heuristic detection allowed.`),listViews:t.z.record(t.z.string(),U).optional().describe(`Built-in named list views (segmented tabs) shipped with the object schema — "views" mode, no page-only userFilters (ADR-0053)`),searchableFields:t.z.array(t.z.string()).optional().describe("Fields the `$search` query matches against (ADR-0061). Canonical default for the record picker, list quick-search and global search; views may narrow it. When unset, search auto-defaults to the name/title field plus short-text fields."),search:Jt.optional().describe(`Search engine configuration`),enable:Kt.optional().describe(`Enabled system features modules`),sharingModel:t.z.enum([`private`,`public_read`,`public_read_write`,`controlled_by_parent`,`read`,`read_write`,`full`]).optional().describe(`Org-Wide Default record visibility (OWD). Canonical: private (owner-only) | public_read (everyone reads, owner writes) | public_read_write (everyone reads+writes) | controlled_by_parent (derived from the master record). Legacy aliases: read=public_read, read_write/full=public_read_write. ADR-0056 D1.`),publicSharing:t.z.object({enabled:t.z.boolean().default(!1).describe(`Allow records of this object to be published via share link`),allowedAudiences:t.z.array(t.z.enum([`public`,`link_only`,`signed_in`,`email`])).optional().describe(`Audiences callers may select when creating a link`),allowedPermissions:t.z.array(t.z.enum([`view`,`comment`,`edit`])).optional().describe(`Permission levels selectable on the share dialog`),maxExpiryDays:t.z.number().int().positive().optional().describe(`Reject links with expiry beyond this many days`),redactFields:t.z.array(t.z.string()).optional().describe(`Field names removed from records served via a share token`),eligibility:t.z.string().optional().describe(`CEL expression that must evaluate to true on the target record`)}).optional().describe(`Public share-link policy (Notion/Figma-style link sharing)`),keyPrefix:t.z.string().max(5).optional().describe(`Short prefix for record IDs (e.g., "001" for Account)`),actions:t.z.array(Qe).optional().describe(`Actions associated with this object (auto-populated from top-level actions via objectName)`),protection:B.optional().describe(`Package author protection block — lock policy for this object.`),...z});function tn(e){return e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}var nn={workflows:"`workflows` is not an ObjectSchema field. Object-level, record-triggered automation is authored as a lifecycle hook (`src/objects/<name>.hook.ts`, registered via `defineHook()`) or as a top-level `record_change` flow — not as `workflows[]` on the object schema.",workflow:"`workflow` is not an ObjectSchema field. Record-triggered automation is authored as a lifecycle hook (`src/objects/<name>.hook.ts`) or a top-level `record_change` flow.",hooks:"`hooks` is not an ObjectSchema field. Lifecycle hooks live in their own `src/objects/<name>.hook.ts` module, registered via `defineHook()`.",triggers:"`triggers` is not an ObjectSchema field. Use a lifecycle hook (`src/objects/<name>.hook.ts`) or a top-level `record_change` flow.",compactLayout:"`compactLayout` was renamed to `highlightFields` in @objectstack/spec 11.7.0 (ADR-0085 semantic roles) and the alias was retired in 11.9.1 (#2536). Rename the key — the value shape (ordered field-name list) is unchanged.",detail:"The `detail` UI-hints block was removed by ADR-0085 (spec 11.7.0). Its jobs moved to top-level semantic roles: `detail.stageField` → `stageField` (string | false), `detail.highlightFields` → `highlightFields`, section layout → `fieldGroups` + `Field.group`. Whole-page customization is done by assigning a custom Page schema instead of per-page hint keys.",views:"`views` is not an ObjectSchema field: the object-level `views.form/*` and `views.detail/*` UI-hint dialect was never part of the spec and its renderer support was removed (ADR-0085). Use the semantic roles (`highlightFields`, `stageField`, `fieldGroups`) for hints and `listViews` for named list views.",defaultDetailForm:"`defaultDetailForm` was never implemented and was removed from the spec (#2402). Curate the record page by assigning a custom Page schema; form layout derives from `fieldGroups` + `Field.group`."};function rn(e,t){let n=Array.from({length:e.length+1},()=>Array(t.length+1).fill(0));for(let t=0;t<=e.length;t++)n[t][0]=t;for(let e=0;e<=t.length;e++)n[0][e]=e;for(let r=1;r<=e.length;r++)for(let i=1;i<=t.length;i++)n[r][i]=e[r-1]===t[i-1]?n[r-1][i-1]:1+Math.min(n[r-1][i],n[r][i-1],n[r-1][i-1]);return n[e.length][t.length]}function an(e,t){let n,r=1/0;for(let i of t){let t=rn(e.toLowerCase(),i.toLowerCase());t<r&&(r=t,n=i)}return n!==void 0&&r<=Math.max(2,Math.floor(e.length/3))?n:void 0}function on(e,t,n){let r=typeof e==`string`&&e.length>0?e:`<unnamed>`,i=t.map(e=>{let t=nn[e];if(t)return` \u2022 ${t}`;let r=an(e,n);return r?` \u2022 \`${e}\` is not an ObjectSchema field \u2014 did you mean \`${r}\`?`:` \u2022 \`${e}\` is not an ObjectSchema field.`});return Error(`ObjectSchema.create('${r}'): unknown key(s) \u2014 ${t.join(`, `)}.
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DAXXjFlN.js";import{Gt as t,t as n}from"./framework-B3O15Lsq.js";import{n as r}from"./vendor-zod-DNgwlUUI.js";var i=e((e=>{var t=r();function n(e){if(typeof process<`u`&&{}.OS_EAGER_SCHEMAS===`1`)return e();let t,n=()=>(t===void 0&&(t=e()),t);return new Proxy(function(){},{get(e,t){let r=n(),i=r[t];return typeof i==`function`?i.bind(r):i},set(e,t,r){let i=n();return i[t]=r,!0},has(e,t){return t in n()},ownKeys(){return Reflect.ownKeys(n())},getOwnPropertyDescriptor(e,t){return Reflect.getOwnPropertyDescriptor(n(),t)},getPrototypeOf(){return Reflect.getPrototypeOf(n())}})}var i=n(()=>t.z.object({$field:t.z.string().describe(`Field Reference/Column Name`)})),a=n(()=>t.z.object({$eq:t.z.any().optional(),$ne:t.z.any().optional()})),o=n(()=>t.z.object({$gt:t.z.union([t.z.number(),t.z.date(),i]).optional(),$gte:t.z.union([t.z.number(),t.z.date(),i]).optional(),$lt:t.z.union([t.z.number(),t.z.date(),i]).optional(),$lte:t.z.union([t.z.number(),t.z.date(),i]).optional()})),s=n(()=>t.z.object({$in:t.z.array(t.z.any()).optional(),$nin:t.z.array(t.z.any()).optional()})),c=n(()=>t.z.object({$between:t.z.tuple([t.z.union([t.z.number(),t.z.date(),i]),t.z.union([t.z.number(),t.z.date(),i])]).optional()})),l=n(()=>t.z.object({$contains:t.z.string().optional(),$notContains:t.z.string().optional(),$startsWith:t.z.string().optional(),$endsWith:t.z.string().optional()})),u=n(()=>t.z.object({$null:t.z.boolean().optional(),$exists:t.z.boolean().optional()})),d=n(()=>t.z.object({$eq:t.z.any().optional(),$ne:t.z.any().optional(),$gt:t.z.union([t.z.number(),t.z.date(),i]).optional(),$gte:t.z.union([t.z.number(),t.z.date(),i]).optional(),$lt:t.z.union([t.z.number(),t.z.date(),i]).optional(),$lte:t.z.union([t.z.number(),t.z.date(),i]).optional(),$in:t.z.array(t.z.any()).optional(),$nin:t.z.array(t.z.any()).optional(),$between:t.z.tuple([t.z.union([t.z.number(),t.z.date(),i]),t.z.union([t.z.number(),t.z.date(),i])]).optional(),$contains:t.z.string().optional(),$notContains:t.z.string().optional(),$startsWith:t.z.string().optional(),$endsWith:t.z.string().optional(),$null:t.z.boolean().optional(),$exists:t.z.boolean().optional()})),f=t.z.lazy(()=>t.z.record(t.z.string(),t.z.unknown()).and(t.z.object({$and:t.z.array(f).optional(),$or:t.z.array(f).optional(),$not:f.optional()}))),ee=n(()=>t.z.object({where:f.optional()})),p=t.z.lazy(()=>t.z.object({$and:t.z.array(t.z.union([t.z.record(t.z.string(),d),p])).optional(),$or:t.z.array(t.z.union([t.z.record(t.z.string(),d),p])).optional(),$not:t.z.union([t.z.record(t.z.string(),d),p]).optional()})),m=new Set([`=`,`==`,`!=`,`<>`,`>`,`>=`,`<`,`<=`,`in`,`nin`,`not_in`,`contains`,`notcontains`,`not_contains`,`like`,`startswith`,`starts_with`,`endswith`,`ends_with`,`between`,`is_null`,`is_not_null`]);function h(e){if(!Array.isArray(e)||e.length===0)return!1;let t=e[0];if(typeof t==`string`){let n=t.toLowerCase();if(n===`and`||n===`or`)return e.length>=2&&e.slice(1).every(e=>h(e));if(e.length>=2&&typeof e[1]==`string`)return m.has(e[1].toLowerCase())}return e.every(e=>h(e))?e.length>0:!1}var g={"=":`$eq`,"==":`$eq`,"!=":`$ne`,"<>":`$ne`,">":`$gt`,">=":`$gte`,"<":`$lt`,"<=":`$lte`,in:`$in`,nin:`$nin`,not_in:`$nin`,contains:`$contains`,notcontains:`$notContains`,not_contains:`$notContains`,like:`$contains`,startswith:`$startsWith`,starts_with:`$startsWith`,endswith:`$endsWith`,ends_with:`$endsWith`,between:`$between`,is_null:`$null`,is_not_null:`$null`};function _(e){let[t,n,r]=e,i=n.toLowerCase();if(i===`=`||i===`==`)return{[t]:r};if(i===`is_null`)return{[t]:{$null:!0}};if(i===`is_not_null`)return{[t]:{$null:!1}};let a=g[i];return a?{[t]:{[a]:r}}:{[t]:{[`$${i}`]:r}}}function v(e){if(e==null)return;if(!Array.isArray(e))return e;if(e.length===0)return;let t=e[0];if(typeof t==`string`&&(t.toLowerCase()===`and`||t.toLowerCase()===`or`)){let n=`$${t.toLowerCase()}`,r=e.slice(1).map(e=>v(e)).filter(Boolean);return r.length===0?void 0:r.length===1?r[0]:{[n]:r}}if(e.length>=2&&typeof t==`string`)return _(e);if(e.every(e=>Array.isArray(e))){let t=e.map(e=>v(e)).filter(Boolean);return t.length===0?void 0:t.length===1?t[0]:{$and:t}}}var y=[`$eq`,`$ne`,`$gt`,`$gte`,`$lt`,`$lte`,`$in`,`$nin`,`$between`,`$contains`,`$notContains`,`$startsWith`,`$endsWith`,`$null`,`$exists`],te=[`$and`,`$or`,`$not`],ne=[...y,...te],b=n(()=>t.z.object({field:t.z.string(),order:t.z.enum([`asc`,`desc`]).default(`asc`)})),x=t.z.enum([`count`,`sum`,`avg`,`min`,`max`,`count_distinct`,`array_agg`,`string_agg`]),S=t.z.enum([`day`,`week`,`month`,`quarter`,`year`]),C=n(()=>t.z.union([t.z.string(),t.z.object({field:t.z.string().describe(`Field to group by`),dateGranularity:S.optional().describe(`Bucket date values into uniform periods (day/week/month/quarter/year)`),alias:t.z.string().optional().describe(`Alias for the projected group value`)})])),w=n(()=>t.z.object({function:x.describe(`Aggregation function`),field:t.z.string().optional().describe(`Field to aggregate (optional for COUNT(*))`),alias:t.z.string().describe(`Result column alias`),distinct:t.z.boolean().optional().describe(`Apply DISTINCT before aggregation`),filter:f.optional().describe(`Filter/Condition to apply to the aggregation (FILTER WHERE clause)`)})),T=t.z.enum([`inner`,`left`,`right`,`full`]),re=t.z.enum([`auto`,`database`,`hash`,`loop`]),E=t.z.lazy(()=>t.z.object({type:T.describe(`Join type`),strategy:re.optional().describe(`Execution strategy hint`),object:t.z.string().describe(`Object/table to join`),alias:t.z.string().optional().describe(`Table alias`),on:f.describe(`Join condition`),subquery:t.z.lazy(()=>k).optional().describe(`Subquery instead of object`)})),ie=t.z.enum([`row_number`,`rank`,`dense_rank`,`percent_rank`,`lag`,`lead`,`first_value`,`last_value`,`sum`,`avg`,`count`,`min`,`max`]),D=n(()=>t.z.object({partitionBy:t.z.array(t.z.string()).optional().describe(`PARTITION BY fields`),orderBy:t.z.array(b).optional().describe(`ORDER BY specification`),frame:t.z.object({type:t.z.enum([`rows`,`range`]).optional(),start:t.z.string().optional().describe(`Frame start (e.g., "UNBOUNDED PRECEDING", "1 PRECEDING")`),end:t.z.string().optional().describe(`Frame end (e.g., "CURRENT ROW", "1 FOLLOWING")`)}).optional().describe(`Window frame specification`)})),ae=n(()=>t.z.object({function:ie.describe(`Window function name`),field:t.z.string().optional().describe(`Field to operate on (for aggregate window functions)`),alias:t.z.string().describe(`Result column alias`),over:D.describe(`Window specification (OVER clause)`)})),O=t.z.lazy(()=>t.z.union([t.z.string(),t.z.object({field:t.z.string(),fields:t.z.array(O).optional(),alias:t.z.string().optional()})])),oe=n(()=>t.z.object({query:t.z.string().describe(`Search query text`),fields:t.z.array(t.z.string()).optional().describe(`Fields to search in (if not specified, searches all text fields)`),fuzzy:t.z.boolean().optional().default(!1).describe(`Enable fuzzy matching (tolerates typos)`),operator:t.z.enum([`and`,`or`]).optional().default(`or`).describe(`Logical operator between terms`),boost:t.z.record(t.z.string(),t.z.number()).optional().describe(`Field-specific relevance boosting (field name -> boost factor)`),minScore:t.z.number().optional().describe(`Minimum relevance score threshold`),language:t.z.string().optional().describe(`Language for text analysis (e.g., "en", "zh", "es")`),highlight:t.z.boolean().optional().default(!1).describe(`Enable search result highlighting`)})),se=t.z.object({object:t.z.string().describe(`Object name (e.g. account)`),fields:t.z.array(O).optional().describe(`Fields to retrieve`),where:f.optional().describe(`Filtering criteria (WHERE)`),search:oe.optional().describe(`Full-text search configuration ($search parameter)`),orderBy:t.z.array(b).optional().describe(`Sorting instructions (ORDER BY)`),limit:t.z.number().optional().describe(`Max records to return (LIMIT)`),offset:t.z.number().optional().describe(`Records to skip (OFFSET)`),top:t.z.number().optional().describe(`Alias for limit (OData compatibility)`),cursor:t.z.record(t.z.string(),t.z.unknown()).optional().describe(`Cursor for keyset pagination`),joins:t.z.array(E).optional().describe(`Explicit Table Joins`),aggregations:t.z.array(w).optional().describe(`Aggregation functions`),groupBy:t.z.array(C).optional().describe("GROUP BY targets (strings or `{field, dateGranularity?}` objects for date bucketing)"),having:f.optional().describe(`HAVING clause for aggregation filtering`),windowFunctions:t.z.array(ae).optional().describe(`Window functions with OVER clause`),distinct:t.z.boolean().optional().describe(`SELECT DISTINCT flag`)}),k=n(()=>se.extend({expand:t.z.lazy(()=>t.z.record(t.z.string(),k)).optional().describe("Recursive relation loading map. Keys are lookup/master_detail field names; values are nested QueryAST objects that control select (`fields`) and filter (`where`, AND-merged with the batch $in), plus further expansion on the related object. The engine resolves expand via batch $in queries (driver-agnostic) with a default max depth of 3; per-parent `limit`/`offset`/`orderBy` are NOT applied on this path.")})),ce=[`today`,`yesterday`,`tomorrow`,`now`],le=[`current_week_start`,`current_week_end`,`current_month_start`,`current_month_end`,`current_quarter_start`,`current_quarter_end`,`current_year_start`,`current_year_end`,`last_week_start`,`last_week_end`,`last_month_start`,`last_month_end`,`last_quarter_start`,`last_quarter_end`,`last_year_start`,`last_year_end`,`next_week_start`,`next_week_end`,`next_month_start`,`next_month_end`,`next_quarter_start`,`next_quarter_end`,`next_year_start`,`next_year_end`],ue=[`week_start`,`week_end`,`month_start`,`month_end`,`quarter_start`,`quarter_end`,`year_start`,`year_end`],de=[...ce,...le,...ue],fe=/^(\d+)_(minutes?|hours?|days?|weeks?|months?|years?)_(ago|from_now)$/,pe=[`minute`,`hour`,`day`,`week`,`month`,`year`];function me(e){return de.includes(e)||fe.test(e)}function he(e){let t=e.match(fe);if(!t)return null;let n=t[2].replace(/s$/,``);return{n:parseInt(t[1],10),unit:n,direction:t[3]}}var ge=t.z.string().refine(me,{message:`Unknown date macro. Must be a fixed token (see DATE_MACRO_TOKENS) or match {N_<unit>_(ago|from_now)} where unit is one of: `+pe.join(`, `)}),_e=/^\$?\{([a-zA-Z0-9_]+)\}$/,ve=t.z.string().refine(e=>{let t=e.match(_e);return!!t&&me(t[1])},{message:`Not a recognised {date-macro} placeholder`}),ye={today:`Start of today (YYYY-MM-DD).`,yesterday:`Start of yesterday.`,tomorrow:`Start of tomorrow.`,now:`Current timestamp (full ISO).`,current_week_start:`Monday 00:00 of this week.`,current_week_end:`Sunday of this week.`,current_month_start:`1st of this month.`,current_month_end:`Last day of this month.`,current_quarter_start:`1st day of this quarter.`,current_quarter_end:`Last day of this quarter.`,current_year_start:`Jan 1 of this year.`,current_year_end:`Dec 31 of this year.`,last_week_start:`Monday of last week.`,last_week_end:`Sunday of last week.`,last_month_start:`1st of last month.`,last_month_end:`Last day of last month.`,last_quarter_start:`1st day of last quarter.`,last_quarter_end:`Last day of last quarter.`,last_year_start:`Jan 1 of last year.`,last_year_end:`Dec 31 of last year.`,next_week_start:`Monday of next week.`,next_week_end:`Sunday of next week.`,next_month_start:`1st of next month.`,next_month_end:`Last day of next month.`,next_quarter_start:`1st day of next quarter.`,next_quarter_end:`Last day of next quarter.`,next_year_start:`Jan 1 of next year.`,next_year_end:`Dec 31 of next year.`,week_start:`Alias for current_week_start.`,week_end:`Alias for current_week_end.`,month_start:`Alias for current_month_start.`,month_end:`Alias for current_month_end.`,quarter_start:`Alias for current_quarter_start.`,quarter_end:`Alias for current_quarter_end.`,year_start:`Alias for current_year_start.`,year_end:`Alias for current_year_end.`},be=n(()=>t.z.string().min(2,{message:`System identifier must be at least 2 characters`}).regex(/^[a-z][a-z0-9_.]*$/,{message:`System identifier must be lowercase, starting with a letter, and may contain letters, numbers, underscores, or dots (e.g., "user_profile" or "order.created")`}).describe(`System identifier (lowercase with underscores or dots)`)),A=n(()=>t.z.string().min(2,{message:`Identifier must be at least 2 characters`}).regex(/^[a-z][a-z0-9_]*$/,{message:`Identifier must be lowercase snake_case, starting with a letter, and may contain only letters, numbers, and underscores (e.g., "user_profile")`}).describe(`Snake case identifier (lowercase with underscores only)`));n(()=>t.z.string().min(3,{message:`Event name must be at least 3 characters`}).regex(/^[a-z][a-z0-9_.]*$/,{message:`Event name must be lowercase with dots for namespacing (e.g., "user.created", "order.paid")`}).describe(`Event name (lowercase with dot notation for namespacing)`));var xe=t.z.enum([`cel`,`js`,`cron`,`template`]),Se=t.z.object({rationale:t.z.string().optional(),generatedBy:t.z.string().optional()}),Ce=t.z.object({dialect:xe,source:t.z.string().min(1).optional(),ast:t.z.unknown().optional(),meta:Se.optional()}).refine(e=>e.source!==void 0||e.ast!==void 0,{message:"Expression requires at least one of `source` or `ast`"}),j=t.z.union([t.z.string().min(1).transform(e=>({dialect:`cel`,source:e})),Ce]);t.z.union([t.z.string().min(1).transform(e=>({dialect:`cron`,source:e})),Ce]);var we=t.z.union([t.z.string().min(1).transform(e=>({dialect:`template`,source:e})),Ce]),M=t.z.enum(`text.textarea.email.url.phone.password.secret.markdown.html.richtext.number.currency.percent.date.datetime.time.boolean.toggle.select.multiselect.radio.checkboxes.lookup.master_detail.tree.user.image.file.avatar.video.audio.formula.summary.autonumber.composite.repeater.record.location.address.code.json.color.rating.slider.signature.qrcode.progress.tags.vector`.split(`.`)),N=n(()=>t.z.object({label:t.z.string().describe(`Display label (human-readable, any case allowed)`),value:be.describe(`Stored value (lowercase machine identifier)`),color:t.z.string().optional().describe(`Color code for badges/charts`),default:t.z.boolean().optional().describe(`Is default option`),visibleWhen:j.optional().describe("Per-option visibility predicate (CEL) — option is offered only when TRUE (else omitted). Same env as field visibleWhen (record + current_user). e.g. P`record.country == 'cn'` or P`'admin' in current_user.roles`")})),Te=n(()=>t.z.object({latitude:t.z.number().min(-90).max(90).describe(`Latitude coordinate`),longitude:t.z.number().min(-180).max(180).describe(`Longitude coordinate`),altitude:t.z.number().optional().describe(`Altitude in meters`),accuracy:t.z.number().optional().describe(`Accuracy in meters`)})),Ee=n(()=>t.z.object({precision:t.z.number().int().min(0).max(10).default(2).describe(`Decimal precision (default: 2)`),currencyMode:t.z.enum([`dynamic`,`fixed`]).default(`dynamic`).describe(`Currency mode: dynamic (user selectable) or fixed (single currency)`),defaultCurrency:t.z.string().length(3).default(`CNY`).describe(`Default or fixed currency code (ISO 4217, e.g., USD, CNY, EUR)`)})),De=n(()=>t.z.object({value:t.z.number().describe(`Monetary amount`),currency:t.z.string().length(3).describe(`Currency code (ISO 4217)`)})),Oe=n(()=>t.z.object({street:t.z.string().optional().describe(`Street address`),city:t.z.string().optional().describe(`City name`),state:t.z.string().optional().describe(`State/Province`),postalCode:t.z.string().optional().describe(`Postal/ZIP code`),country:t.z.string().optional().describe(`Country name or code`),countryCode:t.z.string().optional().describe(`ISO country code (e.g., US, GB)`),formatted:t.z.string().optional().describe(`Formatted address string`)})),ke=n(()=>t.z.object({dimensions:t.z.number().int().min(1).max(1e4).describe(`Vector dimensionality (e.g., 1536 for OpenAI embeddings)`),distanceMetric:t.z.enum([`cosine`,`euclidean`,`dotProduct`,`manhattan`]).default(`cosine`).describe(`Distance/similarity metric for vector search`),normalized:t.z.boolean().default(!1).describe(`Whether vectors are normalized (unit length)`),indexed:t.z.boolean().default(!0).describe(`Whether to create a vector index for fast similarity search`),indexType:t.z.enum([`hnsw`,`ivfflat`,`flat`]).optional().describe(`Vector index algorithm (HNSW for high accuracy, IVFFlat for large datasets)`)})),Ae=n(()=>t.z.object({minSize:t.z.number().min(0).optional().describe(`Minimum file size in bytes`),maxSize:t.z.number().min(1).optional().describe(`Maximum file size in bytes (e.g., 10485760 = 10MB)`),allowedTypes:t.z.array(t.z.string()).optional().describe(`Allowed file extensions (e.g., [".pdf", ".docx", ".jpg"])`),blockedTypes:t.z.array(t.z.string()).optional().describe(`Blocked file extensions (e.g., [".exe", ".bat", ".sh"])`),allowedMimeTypes:t.z.array(t.z.string()).optional().describe(`Allowed MIME types (e.g., ["image/jpeg", "application/pdf"])`),blockedMimeTypes:t.z.array(t.z.string()).optional().describe(`Blocked MIME types`),virusScan:t.z.boolean().default(!1).describe(`Enable virus scanning for uploaded files`),virusScanProvider:t.z.enum([`clamav`,`virustotal`,`metadefender`,`custom`]).optional().describe(`Virus scanning service provider`),virusScanOnUpload:t.z.boolean().default(!0).describe(`Scan files immediately on upload`),quarantineOnThreat:t.z.boolean().default(!0).describe(`Quarantine files if threat detected`),storageProvider:t.z.string().optional().describe(`Object storage provider name (references ObjectStorageConfig)`),storageBucket:t.z.string().optional().describe(`Target bucket name`),storagePrefix:t.z.string().optional().describe(`Storage path prefix (e.g., "uploads/documents/")`),imageValidation:t.z.object({minWidth:t.z.number().min(1).optional().describe(`Minimum image width in pixels`),maxWidth:t.z.number().min(1).optional().describe(`Maximum image width in pixels`),minHeight:t.z.number().min(1).optional().describe(`Minimum image height in pixels`),maxHeight:t.z.number().min(1).optional().describe(`Maximum image height in pixels`),aspectRatio:t.z.string().optional().describe(`Required aspect ratio (e.g., "16:9", "1:1")`),generateThumbnails:t.z.boolean().default(!1).describe(`Auto-generate thumbnails`),thumbnailSizes:t.z.array(t.z.object({name:t.z.string().describe(`Thumbnail variant name (e.g., "small", "medium", "large")`),width:t.z.number().min(1).describe(`Thumbnail width in pixels`),height:t.z.number().min(1).describe(`Thumbnail height in pixels`),crop:t.z.boolean().default(!1).describe(`Crop to exact dimensions`)})).optional().describe(`Thumbnail size configurations`),preserveMetadata:t.z.boolean().default(!1).describe(`Preserve EXIF metadata`),autoRotate:t.z.boolean().default(!0).describe(`Auto-rotate based on EXIF orientation`)}).optional().describe(`Image-specific validation rules`),allowMultiple:t.z.boolean().default(!1).describe(`Allow multiple file uploads (overrides field.multiple)`),allowReplace:t.z.boolean().default(!0).describe(`Allow replacing existing files`),allowDelete:t.z.boolean().default(!0).describe(`Allow deleting uploaded files`),requireUpload:t.z.boolean().default(!1).describe(`Require at least one file when field is required`),extractMetadata:t.z.boolean().default(!0).describe(`Extract file metadata (name, size, type, etc.)`),extractText:t.z.boolean().default(!1).describe(`Extract text content from documents (OCR/parsing)`),versioningEnabled:t.z.boolean().default(!1).describe(`Keep previous versions of replaced files`),maxVersions:t.z.number().min(1).optional().describe(`Maximum number of versions to retain`),publicRead:t.z.boolean().default(!1).describe(`Allow public read access to uploaded files`),presignedUrlExpiry:t.z.number().min(60).max(604800).default(3600).describe(`Presigned URL expiration in seconds (default: 1 hour)`)}).refine(e=>!(e.minSize!==void 0&&e.maxSize!==void 0&&e.minSize>e.maxSize),{message:`minSize must be less than or equal to maxSize`}).refine(e=>!(e.virusScanProvider!==void 0&&e.virusScan!==!0),{message:`virusScanProvider requires virusScan to be enabled`})),je=n(()=>t.z.object({uniqueness:t.z.boolean().default(!1).describe(`Enforce unique values across all records`),completeness:t.z.number().min(0).max(1).default(0).describe(`Minimum ratio of non-null values (0-1, default: 0 = no requirement)`),accuracy:t.z.object({source:t.z.string().describe(`Reference data source for validation (e.g., "api.verify.com", "master_data")`),threshold:t.z.number().min(0).max(1).describe(`Minimum accuracy threshold (0-1, e.g., 0.95 = 95% match required)`)}).optional().describe(`Accuracy validation configuration`)})),Me=n(()=>t.z.object({enabled:t.z.boolean().describe(`Enable caching for computed field results`),ttl:t.z.number().min(0).describe(`Cache TTL in seconds (0 = no expiration)`),invalidateOn:t.z.array(t.z.string()).describe(`Field paths that invalidate cache (e.g., ["inventory.quantity", "pricing.base_price"])`)})),P=n(()=>t.z.object({name:t.z.string().regex(/^[a-z_][a-z0-9_]*$/).describe(`Machine name (snake_case)`).optional(),label:t.z.string().optional().describe(`Human readable label`),type:M.describe(`Field Data Type`),description:t.z.string().optional().describe(`Tooltip/Help text`),format:t.z.string().optional().describe(`Format string (e.g. email, phone)`),columnName:t.z.string().optional().describe(`Physical column name in the target datasource. Defaults to the field key when not set.`),required:t.z.boolean().default(!1).describe(`Is required`),searchable:t.z.boolean().default(!1).describe(`Is searchable`),multiple:t.z.boolean().default(!1).describe(`Allow multiple values (Stores as Array/JSON). Applicable for select, lookup, file, image.`),unique:t.z.boolean().default(!1).describe(`Is unique constraint`),defaultValue:t.z.unknown().optional().describe(`Default value`),maxLength:t.z.number().optional().describe(`Max character length`),minLength:t.z.number().optional().describe(`Min character length`),precision:t.z.number().optional().describe(`Total digits`),scale:t.z.number().optional().describe(`Decimal places`),min:t.z.number().optional().describe(`Minimum value`),max:t.z.number().optional().describe(`Maximum value`),options:t.z.array(N).optional().describe(`Static options for select/multiselect`),reference:t.z.string().optional().describe(`Target object name (snake_case) for lookup/master_detail fields. Required for relationship types. Used by $expand to resolve foreign key IDs into full objects.`),referenceFilters:t.z.array(t.z.string()).optional().describe(`Filters applied to lookup dialogs (e.g. "active = true")`),deleteBehavior:t.z.enum([`set_null`,`cascade`,`restrict`]).optional().default(`set_null`).describe(`What happens if referenced record is deleted`),inlineEdit:t.z.union([t.z.boolean(),t.z.enum([`grid`,`form`])]).optional().describe(`Edit these child records inline within the parent's form (atomic master-detail). true = auto-pick grid/form by child shape; 'grid' = editable line-item grid; 'form' = list + per-row full form.`),inlineTitle:t.z.string().optional().describe(`Title for the inline master-detail grid`),inlineColumns:t.z.array(t.z.any()).optional().describe(`Explicit columns for the inline grid (derived from the child object when omitted)`),inlineAmountField:t.z.string().optional().describe(`Numeric child field summed for the inline grid total`),relatedList:t.z.union([t.z.boolean(),t.z.literal(`primary`)]).optional().describe(`Show this child collection as a related list on the parent's detail page (read-side mirror of inlineEdit). false = suppress; true/absent = shown (stacked under the shared "Related" tab); 'primary' = core relationship, promoted to its own tab. Prominence intent, not a layout switch (ADR-0085).`),relatedListTitle:t.z.string().optional().describe(`Title for the detail-page related list`),relatedListColumns:t.z.array(t.z.any()).optional().describe(`Explicit columns for the detail-page related list (derived from the child object when omitted)`),displayField:t.z.string().optional().describe(`Field shown as each candidate's label in the picker/popover (defaults to the referenced object's name/title).`),descriptionField:t.z.string().optional().describe(`Secondary field shown under the label in the quick-select popover.`),lookupColumns:t.z.array(t.z.union([t.z.string(),t.z.object({field:t.z.string(),label:t.z.string().optional(),width:t.z.string().optional(),type:t.z.string().optional()})])).optional().describe(`Explicit columns for the record-picker table; auto-derived from the referenced object when omitted.`),lookupPageSize:t.z.number().int().positive().optional().describe(`Rows per page in the record-picker dialog (default 10).`),lookupFilters:t.z.array(t.z.object({field:t.z.string(),operator:t.z.enum([`eq`,`ne`,`gt`,`lt`,`gte`,`lte`,`contains`,`in`,`notIn`]),value:t.z.any()})).optional().describe(`Base filters restricting which records are selectable (e.g. only active). Structured, picker-honoured form of referenceFilters.`),dependsOn:t.z.array(t.z.union([t.z.string(),t.z.object({field:t.z.string(),param:t.z.string().optional()})])).optional().describe("Declares that this field's available values depend on the value of other field(s) on the same record — the form gates the field until they are set and re-evaluates as they change. For `lookup`/`master_detail` it scopes the candidate query (string = same local/remote key; {field,param} when the remote filter key differs — the {field,param} form is lookup-only). For `select`/`multiselect`/`radio` the actual per-option rule lives in each option's `visibleWhen`; list the referenced fields here (string form) so the option list gates and refreshes with the parent."),allowCreate:t.z.boolean().optional().describe(`Allow inline quick-create from the record picker: when no match exists the user can create a record from the typed text (optimistic dataSource.create with the display field). Best for simple objects whose only required field is the display field.`),expression:j.optional().describe("Formula expression (CEL). e.g. F`record.amount * 0.1`"),returnType:t.z.enum([`number`,`text`,`boolean`,`date`]).optional().describe(`Inferred value type of a formula field (number/text/boolean/date)`),summaryOperations:t.z.object({object:t.z.string().describe(`Source child object name for roll-up`),field:t.z.string().describe(`Field on child object to aggregate (ignored for count)`),function:t.z.enum([`count`,`sum`,`min`,`max`,`avg`]).describe(`Aggregation function to apply`),relationshipField:t.z.string().optional().describe(`FK field on the child pointing back to this parent. Auto-detected from the child's lookup/master_detail field referencing this object when omitted; set explicitly only when the child has more than one such reference.`)}).optional().describe(`Roll-up summary definition. The engine recomputes the value when child records are inserted/updated/deleted.`),language:t.z.string().optional().describe(`Programming language for syntax highlighting (e.g., javascript, python, sql)`),step:t.z.number().optional().describe(`Step increment for slider (default: 1)`),currencyConfig:Ee.optional().describe(`Configuration for currency field type`),dimensions:t.z.number().int().min(1).max(1e4).optional().describe(`Vector dimensionality (e.g., 1536 for OpenAI embeddings)`),vectorConfig:ke.optional().describe(`Configuration for vector field type (AI/ML embeddings)`),fileAttachmentConfig:Ae.optional().describe(`Configuration for file and attachment field types`),trackHistory:t.z.boolean().optional().describe(`Render this field's value changes as human-readable entries on the record activity timeline (ADR-0052 §5b). Opt-in per field.`),dependencies:t.z.array(t.z.string()).optional().describe(`Array of field names that this field depends on (for formulas, visibility rules, etc.)`),group:t.z.string().optional().describe(`Field group name for organizing fields in forms and layouts (e.g., "contact_info", "billing", "system")`),visibleWhen:j.optional().describe("Predicate (CEL) — field is shown only when TRUE (else hidden). e.g. P`record.type == 'invoice'`"),readonlyWhen:j.optional().describe("Predicate (CEL) — field is read-only when TRUE. e.g. P`record.status == 'paid'`"),requiredWhen:j.optional().describe("Predicate (CEL) — field is required when TRUE. Canonical name for `conditionalRequired`."),conditionalRequired:j.optional().describe("Predicate (CEL) — field is required when TRUE. Alias of `requiredWhen`."),hidden:t.z.boolean().default(!1).describe(`Hidden from default UI`),readonly:t.z.boolean().default(!1).describe(`Read-only in UI`),requiredPermissions:t.z.array(t.z.string()).optional().describe(`[ADR-0066 D3] Capabilities required to read/edit this field (mask on read, deny on write; AND-gate).`),system:t.z.boolean().optional().describe(`Auto-injected system/audit field (e.g. created_at, updated_by, organization_id). Tools that surface system fields separately from author-declared business fields should branch on this flag.`),sortable:t.z.boolean().optional().default(!0).describe(`Whether field is sortable in list views`),inlineHelpText:t.z.string().optional().describe(`Help text displayed below the field in forms`),autonumberFormat:t.z.string().optional().describe(`Auto-number format: literal text + {0000} counter, {YYYY}/{MM}/{DD}/{YYYYMMDD} date tokens (business tz), and {field_name} interpolation. Counter resets per rendered prefix (e.g. AD{YYYYMMDD}{0000} resets daily).`),index:t.z.boolean().default(!1).describe(`Create standard database index`),externalId:t.z.boolean().default(!1).describe(`Is external ID for upsert operations`)})),Ne={text:(e={})=>({type:`text`,...e}),textarea:(e={})=>({type:`textarea`,...e}),number:(e={})=>({type:`number`,...e}),boolean:(e={})=>({type:`boolean`,...e}),date:(e={})=>({type:`date`,...e}),datetime:(e={})=>({type:`datetime`,...e}),currency:(e={})=>({type:`currency`,...e}),percent:(e={})=>({type:`percent`,...e}),url:(e={})=>({type:`url`,...e}),email:(e={})=>({type:`email`,...e}),phone:(e={})=>({type:`phone`,...e}),image:(e={})=>({type:`image`,...e}),file:(e={})=>({type:`file`,...e}),avatar:(e={})=>({type:`avatar`,...e}),formula:(e={})=>({type:`formula`,...e}),summary:(e={})=>({type:`summary`,...e}),autonumber:(e={})=>({type:`autonumber`,...e}),markdown:(e={})=>({type:`markdown`,...e}),html:(e={})=>({type:`html`,...e}),password:(e={})=>({type:`password`,...e}),secret:(e={})=>({type:`secret`,...e}),select:(e,t)=>{let n=e=>e.toLowerCase().replace(/\s+/g,`_`).replace(/[^a-z0-9_]/g,``),r,i;if(Array.isArray(e))r=e.map(e=>typeof e==`string`?{label:e,value:n(e)}:{...e,value:e.value.toLowerCase()}),i=t||{};else{r=(e.options||[]).map(e=>typeof e==`string`?{label:e,value:n(e)}:{...e,value:e.value.toLowerCase()});let{options:t,...a}=e;i=a}return{type:`select`,options:r,...i}},lookup:(e,t={})=>({type:`lookup`,reference:e,...t}),masterDetail:(e,t={})=>({type:`master_detail`,reference:e,...t}),user:(e={})=>({type:`user`,reference:`sys_user`,...e}),location:(e={})=>({type:`location`,...e}),address:(e={})=>({type:`address`,...e}),richtext:(e={})=>({type:`richtext`,...e}),code:(e,t={})=>({type:`code`,language:e,...t}),color:(e={})=>({type:`color`,...e}),rating:(e=5,t={})=>({type:`rating`,max:e,...t}),signature:(e={})=>({type:`signature`,...e}),slider:(e={})=>({type:`slider`,...e}),qrcode:(e={})=>({type:`qrcode`,...e}),json:(e={})=>({type:`json`,...e}),vector:(e,t={})=>({type:`vector`,dimensions:e,...t})},F=t.z.object({name:t.z.string().regex(/^[a-z_][a-z0-9_]*$/).describe(`Unique rule name (snake_case)`),label:t.z.string().optional().describe(`Human-readable label for the rule listing`),description:t.z.string().optional().describe(`Administrative notes explaining the business reason`),active:t.z.boolean().default(!0),events:t.z.array(t.z.enum([`insert`,`update`,`delete`])).default([`insert`,`update`]).describe(`Validation contexts`),priority:t.z.number().int().min(0).max(9999).default(100).describe(`Execution priority (lower runs first, default: 100)`),tags:t.z.array(t.z.string()).optional().describe(`Categorization tags (e.g., "compliance", "billing")`),severity:t.z.enum([`error`,`warning`,`info`]).default(`error`),message:t.z.string().describe(`Error message to display to the user`)}),Pe=n(()=>F.extend({type:t.z.literal(`script`),condition:j.describe("Predicate (CEL). If TRUE, validation fails. e.g. P`record.amount < 0`")})),Fe=n(()=>F.extend({type:t.z.literal(`state_machine`),field:t.z.string().describe(`State field (e.g. status)`),transitions:t.z.record(t.z.string(),t.z.array(t.z.string())).describe(`Map of { OldState: [AllowedNewStates] }`)})),Ie=n(()=>F.extend({type:t.z.literal(`format`),field:t.z.string(),regex:t.z.string().optional(),format:t.z.enum([`email`,`url`,`phone`,`json`]).optional()})),Le=n(()=>F.extend({type:t.z.literal(`cross_field`),condition:j.describe("Predicate (CEL) comparing fields. e.g. P`record.end_date > record.start_date`"),fields:t.z.array(t.z.string()).describe(`Fields involved in the validation`)})),Re=n(()=>F.extend({type:t.z.literal(`json_schema`),field:t.z.string().describe(`JSON field to validate`),schema:t.z.record(t.z.string(),t.z.unknown()).describe(`JSON Schema object definition`)})),I=t.z.lazy(()=>t.z.discriminatedUnion(`type`,[Pe,Fe,Ie,Le,Re,ze])),ze=n(()=>F.extend({type:t.z.literal(`conditional`),when:j.describe("Predicate (CEL). e.g. P`record.type == 'enterprise'`"),then:I.describe(`Validation rule to apply when condition is true`),otherwise:I.optional().describe(`Validation rule to apply when condition is false`)}));n(()=>t.z.object({key:t.z.string().describe(`Translation key (e.g., "views.task_list.label")`),defaultValue:t.z.string().optional().describe(`Fallback value when translation key is not found`),params:t.z.record(t.z.string(),t.z.union([t.z.string(),t.z.number(),t.z.boolean()])).optional().describe(`Interpolation parameters (e.g., { count: 5 })`)}));var L=n(()=>t.z.string().describe(`Display label (plain string; i18n keys are auto-generated by the framework)`)),Be=n(()=>t.z.object({ariaLabel:L.optional().describe(`Accessible label for screen readers (WAI-ARIA aria-label)`),ariaDescribedBy:t.z.string().optional().describe(`ID of element providing additional description (WAI-ARIA aria-describedby)`),role:t.z.string().optional().describe(`WAI-ARIA role attribute (e.g., "dialog", "navigation", "alert")`)}).describe(`ARIA accessibility attributes`));n(()=>t.z.object({key:t.z.string().describe(`Translation key`),zero:t.z.string().optional().describe(`Zero form (e.g., "No items")`),one:t.z.string().optional().describe(`Singular form (e.g., "{count} item")`),two:t.z.string().optional().describe(`Dual form (e.g., "{count} items" for exactly 2)`),few:t.z.string().optional().describe(`Few form (e.g., for 2-4 in some languages)`),many:t.z.string().optional().describe(`Many form (e.g., for 5+ in some languages)`),other:t.z.string().describe(`Default plural form (e.g., "{count} items")`)}).describe(`ICU plural rules for a translation key`));var Ve=n(()=>t.z.object({style:t.z.enum([`decimal`,`currency`,`percent`,`unit`]).default(`decimal`).describe(`Number formatting style`),currency:t.z.string().optional().describe(`ISO 4217 currency code (e.g., "USD", "EUR")`),unit:t.z.string().optional().describe(`Unit for unit formatting (e.g., "kilometer", "liter")`),minimumFractionDigits:t.z.number().optional().describe(`Minimum number of fraction digits`),maximumFractionDigits:t.z.number().optional().describe(`Maximum number of fraction digits`),useGrouping:t.z.boolean().optional().describe(`Whether to use grouping separators (e.g., 1,000)`)}).describe(`Number formatting rules`)),He=n(()=>t.z.object({dateStyle:t.z.enum([`full`,`long`,`medium`,`short`]).optional().describe(`Date display style`),timeStyle:t.z.enum([`full`,`long`,`medium`,`short`]).optional().describe(`Time display style`),timeZone:t.z.string().optional().describe(`IANA time zone (e.g., "America/New_York")`),hour12:t.z.boolean().optional().describe(`Use 12-hour format`)}).describe(`Date/time formatting rules`));n(()=>t.z.object({code:t.z.string().describe(`BCP 47 language code (e.g., "en-US", "zh-CN")`),fallbackChain:t.z.array(t.z.string()).optional().describe(`Fallback language codes in priority order (e.g., ["zh-TW", "en"])`),direction:t.z.enum([`ltr`,`rtl`]).default(`ltr`).describe(`Text direction: left-to-right or right-to-left`),numberFormat:Ve.optional().describe(`Default number formatting rules`),dateFormat:He.optional().describe(`Default date/time formatting rules`)}).describe(`Locale configuration`));var Ue=t.z.enum([`api.read`,`api.write`,`api.transaction`,`crypto.uuid`,`crypto.hash`,`log`]),We=t.z.object({language:t.z.literal(`expression`),source:t.z.string().min(1).describe(`Formula expression source`)}).describe(`L1 expression body — pure formula, no IO`),Ge=t.z.object({language:t.z.literal(`js`),source:t.z.string().min(1).describe(`Function body source`),capabilities:t.z.array(Ue).default([]).describe(`Granted capability tokens`),timeoutMs:t.z.number().int().positive().max(3e4).optional().describe(`Per-invocation timeout (ms)`),memoryMb:t.z.number().int().positive().max(256).optional().describe(`Per-invocation memory cap (MB)`)}).describe(`L2 sandboxed JS body — runs inside an isolated VM with declared capabilities`),R=t.z.discriminatedUnion(`language`,[We,Ge]).describe(`Hook/Action body — expression (L1) or sandboxed JS (L2)`),Ke=n(()=>t.z.object({name:t.z.string().optional(),field:A.optional(),objectOverride:A.optional(),label:L.optional(),type:M.optional(),required:t.z.boolean().optional().default(!1),options:t.z.array(t.z.object({label:L,value:t.z.string()})).optional(),placeholder:t.z.string().optional(),helpText:t.z.string().optional(),defaultValue:t.z.unknown().optional(),defaultFromRow:t.z.boolean().optional()}).refine(e=>!!e.name||!!e.field,{message:`ActionParam requires either "name" or "field"`})),qe=t.z.enum([`script`,`url`,`modal`,`flow`,`api`,`form`]),Je=new Set(qe.options.filter(e=>e!==`script`)),Ye=t.z.enum([`list_toolbar`,`list_item`,`record_header`,`record_more`,`record_related`,`record_section`,`global_nav`]),Xe=t.z.enum([`data`,`action`,`flow`,`integration`,`vector_search`,`analytics`,`utility`]),Ze=t.z.object({exposed:t.z.boolean().default(!1).describe("Expose this action to AI agents. Requires `description` when true."),description:t.z.string().min(40).optional().describe(`LLM-facing description (≥40 chars). Required when exposed.`),category:Xe.optional().describe(`Tool category override (defaults to "action").`),paramHints:t.z.record(t.z.string(),t.z.object({description:t.z.string().optional(),enum:t.z.array(t.z.union([t.z.string(),t.z.number()])).optional(),examples:t.z.array(t.z.unknown()).optional()})).optional().describe(`Per-parameter AI hints keyed by param name.`),outputSchema:t.z.record(t.z.string(),t.z.unknown()).optional().describe(`JSON Schema for the action return value.`),requiresConfirmation:t.z.boolean().optional().describe(`Override HITL confirmation for AI invocations.`)}),Qe=n(()=>t.z.object({name:A.describe(`Machine name (lowercase snake_case)`),label:L.describe(`Display label`),objectName:t.z.string().regex(/^[a-z_][a-z0-9_]*$/).optional().describe(`Target object this action belongs to. When set, the action is auto-merged into the object's actions array by defineStack().`),icon:t.z.string().optional().describe(`Icon name`),locations:t.z.array(Ye).optional().describe(`Locations where this action is visible`),component:t.z.enum([`action:button`,`action:icon`,`action:menu`,`action:group`]).optional().describe(`Visual component override`),type:qe.default(`script`).describe(`Action functionality type`),target:t.z.string().optional().describe("URL, Script Name, Flow ID, or API Endpoint. Supports ${param.X} and ${ctx.X} interpolation."),openIn:t.z.enum([`self`,`new-tab`]).optional().describe("For type:'url' — where to open `target`. 'new-tab' opens a new browser tab; 'self' navigates in place. When omitted, external/absolute URLs open in a new tab and relative URLs navigate in place. Static execution option — keep it OUT of `params` (which is user-input-collection only)."),body:R.optional().describe("Action body — expression (L1) or sandboxed JS (L2). Only used when type is `script`."),execute:t.z.string().optional().describe(`@deprecated — Use target instead. Auto-migrated to target during parsing.`),params:t.z.array(Ke).optional().describe(`Input parameters required from user`),variant:t.z.enum([`primary`,`secondary`,`danger`,`ghost`,`link`]).optional().describe(`Button visual variant for styling (primary = highlighted, danger = destructive, ghost = transparent)`),confirmText:L.optional().describe(`Confirmation message before execution`),successMessage:L.optional().describe(`Success message to show after execution`),errorMessage:L.optional().describe(`Error message to show when the action fails (overrides the raw error).`),refreshAfter:t.z.boolean().default(!1).describe(`Refresh view after execution`),undoable:t.z.boolean().optional().describe(`Offer an Undo affordance after this single-record update action succeeds.`),resultDialog:t.z.object({title:L.optional(),description:L.optional(),acknowledge:L.optional().describe(`Acknowledge button label, e.g. "I have saved this"`),format:t.z.enum([`qrcode`,`code-list`,`secret`,`text`,`json`]).optional().describe(`Default format for fields without their own format. Defaults to json when omitted.`),fields:t.z.array(t.z.object({path:t.z.string().describe(`Dot path into result.data (e.g. "totpURI", "client.client_secret").`),label:L.optional(),format:t.z.enum([`qrcode`,`code-list`,`secret`,`text`,`json`]).optional().describe(`Per-field format override.`)})).optional().describe(`Which fields from result.data to render. Omit to dump full JSON.`)}).optional().describe(`Render API response in a one-shot reveal dialog (suppresses successMessage when set).`),visible:j.optional().describe(`Visibility predicate (CEL).`),disabled:t.z.union([t.z.boolean(),j]).optional().describe(`Boolean or predicate (CEL) — action is disabled when TRUE.`),requiredPermissions:t.z.array(t.z.string()).optional().describe(`[ADR-0066 D4] Capabilities required to invoke this action (server-enforced 403 + UI hide/disable).`),shortcut:t.z.string().optional().describe(`Keyboard shortcut to trigger this action (e.g., "Ctrl+S")`),bulkEnabled:t.z.boolean().optional().describe(`Whether this action can be applied to multiple selected records`),ai:Ze.optional().describe(`AI exposure (opt-in). Set ai.exposed=true + ai.description to make this callable by agents.`),recordIdParam:t.z.string().optional().describe(`Body key to inject the row id into when running from a list_item context.`),recordIdField:t.z.string().optional().describe(`Row field whose value seeds recordIdParam. Defaults to "id".`),bodyShape:t.z.union([t.z.literal(`flat`),t.z.object({wrap:t.z.string()})]).optional().describe(`Body wrapping: flat (default) or { wrap: key } to nest user-collected params under a key.`),method:t.z.enum([`POST`,`PATCH`,`PUT`,`DELETE`]).optional().describe(`HTTP method for type:"api" actions. Defaults to POST.`),bodyExtra:t.z.record(t.z.string(),t.z.unknown()).optional().describe(`Constant body fields merged into the API request (applied last; overrides user params).`),mode:t.z.enum([`create`,`edit`,`delete`,`custom`]).optional().describe(`Semantic mode of the action.`),opensInNewTab:t.z.boolean().optional().describe(`Open the action result in a new tab. The renderer pre-opens the tab synchronously on click (popup-blocker-safe) and navigates it to the handler's redirectUrl.`),newTabUrl:t.z.string().optional().describe(`Direct new-tab URL template ({recordId} placeholder). When set with opensInNewTab, the renderer navigates the pre-opened tab here immediately — no action POST. The endpoint must enforce auth itself.`),timeout:t.z.number().optional().describe(`Maximum execution time in milliseconds for the action`),aria:Be.optional().describe(`ARIA accessibility attributes`)}).transform(e=>e.execute&&!e.target?{...e,target:e.execute}:e).refine(e=>!(Je.has(e.type)&&!e.target),{message:`Action 'target' is required when type is 'url', 'flow', 'modal', 'api', or 'form'.`,path:[`target`]}).refine(e=>!(e.type===`script`&&!e.body&&!e.target),{message:"A 'script' action requires either an inline `body` (sandboxed L1/L2 handler) or a `target` (a registered bundle function name).",path:[`body`]}).refine(e=>!(e.ai?.exposed===!0&&!e.ai.description),{message:`ai.description is required (≥40 chars) when ai.exposed is true.`,path:[`ai`,`description`]}).refine(e=>{let t=e.ai?.paramHints;if(!t)return!0;let n=new Set([`recordId`]);for(let t of e.params??[]){let e=t.name??t.field;e&&n.add(e)}return Object.keys(t).every(e=>n.has(e))},{message:`ai.paramHints keys must match a declared param name (or "recordId").`,path:[`ai`,`paramHints`]})),$e=t.z.enum([`none`,`no-overlay`,`no-delete`,`full`]),et=t.z.enum([`artifact`,`package`,`env-forced`]),tt=t.z.enum([`package`,`org`,`env-forced`]),z={_lock:$e.optional().describe(`Item-level lock — controls overlay & delete (ADR-0010).`),_lockReason:t.z.string().max(500).optional().describe(`Human-readable reason shown when a write is refused by _lock.`),_lockSource:et.optional().describe(`Layer that set _lock (artifact | package | env-forced).`),_provenance:tt.optional().describe(`Origin of the item (package | org | env-forced).`),_packageId:t.z.string().optional().describe(`Owning package machine id.`),_packageVersion:t.z.string().optional().describe(`Owning package version.`),_lockDocsUrl:t.z.string().optional().describe(`Optional documentation link surfaced next to _lockReason.`)},B=t.z.object({lock:$e.describe(`Lock policy — none | no-overlay | no-delete | full.`),reason:t.z.string().min(1).max(500).describe(`User-visible reason shown when the lock blocks an action.`),docsUrl:t.z.string().url().optional().describe(`Optional URL the Studio banner links to for more context.`)}).strict(),nt=n(()=>t.z.object({enabled:t.z.boolean().default(!1).describe(`Enable public sharing`),publicLink:t.z.string().optional().describe(`Generated public share URL`),password:t.z.string().optional().describe(`Password required to access shared link`),allowedDomains:t.z.array(t.z.string()).optional().describe(`Restrict access to specific email domains (e.g. ["example.com"])`),expiresAt:t.z.string().optional().describe(`Expiration date/time in ISO 8601 format`),allowAnonymous:t.z.boolean().optional().default(!1).describe(`Allow access without authentication`)}));n(()=>t.z.object({enabled:t.z.boolean().default(!1).describe(`Enable iframe embedding`),allowedOrigins:t.z.array(t.z.string()).optional().describe(`Allowed iframe parent origins (e.g. ["https://example.com"])`),width:t.z.string().optional().default(`100%`).describe(`Embed width (CSS value)`),height:t.z.string().optional().default(`600px`).describe(`Embed height (CSS value)`),showHeader:t.z.boolean().optional().default(!0).describe(`Show interface header in embed`),showNavigation:t.z.boolean().optional().default(!1).describe(`Show navigation in embed`),responsive:t.z.boolean().optional().default(!0).describe(`Enable responsive resizing`)}));var rt=t.z.enum([`xs`,`sm`,`md`,`lg`,`xl`,`2xl`]),it=n(()=>t.z.object({xs:t.z.number().min(1).max(12).optional(),sm:t.z.number().min(1).max(12).optional(),md:t.z.number().min(1).max(12).optional(),lg:t.z.number().min(1).max(12).optional(),xl:t.z.number().min(1).max(12).optional(),"2xl":t.z.number().min(1).max(12).optional()}).describe(`Grid columns per breakpoint (1-12)`)),at=n(()=>t.z.object({xs:t.z.number().optional(),sm:t.z.number().optional(),md:t.z.number().optional(),lg:t.z.number().optional(),xl:t.z.number().optional(),"2xl":t.z.number().optional()}).describe(`Display order per breakpoint`)),ot=n(()=>t.z.object({breakpoint:rt.optional().describe(`Minimum breakpoint for visibility`),hiddenOn:t.z.array(rt).optional().describe(`Hide on these breakpoints`),columns:it.optional().describe(`Grid columns per breakpoint`),order:at.optional().describe(`Display order per breakpoint`)}).describe(`Responsive layout configuration`)),V=n(()=>t.z.record(t.z.string(),t.z.union([t.z.string(),t.z.number()])).describe(`CSS property → value map (camelCase keys; design tokens encouraged)`));n(()=>t.z.object({large:V.optional().describe(`Unconditional base (desktop-first)`),medium:V.optional().describe(`Applied at ≤ medium breakpoint`),small:V.optional().describe(`Applied at ≤ small breakpoint`),xsmall:V.optional().describe(`Applied at ≤ xsmall breakpoint`)}).describe(`Per-breakpoint scoped style maps (ADR-0065)`));var st=n(()=>t.z.object({lazyLoad:t.z.boolean().optional().describe(`Enable lazy loading (defer rendering until visible)`),virtualScroll:t.z.object({enabled:t.z.boolean().default(!1).describe(`Enable virtual scrolling`),itemHeight:t.z.number().optional().describe(`Fixed item height in pixels (for estimation)`),overscan:t.z.number().optional().describe(`Number of extra items to render outside viewport`)}).optional().describe(`Virtual scrolling configuration`),cacheStrategy:t.z.enum([`none`,`cache-first`,`network-first`,`stale-while-revalidate`]).optional().describe(`Client-side data caching strategy`),prefetch:t.z.boolean().optional().describe(`Prefetch data before component is visible`),pageSize:t.z.number().optional().describe(`Number of items per page for pagination`),debounceMs:t.z.number().optional().describe(`Debounce interval for user interactions in milliseconds`)}).describe(`Performance optimization configuration`)),ct=t.z.enum([`GET`,`POST`,`PUT`,`DELETE`,`PATCH`,`HEAD`,`OPTIONS`]),lt=n(()=>t.z.enum([`GET`,`POST`,`PUT`,`PATCH`,`DELETE`])),ut=n(()=>t.z.object({url:t.z.string().describe(`API endpoint URL`),method:lt.optional().default(`GET`).describe(`HTTP method`),headers:t.z.record(t.z.string(),t.z.string()).optional().describe(`Custom HTTP headers`),params:t.z.record(t.z.string(),t.z.unknown()).optional().describe(`Query parameters`),body:t.z.unknown().optional().describe(`Request body for POST/PUT/PATCH`)}));n(()=>t.z.object({enabled:t.z.boolean().default(!0).describe(`Enable CORS`),origins:t.z.union([t.z.string(),t.z.array(t.z.string())]).default(`*`).describe(`Allowed origins (* for all)`),methods:t.z.array(ct).optional().describe(`Allowed HTTP methods`),credentials:t.z.boolean().default(!1).describe(`Allow credentials (cookies, authorization headers)`),maxAge:t.z.number().int().optional().describe(`Preflight cache duration in seconds`)})),n(()=>t.z.object({enabled:t.z.boolean().default(!1).describe(`Enable rate limiting`),windowMs:t.z.number().int().default(6e4).describe(`Time window in milliseconds`),maxRequests:t.z.number().int().default(100).describe(`Max requests per window`)})),n(()=>t.z.object({path:t.z.string().describe(`URL path to serve from`),directory:t.z.string().describe(`Physical directory to serve`),cacheControl:t.z.string().optional().describe(`Cache-Control header value`)}));var dt=n(()=>t.z.discriminatedUnion(`provider`,[t.z.object({provider:t.z.literal(`object`),object:t.z.string().describe(`Target object name`)}),t.z.object({provider:t.z.literal(`api`),read:ut.optional().describe(`Configuration for fetching data`),write:ut.optional().describe(`Configuration for submitting data (for forms/editable tables)`)}),t.z.object({provider:t.z.literal(`value`),items:t.z.array(t.z.unknown()).describe(`Static data array`)}),t.z.object({provider:t.z.literal(`schema`),schemaId:t.z.string().describe(`Schema identifier — typically the metadata type name`),schema:t.z.record(t.z.string(),t.z.unknown()).optional().describe(`Inline JSON Schema (Draft 2020-12). Optional when schemaId is resolvable.`)})])),ft=n(()=>t.z.object({field:t.z.string().describe(`Field name to filter on`),operator:t.z.string().describe(`Filter operator (e.g. equals, not_equals, contains, this_quarter)`),value:t.z.union([t.z.string(),t.z.number(),t.z.boolean(),t.z.null(),t.z.array(t.z.union([t.z.string(),t.z.number()]))]).optional().describe(`Filter value`)}).describe(`View filter rule`)),pt=n(()=>t.z.enum([`none`,`count`,`count_empty`,`count_filled`,`count_unique`,`percent_empty`,`percent_filled`,`sum`,`avg`,`min`,`max`]).describe(`Aggregation function for column footer summary`)),mt=n(()=>t.z.object({field:t.z.string().describe(`Field name (snake_case)`),label:L.optional().describe(`Display label override`),width:t.z.number().positive().optional().describe(`Column width in pixels`),align:t.z.enum([`left`,`center`,`right`]).optional().describe(`Text alignment`),hidden:t.z.boolean().optional().describe(`Hide column by default`),sortable:t.z.boolean().optional().describe(`Allow sorting by this column`),resizable:t.z.boolean().optional().describe(`Allow resizing this column`),wrap:t.z.boolean().optional().describe(`Allow text wrapping`),type:t.z.string().optional().describe(`Renderer type override (e.g., "currency", "date")`),pinned:t.z.enum([`left`,`right`]).optional().describe(`Pin/freeze column to left or right side`),summary:pt.optional().describe(`Footer aggregation function for this column`),link:t.z.boolean().optional().describe(`Functions as the primary navigation link (triggers View navigation)`),action:t.z.string().optional().describe(`Registered Action ID to execute when clicked`)})),ht=n(()=>t.z.object({type:t.z.enum([`none`,`single`,`multiple`]).default(`none`).describe(`Selection mode`)})),gt=n(()=>t.z.object({pageSize:t.z.number().int().positive().default(25).describe(`Number of records per page`),pageSizeOptions:t.z.array(t.z.number().int().positive()).optional().describe(`Available page size options`)})),_t=n(()=>t.z.enum([`compact`,`short`,`medium`,`tall`,`extra_tall`]).describe(`Row height / density setting for list view`)),vt=n(()=>t.z.object({field:t.z.string().describe(`Field name to group by`),order:t.z.enum([`asc`,`desc`]).default(`asc`).describe(`Group sort order`),collapsed:t.z.boolean().default(!1).describe(`Collapse groups by default`)})),yt=n(()=>t.z.object({fields:t.z.array(vt).min(1).describe(`Fields to group by (supports up to 3 levels)`)}).describe(`Record grouping configuration`)),bt=n(()=>t.z.object({coverField:t.z.string().optional().describe(`Attachment/image field to display as card cover`),coverFit:t.z.enum([`cover`,`contain`]).default(`cover`).describe(`Image fit mode for card cover`),cardSize:t.z.enum([`small`,`medium`,`large`]).default(`medium`).describe(`Card size in gallery view`),titleField:t.z.string().optional().describe(`Field to display as card title`),visibleFields:t.z.array(t.z.string()).optional().describe(`Fields to display on card body`)}).describe(`Gallery/card view configuration`)),xt=n(()=>t.z.object({startDateField:t.z.string().describe(`Field for timeline item start date`),endDateField:t.z.string().optional().describe(`Field for timeline item end date`),titleField:t.z.string().describe(`Field to display as timeline item title`),groupByField:t.z.string().optional().describe(`Field to group timeline rows`),colorField:t.z.string().optional().describe(`Field to determine item color`),scale:t.z.enum([`hour`,`day`,`week`,`month`,`quarter`,`year`]).default(`week`).describe(`Default timeline scale`)}).describe(`Timeline view configuration`)),St=n(()=>t.z.object({type:t.z.enum([`personal`,`collaborative`]).default(`collaborative`).describe(`View ownership type`),lockedBy:t.z.string().optional().describe(`User who locked the view configuration`)}).describe(`View sharing and access configuration`)),Ct=n(()=>t.z.object({field:t.z.string().describe(`Field to derive color from (typically a select/status field)`),colors:t.z.record(t.z.string(),t.z.string()).optional().describe(`Map of field value to color (hex/token)`)}).describe(`Row color configuration based on field values`)),wt=n(()=>t.z.enum([`grid`,`kanban`,`gallery`,`calendar`,`timeline`,`gantt`,`map`,`chart`,`tree`]).describe(`Visualization type that users can switch to`)),Tt=n(()=>t.z.object({sort:t.z.boolean().default(!0).describe(`Allow users to sort records`),search:t.z.boolean().default(!0).describe(`Allow users to search records`),filter:t.z.boolean().default(!0).describe(`Allow users to filter records`),rowHeight:t.z.boolean().default(!0).describe(`Allow users to toggle row height/density`),addRecordForm:t.z.boolean().default(!1).describe(`Add records through a form instead of inline`),editInline:t.z.boolean().default(!1).describe(`Allow users to edit records inline — click a cell to edit it with the field's type-aware widget (the same control the form uses). Off by default: the list is read-only unless the author opts in.`),buttons:t.z.array(t.z.string()).optional().describe(`Custom action button IDs to show in the toolbar`)}).describe(`User action toggles for the view toolbar`)),Et=n(()=>t.z.object({showDescription:t.z.boolean().default(!0).describe(`Show the view description text`),allowedVisualizations:t.z.array(wt).optional().describe(`Whitelist of visualization types users can switch between (e.g. ["grid", "gallery", "kanban"])`)}).describe(`Appearance and visualization configuration`)),Dt=n(()=>t.z.object({name:A.describe(`Tab identifier (snake_case)`),label:L.optional().describe(`Display label`),icon:t.z.string().optional().describe(`Tab icon name`),view:t.z.string().optional().describe(`Referenced list view name from listViews`),filter:t.z.array(ft).optional().describe(`Tab-specific filter criteria`),order:t.z.number().int().min(0).optional().describe(`Tab display order`),pinned:t.z.boolean().default(!1).describe(`Pin tab (cannot be removed by users)`),isDefault:t.z.boolean().default(!1).describe(`Set as the default active tab`),visible:t.z.boolean().default(!0).describe(`Tab visibility`)}).describe(`Tab configuration for multi-tab view interface`)),Ot=n(()=>t.z.object({field:t.z.string().describe(`Field name on the source object (must exist — checked by reference diagnostics)`),label:L.optional().describe(`Display label override (defaults to the field label)`),type:t.z.enum([`select`,`multi-select`,`boolean`,`date-range`,`text`]).optional().describe(`Filter control type. Omit to infer from the field definition`),options:t.z.array(t.z.object({value:t.z.union([t.z.string(),t.z.number(),t.z.boolean()]).describe(`Option value`),label:L.describe(`Option label`),color:t.z.string().optional().describe(`Option color token/hex`)})).optional().describe(`Static options. Omit to derive from the field definition (select options / lookup records)`),showCount:t.z.boolean().optional().describe(`Show per-option record counts`),defaultValues:t.z.array(t.z.union([t.z.string(),t.z.number(),t.z.boolean()])).optional().describe(`Pre-selected values when the view loads`)}).describe(`Quick-filter field configuration`)),kt=n(()=>t.z.object({element:t.z.enum([`dropdown`,`tabs`,`toggle`]).default(`dropdown`).describe(`Filter control style: "dropdown" (per-field value selectors) or "tabs" (named presets). "toggle" is deprecated.`),fields:t.z.array(Ot).optional().describe(`Fields exposed as quick filters (dropdown/toggle elements)`),tabs:t.z.array(Dt).optional().describe(`Named filter presets rendered as tabs (tabs element). Reuses ViewTabSchema`),showAllRecords:t.z.boolean().optional().describe(`Show an "All records" tab before the presets (tabs element)`)}).describe(`End-user quick-filter configuration (Airtable "User filters" parity)`)),At=n(()=>t.z.object({enabled:t.z.boolean().default(!0).describe(`Show the add record entry point`),position:t.z.enum([`top`,`bottom`,`both`]).default(`bottom`).describe(`Position of the add record button`),mode:t.z.enum([`inline`,`form`,`modal`]).default(`inline`).describe(`How to add a new record`),formView:t.z.string().optional().describe(`Named form view to use when mode is "form" or "modal"`)}).describe(`Add record entry point configuration`)),jt=n(()=>t.z.object({groupByField:t.z.string().describe(`Field to group columns by (usually status/select)`),summarizeField:t.z.string().optional().describe(`Field to sum at top of column (e.g. amount)`),columns:t.z.array(t.z.string()).describe(`Fields to show on cards`)})),Mt=n(()=>t.z.object({chartType:t.z.enum([`bar`,`line`,`pie`,`area`,`scatter`]).default(`bar`).describe(`Chart visualisation type`),dataset:A.describe(`Dataset name to bind (ADR-0021)`),dimensions:t.z.array(t.z.string()).optional().describe(`Dimension names — X/group/split`),values:t.z.array(t.z.string()).min(1).describe(`Measure names — Y (at least one)`)}).describe(`List chart view configuration`)),Nt=n(()=>t.z.object({startDateField:t.z.string(),endDateField:t.z.string().optional(),titleField:t.z.string(),colorField:t.z.string().optional()})),Pt=n(()=>t.z.object({field:t.z.string().describe(`Record field / dot-path the dimension filters on`),label:t.z.string().optional().describe(`Trigger label (falls back to the field label)`),options:t.z.array(t.z.union([t.z.string(),t.z.object({value:t.z.union([t.z.string(),t.z.number()]),label:t.z.string().optional()})])).optional().describe(`Explicit option override for fixed enums`)})),Ft=n(()=>t.z.object({startDateField:t.z.string(),endDateField:t.z.string(),titleField:t.z.string(),progressField:t.z.string().optional(),dependenciesField:t.z.string().optional(),colorField:t.z.string().optional().describe(`Field that drives the bar color`),parentField:t.z.string().optional().describe(`Field holding the parent task id (builds the summary → step tree)`),typeField:t.z.string().optional().describe(`Field whose value maps to task/summary/milestone`),baselineStartField:t.z.string().optional().describe(`Baseline (planned) start field`),baselineEndField:t.z.string().optional().describe(`Baseline (planned) end field`),groupByField:t.z.string().optional().describe(`Field to group leaf tasks by (synthesized summary rows)`),resourceView:t.z.boolean().optional().describe(`Render a per-resource workload histogram instead of the timeline`),assigneeField:t.z.string().optional().describe(`Resource field to bucket load by (resource view)`),effortField:t.z.string().optional().describe(`Per-task load units (resource view; default 1)`),capacity:t.z.number().optional().describe(`Per-resource capacity ceiling; loads above this flag overload`),tooltipFields:t.z.array(t.z.union([t.z.string(),t.z.object({field:t.z.string(),label:t.z.string().optional()})])).optional().describe(`Fields to surface in the hover tooltip, in display order`),quickFilters:t.z.array(Pt).optional().describe(`Multi-select filter dropdowns rendered above the chart`),autoZoomToFilter:t.z.boolean().optional().describe(`When true (default), filtering zooms the range to the filtered tasks`)}).passthrough()),It=n(()=>t.z.object({parentField:t.z.string().optional().describe(`Single-parent pointer field (auto-detected from the object schema when omitted)`),labelField:t.z.string().optional().describe(`Field rendered indented in the first column (defaults to "name")`),fields:t.z.array(t.z.string()).optional().describe(`Additional fields rendered as flat columns alongside the label`),defaultExpandedDepth:t.z.number().int().min(0).optional().describe(`Initial expansion depth (0 = roots only; omit = expand all)`)}).passthrough()),Lt=n(()=>t.z.enum([`page`,`drawer`,`modal`,`split`,`popover`,`new_window`,`none`])),Rt=n(()=>t.z.object({mode:Lt.default(`page`),view:t.z.string().optional().describe(`Name of the form view to use for details (e.g. "summary_view", "edit_form")`),preventNavigation:t.z.boolean().default(!1).describe(`Disable standard navigation entirely`),openNewTab:t.z.boolean().default(!1).describe(`Force open in new tab (applies to page mode)`),size:t.z.enum([`auto`,`sm`,`md`,`lg`,`xl`,`full`]).default(`auto`).describe("[#2578] Overlay size bucket for drawer/modal detail: 'auto' (default — renderer derives from field count + viewport; AI writes nothing) or a coarse override sm/md/lg/xl/full. Prefer this over the pixel `width`; page mode ignores it."),width:t.z.union([t.z.string(),t.z.number()]).optional().describe('[DEPRECATED → size] Pixel/percent width of the drawer/modal (e.g. "600px"). A pixel width cannot be chosen at authoring time without knowing the client viewport — use the `size` bucket.')})),zt=n(()=>t.z.object({name:A.optional().describe(`Internal view name (lowercase snake_case)`),label:L.optional(),type:t.z.enum([`grid`,`kanban`,`gallery`,`calendar`,`timeline`,`gantt`,`map`,`chart`,`tree`]).default(`grid`),data:dt.optional().describe(`Data source configuration (defaults to "object" provider)`),columns:t.z.union([t.z.array(t.z.string()),t.z.array(mt)]).describe(`Fields to display as columns`),filter:t.z.array(ft).optional().describe(`Filter criteria (JSON Rules)`),sort:t.z.union([t.z.string(),t.z.array(t.z.object({field:t.z.string(),order:t.z.enum([`asc`,`desc`])}))]).optional(),searchableFields:t.z.array(t.z.string()).optional().describe(`Fields enabled for search`),filterableFields:t.z.array(t.z.string()).optional().describe(`Legacy shorthand for userFilters.fields — bare field names enabled for end-user filtering. Prefer userFilters`),userFilters:kt.optional().describe(`End-user quick-filter bar: dropdown/toggle fields or tab presets. Omit to let the renderer derive filters from select/boolean fields`),resizable:t.z.boolean().optional().describe(`Enable column resizing`),striped:t.z.boolean().optional().describe(`Striped row styling`),bordered:t.z.boolean().optional().describe(`Show borders`),compactToolbar:t.z.boolean().optional().describe(`Collapse Group/Color/Density/Hide-fields into a single View settings popover`),selection:ht.optional().describe(`Row selection configuration`),navigation:Rt.optional().describe(`Configuration for item click navigation (page, drawer, modal, etc.)`),pagination:gt.optional().describe(`Pagination configuration`),kanban:jt.optional(),calendar:Nt.optional(),gantt:Ft.optional(),gallery:bt.optional(),timeline:xt.optional(),chart:Mt.optional(),tree:It.optional(),description:L.optional().describe(`View description for documentation/tooltips`),sharing:St.optional().describe(`View sharing and access configuration`),rowHeight:_t.optional().describe(`Row height / density setting`),grouping:yt.optional().describe(`Group records by one or more fields`),rowColor:Ct.optional().describe(`Color rows based on field value`),hiddenFields:t.z.array(t.z.string()).optional().describe(`Fields to hide in this specific view`),fieldOrder:t.z.array(t.z.string()).optional().describe(`Explicit field display order for this view`),rowActions:t.z.array(t.z.string()).optional().describe(`Actions available for individual row items`),bulkActions:t.z.array(t.z.string()).optional().describe(`Actions available when multiple rows are selected`),bulkActionDefs:t.z.array(t.z.record(t.z.string(),t.z.any())).optional().describe(`Rich bulk action definitions (schema-driven, executed via BulkActionDialog)`),virtualScroll:t.z.boolean().optional().describe(`Enable virtual scrolling for large datasets`),conditionalFormatting:t.z.array(t.z.object({condition:j.describe(`Predicate (CEL) to evaluate.`),style:t.z.record(t.z.string(),t.z.string()).describe(`CSS styles to apply when condition is true`)})).optional().describe(`Conditional formatting rules for list rows`),inlineEdit:t.z.boolean().optional().describe(`Allow inline editing of records directly in the list view`),exportOptions:t.z.array(t.z.enum([`csv`,`xlsx`,`pdf`,`json`])).optional().describe(`Available export format options`),userActions:Tt.optional().describe(`User action toggles for the view toolbar`),appearance:Et.optional().describe(`Appearance and visualization configuration`),tabs:t.z.array(Dt).optional().describe(`Tab definitions for multi-tab view interface`),addRecord:At.optional().describe(`Add record entry point configuration`),showRecordCount:t.z.boolean().optional().describe(`Show record count at the bottom of the list`),allowPrinting:t.z.boolean().optional().describe(`Allow users to print the view`),emptyState:t.z.object({title:L.optional(),message:L.optional(),icon:t.z.string().optional()}).optional().describe(`Empty state configuration when no records found`),aria:Be.optional().describe(`ARIA accessibility attributes for the list view`),responsive:ot.optional().describe(`Responsive layout configuration`),performance:st.optional().describe(`Performance optimization settings`)})),Bt=n(()=>t.z.object({field:t.z.string().describe(`Field name (snake_case)`),type:M.optional().describe(`Field type (auto-infers widget if omitted)`),options:t.z.array(N).optional().describe(`Options for select/multiselect/radio/checkboxes fields`),reference:t.z.string().optional().describe(`Target object name for lookup/master_detail fields`),maxLength:t.z.number().optional().describe(`Maximum character length (for text/textarea/email/url/phone)`),minLength:t.z.number().optional().describe(`Minimum character length`),min:t.z.number().optional().describe(`Minimum value (for number/currency/percent/slider)`),max:t.z.number().optional().describe(`Maximum value`),precision:t.z.number().optional().describe(`Total digits (for number/currency)`),scale:t.z.number().optional().describe(`Decimal places`),multiple:t.z.boolean().optional().describe(`Allow multiple values (for select/lookup/file/image)`),label:L.optional().describe(`Display label override`),placeholder:L.optional().describe(`Placeholder text`),helpText:L.optional().describe(`Help/hint text`),readonly:t.z.boolean().optional().describe(`Read-only override`),immutable:t.z.boolean().optional().describe(`Editable on create, locked once the record exists (e.g. machine names).`),required:t.z.boolean().optional().describe(`Required override`),hidden:t.z.boolean().optional().describe(`Hidden override`),colSpan:t.z.number().int().min(1).max(4).optional().describe("[legacy — prefer `span`] Absolute column span (1-4). Fragile when the column count is derived per surface (mobile 1 / modal 2 / page 3-4): a fixed span only lines up at the width the author imagined. The renderer clamps it to the current column count. Prefer `span`."),span:t.z.enum([`auto`,`full`]).default(`auto`).describe("Relative field width. 'auto' (default — omit it): the renderer sizes the field from its widget type × the current column count (wide widgets like textarea/richtext/json/file/subform take the whole row). 'full': whole row at any column count. Prefer this over the absolute `colSpan`."),widget:t.z.string().optional().describe(`Custom widget/component name (overrides type-based inference)`),language:t.z.string().optional().describe(`Code editor language (for type=code)`),fields:t.z.array(t.z.lazy(()=>Bt)).optional().describe(`Sub-fields for composite/repeater/record types`),keyField:t.z.object({field:t.z.string().default(`name`).describe(`Property name that holds the key inside each item (defaults to "name")`),label:L.optional().describe(`Display label for the key column`),placeholder:L.optional().describe(`Placeholder when entering a new key`),helpText:L.optional().describe(`Help text under the key input`),regex:t.z.string().optional().describe(`JS regex source string the key must match (no flags)`),immutable:t.z.boolean().default(!0).describe(`If true, the key is read-only after creation`)}).optional().describe(`Key column config for record-typed fields`),dependsOn:t.z.string().optional().describe(`Parent field name for cascading`),visibleOn:j.optional().describe(`Visibility predicate (CEL).`),disclosure:t.z.enum([`inline`,`popover`]).optional().describe(`Composite rendering: inline bordered box (default) or a summary line + gear popover (progressive disclosure).`)})),Vt=n(()=>t.z.object({name:t.z.string().optional().describe(`Stable section identifier for i18n lookup (snake_case)`),label:L.optional(),description:t.z.string().optional().describe(`Optional description rendered under the section header.`),collapsible:t.z.boolean().default(!1),collapsed:t.z.boolean().default(!1),visibleOn:j.optional().describe(`Visibility predicate (CEL). Hides the whole section when false.`),columns:t.z.union([t.z.enum([`1`,`2`,`3`,`4`]),t.z.literal(1),t.z.literal(2),t.z.literal(3),t.z.literal(4)]).default(1).transform(e=>typeof e==`string`?parseInt(e):e),fields:t.z.array(t.z.union([t.z.string(),Bt]))})),H=n(()=>t.z.object({type:t.z.enum([`simple`,`tabbed`,`wizard`,`split`,`drawer`,`modal`]).default(`simple`),layout:t.z.enum([`vertical`,`horizontal`,`inline`,`grid`]).optional().describe(`Field layout direction`),columns:t.z.number().int().min(1).optional().describe(`Number of columns for the form body`),title:t.z.string().optional().describe(`Form title`),description:t.z.string().optional().describe(`Form description`),defaultTab:t.z.string().optional().describe(`Initially active tab (tabbed forms)`),tabPosition:t.z.enum([`top`,`bottom`,`left`,`right`]).optional().describe(`Tab strip position (tabbed forms)`),allowSkip:t.z.boolean().optional().describe(`Allow skipping steps (wizard forms)`),showStepIndicator:t.z.boolean().optional().describe(`Show the step indicator (wizard forms)`),splitDirection:t.z.enum([`horizontal`,`vertical`]).optional().describe(`Split orientation (split forms)`),splitSize:t.z.number().optional().describe(`Primary split panel size, % (split forms)`),splitResizable:t.z.boolean().optional().describe(`Whether the split is resizable (split forms)`),drawerSide:t.z.enum([`top`,`bottom`,`left`,`right`]).optional().describe(`Drawer side (drawer forms)`),drawerWidth:t.z.string().optional().describe(`[DEPRECATED → size buckets] Drawer width, e.g. "480px". A pixel width cannot be chosen without knowing the client viewport — the renderer derives it.`),modalSize:t.z.enum([`sm`,`default`,`lg`,`xl`,`full`]).optional().describe(`Modal size (modal forms)`),data:dt.optional().describe(`Data source configuration (defaults to "object" provider)`),sections:t.z.array(Vt).optional(),groups:t.z.array(Vt).optional(),subforms:t.z.array(t.z.object({childObject:t.z.string().describe(`Child object whose records are entered inline`),relationshipField:t.z.string().optional().describe(`FK on the child pointing back to the parent (auto-detected when omitted)`),columns:t.z.array(t.z.any()).optional().describe(`Editable grid columns (derived from the child object when omitted)`),amountField:t.z.string().optional().describe(`Numeric child column summed for the running total`),totalField:t.z.string().optional().describe(`Parent field to receive the rolled-up sum`),title:t.z.string().optional().describe(`Section title`),addLabel:t.z.string().optional().describe(`Add-row button label`),minRows:t.z.number().optional(),maxRows:t.z.number().optional()})).optional().describe(`Inline master-detail child collections`),defaultSort:t.z.array(t.z.object({field:t.z.string().describe(`Field name to sort by`),order:t.z.enum([`asc`,`desc`]).default(`desc`).describe(`Sort direction`)})).optional().describe(`Default sort order for related list views within this form`),sharing:nt.optional().describe(`Public sharing configuration for this form`),submitBehavior:t.z.union([t.z.object({kind:t.z.literal(`thank-you`),title:t.z.string().optional(),message:t.z.string().optional()}),t.z.object({kind:t.z.literal(`redirect`),url:t.z.string(),delayMs:t.z.number().int().min(0).optional()}),t.z.object({kind:t.z.literal(`continue`)}),t.z.object({kind:t.z.literal(`next-record`)})]).optional().describe(`Post-submit behavior`),aria:Be.optional().describe(`ARIA accessibility attributes for the form view`)})),U=n(()=>zt.omit({userFilters:!0}));n(()=>t.z.object({list:U.optional(),form:H.optional(),listViews:t.z.record(t.z.string(),U).optional().describe(`Additional named list views (views mode — no userFilters, ADR-0053)`),formViews:t.z.record(t.z.string(),H).optional().describe(`Additional named form views`),protection:B.optional().describe(`Package author protection block — lock policy for this view.`),...z}));var Ht=t.z.string().regex(/^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$/,`View item name must be a dotted snake_case qualified name, e.g. "crm_lead.pipeline".`).describe("Globally-unique view id, `<object>.<viewKey>`."),Ut=t.z.enum([`package`,`shared`,`personal`]).describe(`View identity layer: package | shared | personal.`);t.z.enum([`list`,`form`]).describe("Whether `config` is a ListView (list family) or a FormView.");function Wt(){return{name:Ht,object:t.z.string().describe(`Bound object name — the foreign key used to aggregate views.`),label:L.optional().describe(`Display label (supports i18n).`),isDefault:t.z.boolean().optional().describe(`Whether this is the object's default view in the switcher.`),order:t.z.number().int().optional().describe(`Sort order within the object's view switcher / left rail.`),scope:Ut.optional().describe("Identity layer (defaults to `package` for source-loaded views)."),owner:t.z.string().optional().describe("Owner user id — set when `scope` is `personal`."),hidden:t.z.boolean().optional().describe(`Hidden from the switcher (per-user / per-org declutter).`),protection:B.optional().describe(`Package author protection block — lock policy for this view.`),...z}}n(()=>t.z.discriminatedUnion(`viewKind`,[t.z.object({viewKind:t.z.literal(`list`),config:zt.describe(`List-family view configuration.`),...Wt()}),t.z.object({viewKind:t.z.literal(`form`),config:H.describe(`Form view configuration.`),...Wt()})]));function W(e){let{schemaId:t,...n}=e;return H.parse({...n,data:{provider:`schema`,schemaId:t}})}var Gt=t.z.enum([`get`,`list`,`create`,`update`,`delete`,`upsert`,`bulk`,`aggregate`,`history`,`search`,`restore`,`purge`,`import`,`export`]),Kt=t.z.object({trackHistory:t.z.boolean().default(!1).describe(`Enable field history tracking for audit compliance`),searchable:t.z.boolean().default(!0).describe(`Index records for global search`),apiEnabled:t.z.boolean().default(!0).describe(`Expose object via automatic APIs`),apiMethods:t.z.array(Gt).optional().describe(`Whitelist of allowed API operations`),files:t.z.boolean().default(!1).describe(`Enable file attachments and document management`),feeds:t.z.boolean().default(!1).describe(`Enable social feed, comments, and mentions (Chatter-like)`),activities:t.z.boolean().default(!1).describe(`Enable standard tasks and events tracking`),trash:t.z.boolean().default(!0).describe(`Enable soft-delete with restore capability`),mru:t.z.boolean().default(!0).describe(`Track Most Recently Used (MRU) list for users`),clone:t.z.boolean().default(!0).describe(`Allow record deep cloning`)}),qt=n(()=>t.z.object({name:t.z.string().optional().describe(`Index name (auto-generated if not provided)`),fields:t.z.array(t.z.string()).describe(`Fields included in the index`),type:t.z.enum([`btree`,`hash`,`gin`,`gist`,`fulltext`]).optional().default(`btree`).describe(`Index algorithm type`),unique:t.z.boolean().optional().default(!1).describe(`Whether the index enforces uniqueness`),partial:t.z.string().optional().describe(`Partial index condition (SQL WHERE clause for conditional indexes)`)})),Jt=n(()=>t.z.object({fields:t.z.array(t.z.string()).describe(`Fields to index for full-text search weighting`),displayFields:t.z.array(t.z.string()).optional().describe(`Fields to display in search result cards`),filters:t.z.array(t.z.string()).optional().describe(`Default filters for search results`)})),Yt=n(()=>t.z.object({enabled:t.z.boolean().describe(`Enable multi-tenancy for this object`),strategy:t.z.enum([`shared`,`isolated`,`hybrid`]).describe(`Tenant isolation strategy: shared (single DB, row-level), isolated (separate DB per tenant), hybrid (mix)`),tenantField:t.z.string().default(`tenant_id`).describe(`Field name for tenant identifier`),crossTenantAccess:t.z.boolean().default(!1).describe(`Allow cross-tenant data access (with explicit permission)`)})),Xt=n(()=>t.z.object({default:t.z.enum([`public`,`private`]).default(`public`).describe(`Default exposure posture: public (covered by wildcard grants) | private (needs explicit grant; exempt from wildcard RLS).`)})),Zt=n(()=>t.z.object({enabled:t.z.boolean().describe(`Enable soft delete (trash/recycle bin)`),field:t.z.string().default(`deleted_at`).describe(`Field name for soft delete timestamp`),cascadeDelete:t.z.boolean().default(!1).describe(`Cascade soft delete to related records`)})),Qt=n(()=>t.z.object({enabled:t.z.boolean().describe(`Enable record versioning`),strategy:t.z.enum([`snapshot`,`delta`,`event-sourcing`]).describe(`Versioning strategy: snapshot (full copy), delta (changes only), event-sourcing (event log)`),retentionDays:t.z.number().min(1).optional().describe(`Number of days to retain old versions (undefined = infinite)`),versionField:t.z.string().default(`version`).describe(`Field name for version number/timestamp`)})),$t=n(()=>t.z.object({key:t.z.string().regex(/^[a-z_][a-z0-9_]*$/,{message:`Field group key must be lowercase snake_case (e.g., "contact_info", "billing", "system")`}).describe(`Group machine key (snake_case). Referenced by Field.group.`),label:t.z.string().describe(`Group display label`),icon:t.z.string().optional().describe(`Icon name (Lucide/Material) for the group header`),description:t.z.string().optional().describe(`Optional description shown under the group header`),collapse:t.z.enum([`none`,`expanded`,`collapsed`]).optional().default(`none`).describe(`[ADR-0085] Section collapse behaviour: 'none' (always open, no toggle), 'expanded' (collapsible, starts open), 'collapsed' (collapsible, starts closed).`),defaultExpanded:t.z.boolean().optional().describe(`[DEPRECATED → collapse] true → 'expanded', false → 'collapsed'.`),collapsible:t.z.boolean().optional().describe("[DEPRECATED → collapse] Boolean pair with `collapsed`; use the `collapse` enum."),collapsed:t.z.boolean().optional().describe("[DEPRECATED → collapse] Boolean pair with `collapsible`; use the `collapse` enum.")})),en=t.z.object({remoteName:t.z.string().optional().describe(`Remote table/view name. Defaults to object.name.`),remoteSchema:t.z.string().optional().describe(`Remote schema/database qualifier.`),writable:t.z.boolean().default(!1).describe(`Per-object write opt-in (also requires datasource.external.allowWrites).`),columnMap:t.z.record(t.z.string(),t.z.string()).optional().describe(`Remote column name → local field name.`),introspectedAt:t.z.string().datetime().optional().describe("Set by `os datasource introspect`; informational."),ignoreColumns:t.z.array(t.z.string()).optional().describe(`Remote columns to skip during validation (dev convenience).`)}).describe(`External datasource binding (ADR-0015)`),G=t.z.object({name:t.z.string().regex(/^[a-z_][a-z0-9_]*$/).describe(`Machine unique key (snake_case). Immutable.`),label:t.z.string().optional().describe(`Human readable singular label (e.g. "Account")`),pluralLabel:t.z.string().optional().describe(`Human readable plural label (e.g. "Accounts")`),description:t.z.string().optional().describe(`Developer documentation / description`),icon:t.z.string().optional().describe(`Icon name (Lucide/Material) for UI representation`),tags:t.z.array(t.z.string()).optional().describe(`Categorization tags (e.g. "sales", "system", "reference")`),active:t.z.boolean().optional().default(!0).describe(`Is the object active and usable`),isSystem:t.z.boolean().optional().default(!1).describe(`Is system object (protected from deletion)`),abstract:t.z.boolean().optional().default(!1).describe(`Is abstract base object (cannot be instantiated)`),managedBy:t.z.enum([`platform`,`config`,`system`,`append-only`,`better-auth`]).optional().describe(`Lifecycle bucket — platform (user CRUD) | config (admin authored) | system (engine-managed) | append-only (audit) | better-auth (identity). UI clients honour the resolved affordance matrix.`),userActions:t.z.object({create:t.z.boolean().optional().describe(`Show generic "New" button.`),import:t.z.boolean().optional().describe(`Show CSV import wizard entry.`),edit:t.z.boolean().optional().describe(`Allow inline / form edit of existing rows.`),delete:t.z.boolean().optional().describe(`Show row-level delete + bulk delete.`),exportCsv:t.z.boolean().optional().describe(`Show CSV export entry.`)}).optional().describe(`Per-object override of the resolved CRUD affordance matrix.`),systemFields:t.z.union([t.z.literal(!1),t.z.object({tenant:t.z.boolean().optional().describe(`Inject organization_id (multi-tenant only). Default true.`),owner:t.z.boolean().optional().describe(`Reserved for future owner_id auto-injection.`),audit:t.z.boolean().optional().describe(`Reserved for future created_by/updated_by auto-injection.`)})]).optional().describe(`Opt out of, or selectively disable, registry-level system-field auto-injection.`),datasource:t.z.string().optional().default(`default`).describe(`Target Datasource ID. "default" is the primary DB.`),external:en.optional().describe(`Remote table binding for federated (external) objects.`),fields:t.z.record(t.z.string().regex(/^[a-z_][a-z0-9_]*$/,{message:`Field names must be lowercase snake_case (e.g., "first_name", "company", "annual_revenue")`}),P).describe(`Field definitions map. Keys must be snake_case identifiers.`),indexes:t.z.array(qt).optional().describe(`Database performance indexes`),fieldGroups:t.z.array($t).refine(e=>new Set(e.map(e=>e.key)).size===e.length,{message:`fieldGroups[].key must be unique within an object`}).optional().describe(`Ordered list of field groups (array order = display order). See ObjectFieldGroupSchema.`),tenancy:Yt.optional().describe(`Multi-tenancy configuration for SaaS applications`),access:Xt.optional().describe(`[ADR-0066 D2] Object exposure posture (public-by-default vs private secure-by-default).`),requiredPermissions:t.z.array(t.z.string()).optional().describe(`[ADR-0066 D3] Capabilities required to access this object (AND-gate, checked alongside CRUD grants).`),softDelete:Zt.optional().describe(`Soft delete (trash/recycle bin) configuration`),versioning:Qt.optional().describe(`Record versioning and history tracking configuration`),validations:t.z.array(I).optional().describe(`Object-level validation rules`),activityMilestones:t.z.array(t.z.object({field:t.z.string().describe(`Field to watch (typically a status/stage select).`),value:t.z.string().describe(`The value the field must transition INTO to fire the milestone.`),summary:t.z.string().describe(`Activity summary template; {field} tokens interpolate the record value. e.g. "Deal won: {name}".`),type:t.z.string().optional().describe(`Activity type for the emitted row (default "completed").`)})).optional().describe(`Declarative semantic activity milestones — emit a templated timeline row when a field transitions into a value, no hook code (ADR-0052 §5b.2).`),nameField:t.z.string().optional().describe(`[ADR-0079] Canonical primary title field — the stored field used as the record display name (e.g. "name", "title"). Pairs with recordName.`),displayNameField:t.z.string().optional().describe(`[DEPRECATED → nameField] Field to use as the record display name (e.g., "name", "title"). Accepted as an alias for nameField.`),recordName:t.z.object({type:t.z.enum([`text`,`autonumber`]).describe(`Record name type: text (user-entered) or autonumber (system-generated)`),displayFormat:t.z.string().optional().describe(`Auto-number format pattern (e.g., "CASE-{0000}", "INV-{YYYY}-{0000}")`),startNumber:t.z.number().int().min(0).optional().describe(`Starting number for autonumber (default: 1)`)}).optional().describe(`Record name generation configuration (Salesforce pattern)`),titleFormat:we.optional().describe(`[DEPRECATED → nameField (ADR-0079)] Render-only title template; the server cannot return or query it, and an explicit nameField now takes precedence. Migrate a single-field title to nameField, a composite to a formula field designated as nameField.`),highlightFields:t.z.array(t.z.string()).optional().describe(`[ADR-0085] Ordered most-important fields; first entry wins where only one fits. Drives default columns, cards, previews, detail highlight strip. Renamed from compactLayout.`),stageField:t.z.union([t.z.string(),t.z.literal(!1)]).optional().describe(`[ADR-0085] Lifecycle stage field (linear/ordered), or false to declare the status field non-linear and suppress stage heuristics. Absent = heuristic detection allowed.`),listViews:t.z.record(t.z.string(),U).optional().describe(`Built-in named list views (segmented tabs) shipped with the object schema — "views" mode, no page-only userFilters (ADR-0053)`),searchableFields:t.z.array(t.z.string()).optional().describe("Fields the `$search` query matches against (ADR-0061). Canonical default for the record picker, list quick-search and global search; views may narrow it. When unset, search auto-defaults to the name/title field plus short-text fields."),search:Jt.optional().describe(`Search engine configuration`),enable:Kt.optional().describe(`Enabled system features modules`),sharingModel:t.z.enum([`private`,`public_read`,`public_read_write`,`controlled_by_parent`,`read`,`read_write`,`full`]).optional().describe(`Org-Wide Default record visibility (OWD). Canonical: private (owner-only) | public_read (everyone reads, owner writes) | public_read_write (everyone reads+writes) | controlled_by_parent (derived from the master record). Legacy aliases: read=public_read, read_write/full=public_read_write. ADR-0056 D1.`),publicSharing:t.z.object({enabled:t.z.boolean().default(!1).describe(`Allow records of this object to be published via share link`),allowedAudiences:t.z.array(t.z.enum([`public`,`link_only`,`signed_in`,`email`])).optional().describe(`Audiences callers may select when creating a link`),allowedPermissions:t.z.array(t.z.enum([`view`,`comment`,`edit`])).optional().describe(`Permission levels selectable on the share dialog`),maxExpiryDays:t.z.number().int().positive().optional().describe(`Reject links with expiry beyond this many days`),redactFields:t.z.array(t.z.string()).optional().describe(`Field names removed from records served via a share token`),eligibility:t.z.string().optional().describe(`CEL expression that must evaluate to true on the target record`)}).optional().describe(`Public share-link policy (Notion/Figma-style link sharing)`),keyPrefix:t.z.string().max(5).optional().describe(`Short prefix for record IDs (e.g., "001" for Account)`),actions:t.z.array(Qe).optional().describe(`Actions associated with this object (auto-populated from top-level actions via objectName)`),protection:B.optional().describe(`Package author protection block — lock policy for this object.`),...z});function tn(e){return e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}var nn={workflows:"`workflows` is not an ObjectSchema field. Object-level, record-triggered automation is authored as a lifecycle hook (`src/objects/<name>.hook.ts`, registered via `defineHook()`) or as a top-level `record_change` flow — not as `workflows[]` on the object schema.",workflow:"`workflow` is not an ObjectSchema field. Record-triggered automation is authored as a lifecycle hook (`src/objects/<name>.hook.ts`) or a top-level `record_change` flow.",hooks:"`hooks` is not an ObjectSchema field. Lifecycle hooks live in their own `src/objects/<name>.hook.ts` module, registered via `defineHook()`.",triggers:"`triggers` is not an ObjectSchema field. Use a lifecycle hook (`src/objects/<name>.hook.ts`) or a top-level `record_change` flow.",compactLayout:"`compactLayout` was renamed to `highlightFields` in @objectstack/spec 11.7.0 (ADR-0085 semantic roles) and the alias was retired in 11.9.1 (#2536). Rename the key — the value shape (ordered field-name list) is unchanged.",detail:"The `detail` UI-hints block was removed by ADR-0085 (spec 11.7.0). Its jobs moved to top-level semantic roles: `detail.stageField` → `stageField` (string | false), `detail.highlightFields` → `highlightFields`, section layout → `fieldGroups` + `Field.group`. Whole-page customization is done by assigning a custom Page schema instead of per-page hint keys.",views:"`views` is not an ObjectSchema field: the object-level `views.form/*` and `views.detail/*` UI-hint dialect was never part of the spec and its renderer support was removed (ADR-0085). Use the semantic roles (`highlightFields`, `stageField`, `fieldGroups`) for hints and `listViews` for named list views.",defaultDetailForm:"`defaultDetailForm` was never implemented and was removed from the spec (#2402). Curate the record page by assigning a custom Page schema; form layout derives from `fieldGroups` + `Field.group`."};function rn(e,t){let n=Array.from({length:e.length+1},()=>Array(t.length+1).fill(0));for(let t=0;t<=e.length;t++)n[t][0]=t;for(let e=0;e<=t.length;e++)n[0][e]=e;for(let r=1;r<=e.length;r++)for(let i=1;i<=t.length;i++)n[r][i]=e[r-1]===t[i-1]?n[r-1][i-1]:1+Math.min(n[r-1][i],n[r][i-1],n[r-1][i-1]);return n[e.length][t.length]}function an(e,t){let n,r=1/0;for(let i of t){let t=rn(e.toLowerCase(),i.toLowerCase());t<r&&(r=t,n=i)}return n!==void 0&&r<=Math.max(2,Math.floor(e.length/3))?n:void 0}function on(e,t,n){let r=typeof e==`string`&&e.length>0?e:`<unnamed>`,i=t.map(e=>{let t=nn[e];if(t)return` \u2022 ${t}`;let r=an(e,n);return r?` \u2022 \`${e}\` is not an ObjectSchema field \u2014 did you mean \`${r}\`?`:` \u2022 \`${e}\` is not an ObjectSchema field.`});return Error(`ObjectSchema.create('${r}'): unknown key(s) \u2014 ${t.join(`, `)}.
|
|
2
2
|
These keys would previously have been stripped silently at build, shipping dead metadata with no diagnostic (ADR-0032 "no silent failure", issue #1535).
|
|
3
3
|
|
|
4
4
|
${i.join(`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{u as e}from"./vendor-charts-
|
|
1
|
+
import{u as e}from"./vendor-charts-D_CNNxD5.js";import{T as t}from"./chunk-KEIR6QF5-CxDrFr0l.js";import{n}from"./mermaid-parser.core-DV_Ys_OF.js";import{n as r}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as i}from"./src-D0ZYDfff.js";import{H as a,K as o,U as s,Y as c,a as l,b as u,f as d,v as f,w as p,x as m,y as h,z as g}from"./chunk-WYO6CB5R-Cndg0Yo5.js";import{t as ee}from"./chunk-JWPE2WC7-DVXcaiue.js";import{_,i as te,t as ne}from"./chunk-ICXQ74PX-zJg8KmvA.js";var v=`position frame`,y=`frame positioned`,b=`position relation`,x=`relation positioned`,re=r(function(e){i.debug(`options str`,e)},`setOptions`),ie=r(function(){return{}},`getOptions`),ae=r(function(){S(),l()},`clear`);function S(){C={}}r(S,`reset`);var oe=d.eventmodeling,se=r(()=>te({...oe,...u().eventmodeling}),`getConfig`),C={};function w(){let e=ce,{ast:t}=C,n=D();if(!t)throw Error(`No data for EventModel`);return t.frames.forEach((r,a)=>{let o=P(r,t.dataEntities,n);e=J(e,{$kind:v,index:a,frame:r,textProps:o});let s;V(r)?(i.debug(`source frame`,r.sourceFrames),s=t.frames.filter(e=>r.sourceFrames.some(t=>t.$refText===e.name)),s.forEach(t=>{e=J(e,{$kind:b,index:a,frame:r,sourceFrame:t})})):e=J(e,{$kind:b,index:a,frame:r})}),e={...e,sortedSwimlanesArray:R(e.swimlanes)},e}r(w,`getState`);function T(e){C.ast=e}r(T,`setAst`);var E={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:`bold`,boxTextPadding:10,swimlaneTextFontWeight:`bold`,labelUiAutomation:`UI/Automation`,labelUiAutomationPrefix:`UI/A: `,labelCommandReadModel:`Command/Read Model`,labelCommandReadModelPrefix:`C/RM: `,labelEvents:`Events`,labelEventsPrefix:`Stream: `};function D(){return E}r(D,`getDiagramProps`);var ce={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function O(e){let t=e.split(`.`);if(t.length===2)return t[0]}r(O,`extractNamespace`);function k(e){let t=e.split(`.`);return t.length===2?t[1]:e}r(k,`extractName`);function A(e,t){if(!(!t||t.length===0))return Object.values(e).find(e=>e.namespace===t)}r(A,`findSwimlaneByNamespace`);function j(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{let r=Number.parseInt(e);return r>t&&r<n}).map(e=>Number.parseInt(e)))+1}r(j,`findNextAvailableIndex`);function M(e,t){let n=O(e.entityIdentifier),r=A(t,n);switch(e.modelEntityType){case`ui`:case`pcr`:case`processor`:return r?{index:r.index,label:r.namespace||E.labelUiAutomation}:n?{index:j(t,0,100),label:E.labelUiAutomationPrefix+n}:{index:0,label:E.labelUiAutomation};case`rmo`:case`readmodel`:case`cmd`:case`command`:return r?{index:r.index,label:r.namespace||E.labelCommandReadModel}:n?{index:j(t,100,200),label:E.labelCommandReadModelPrefix+n}:{index:100,label:E.labelCommandReadModel};default:return r?{index:r.index,label:r.namespace||E.labelEvents}:n?{index:j(t,200,300),label:E.labelEventsPrefix+n}:{index:200,label:E.labelEvents}}}r(M,`calculateSwimlaneProps`);function N(e){let{themeVariables:t}=u();switch(e.modelEntityType){case`ui`:return{fill:t.emUiFill??`white`,stroke:t.emUiStroke??`#dbdada`};case`pcr`:case`processor`:return{fill:t.emProcessorFill??`#edb3f6`,stroke:t.emProcessorStroke??`#b88cbf`};case`rmo`:case`readmodel`:return{fill:t.emReadModelFill??`#d3f1a2`,stroke:t.emReadModelStroke??`#a3b732`};case`cmd`:case`command`:return{fill:t.emCommandFill??`#bcd6fe`,stroke:t.emCommandStroke??`#679ac3`};case`evt`:case`event`:return{fill:t.emEventFill??`#ffb778`,stroke:t.emEventStroke??`#c19a0f`};default:return{fill:`red`,stroke:`black`}}}r(N,`calculateEntityVisualProps`);function P(e,t,n){let r=u(),a=g(k(e.entityIdentifier)??``,r),o,s={fontSize:16,fontWeight:700,fontFamily:`"trebuchet ms", verdana, arial, sans-serif`,joinWith:`<br/>`},c=`<b>${_(a,n.textMaxWidth,s)}</b>`;if(e.dataInlineValue&&(o=e.dataInlineValue,o=o.substring(o.indexOf(`{`)+1),o=o.substring(0,o.lastIndexOf(`}`)-1),o=g(o,r),o=_(o,n.textMaxWidth,s),o=o.replaceAll(` `,` `)),e.dataReference){let i=t.find(t=>t.name===e.dataReference?.$refText);i&&(o=i.dataBlockValue,o=o.substring(o.indexOf(`{
|
|
2
2
|
`)+2),o=o.substring(0,o.lastIndexOf(`}`)-1),o=g(o,r),o=_(o,n.textMaxWidth,s),o=o.replaceAll(` `,` `),o+=`<br/>`)}let l=o!==void 0;l&&(c+=`<br/><br/><code style="text-align: left; display: block;max-width:${n.textMaxWidth}px">${o}</code>`);let d={fontSize:s.fontSize,fontWeight:s.fontWeight,fontFamily:s.fontFamily},f=ne(c,d),p=l?f.width/3:f.width,m={content:c,width:p,height:f.height};return i.debug(`[${e.name}] ${e.entityIdentifier} text`,m),m}r(P,`calculateTextProps`);function F(e,t){let n=t,r=N(n.frame),i={width:n.textProps.width+2*E.boxTextPadding,height:n.textProps.height+2*E.boxTextPadding};return[{$kind:y,frame:n.frame,index:n.index,visual:r,dimension:i,textProps:n.textProps}]}r(F,`decidePositionFrame`);function I(e,t,n){return t===void 0?E.contentStartX:t.index===e.index&&e.r?e.r+E.boxPadding:n===void 0?E.contentStartX:n.r-E.boxOverlap+E.boxPadding}r(I,`calculateX`);function L(e,t){let n=[...e.map(e=>e.r),t];return Math.max(...n)}r(L,`calculateMaxRight`);function R(e){return Object.values(e).sort((e,t)=>e.index-t.index)}r(R,`sortedSwimlanesArray`);function z(e,t){let n=t,r=M(n.frame,e.swimlanes),i;i=r.index in e.swimlanes?e.swimlanes[r.index]:{index:r.index,label:r.label,r:0,y:r.index*E.swimlaneMinHeight+E.swimlaneGap,height:E.swimlaneMinHeight,maxHeight:E.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=e.previousSwimlaneNumber===void 0?void 0:e.swimlanes[e.previousSwimlaneNumber],s={width:Math.max(E.boxMinWidth,Math.min(E.boxMaxWidth,n.dimension.width))+2*E.boxPadding,height:Math.max(E.boxMinHeight,Math.min(E.boxMaxHeight,n.dimension.height))+2*E.boxPadding},c=I(i,o,a),l=c+s.width+E.boxPadding,u=L(Object.values(e.swimlanes),l);i.r=c+s.width,i.maxHeight=Math.max(i.maxHeight,s.height),i.height=Math.max(E.swimlaneMinHeight,i.maxHeight)+2*E.swimlanePadding;let d={x:c,y:E.swimlanePadding+i.y,r:l,dimension:s,leftSibling:!1,swimlane:i,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},f={...e,boxes:[...e.boxes,d],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:u},p=R(f.swimlanes);p.length>0&&(p[0].y=0);for(let e=1;e<p.length;e++){let t=p[e],n=p[e-1];t.y=n.y+n.height+E.swimlaneGap}return f}r(z,`evolveFramePositioned`);function B(e,t){return e===0&&t.sourceFrames.length===0}r(B,`isFirstFrame`);function V(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}r(V,`hasSourceFrame`);function H(e,t){if(t!=null)return e.find(e=>e.frame.name===t.name)}r(H,`findBoxByFrame`);function U(e,t,n){if(!(n<0))for(let r=n;r>=0;r--){let n=e[r];if(n.swimlane.index!==t)return n}}r(U,`findBoxByLineIndex`);function W(e,n){let r=n;if(t(r.frame)||B(r.index,r.frame))return[];let i=H(e.boxes,r.frame);if(i===void 0)throw Error(`Target box not found for frame ${r.frame.name}`);let a;return a=r.sourceFrame?H(e.boxes,r.sourceFrame):U(e.boxes,i.swimlane.index,r.index-1),a===void 0?[]:[{$kind:x,frame:r.frame,index:r.index,sourceBox:a,targetBox:i}]}r(W,`decidePositionRelation`);function G(e,t){let n=t,r={visual:{fill:`none`,stroke:`#000`},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,r]}}r(G,`evolveRelationPositioned`);var le={[v]:F,[b]:W},ue={[y]:z,[x]:G};function K(e,t){let n=le[t.$kind];if(n==null)return[];let r=n(e,t);return i.debug(`decided events`,r),r}r(K,`decide`);function q(e,t){let n=t.reduce((e,t)=>{let n=ue[t.$kind];return n==null?e:n(e,t)},e);return i.debug(`evolve events`,{state:e,newState:n,events:t}),n}r(q,`evolve`);function J(e,t){return q(e,K(e,t))}r(J,`dispatch`);var Y={getConfig:se,setOptions:re,getOptions:ie,clear:ae,setAccTitle:s,getAccTitle:h,getAccDescription:f,setAccDescription:a,setDiagramTitle:o,getDiagramTitle:p,setAst:T,getDiagramProps:D,getState:w},de={parse:r(async e=>{let t=await n(`eventmodeling`,e);i.debug(t),Y.setAst(t),ee(t,Y)},`parse`)},fe=m()?.eventmodeling;function X(e,t){return n=>{let r=n.swimlane.y+t.swimlanePadding,i=e.append(`g`).attr(`class`,`em-box`);i.append(`rect`).attr(`x`,n.x).attr(`y`,r).attr(`rx`,`3`).attr(`width`,n.dimension.width).attr(`height`,n.dimension.height).attr(`stroke`,n.visual.stroke).attr(`fill`,n.visual.fill),i.append(`foreignObject`).attr(`x`,n.x+t.boxPadding).attr(`y`,r+10).attr(`width`,n.dimension.width-2*t.boxPadding).attr(`height`,n.dimension.height-2*t.boxPadding).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`).append(`span`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(n.text)}}r(X,`renderD3Box`);function Z(e,t){return e>t}r(Z,`dirUpwards`);function Q(e,t,n,r){return a=>{let o=a.sourceBox.swimlane.y+t.swimlanePadding,s=a.targetBox.swimlane.y+t.swimlanePadding,c=Z(o,s),l=a.sourceBox.x+a.sourceBox.dimension.width*2/3,u=a.targetBox.x+a.targetBox.dimension.width/3,d,f;i.debug(`rendering relation up=${c} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),c?(d=o,f=s+a.targetBox.dimension.height):(d=o+a.sourceBox.dimension.height,f=s);let p=r.emRelationStroke??a.visual.stroke;e.append(`path`).attr(`class`,`em-relation`).attr(`fill`,a.visual.fill).attr(`stroke`,p).attr(`stroke-width`,`1`).attr(`marker-end`,`url(#${n})`).attr(`d`,`M${l} ${d} L${u} ${f}`)}}r(Q,`renderD3Relation`);function $(e,t,n,r){return i=>{let a=e.append(`g`).attr(`class`,`em-swimlane`),o=r.emSwimlaneBackgroundOdd??`rgb(250,250,250)`,s=r.emSwimlaneBackgroundStroke??`rgb(240,240,240)`;a.append(`rect`).attr(`x`,0).attr(`y`,i.y).attr(`rx`,`3`).attr(`width`,t+n.swimlanePadding).attr(`height`,i.height).attr(`fill`,o).attr(`stroke`,s),a.append(`text`).attr(`font-weight`,n.swimlaneTextFontWeight).attr(`x`,30).attr(`y`,i.y+30).text(i.label)}}r($,`renderD3Swimlane`);var pe={parser:de,db:Y,renderer:{draw:r(function(t,n,r,a){if(i.debug(`in eventmodeling renderer`,t+`
|
|
3
3
|
`,`id:`,n,r),!fe)throw Error(`EventModeling config not found`);let o=a.db,{themeVariables:s,eventmodeling:l}=m(),u=e(`[id="${n}"]`),d=o.getDiagramProps(),f=o.getState(),p=`em-arrowhead-${n}`,h=s.emArrowhead??`#000000`;f.sortedSwimlanesArray.forEach($(u,f.maxR,d,s)),f.boxes.forEach(X(u,d)),f.relations.forEach(Q(u,d,p,s)),u.append(`defs`).append(`marker`).attr(`id`,p).attr(`markerWidth`,`10`).attr(`markerHeight`,`7`).attr(`refX`,`10`).attr(`refY`,`3.5`).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0 0, 10 3.5, 0 7`).attr(`fill`,h),c(void 0,u,l?.padding??30,l?.useMaxWidth)},`draw`)},styles:r(e=>``,`getStyles`)};export{pe as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as e,it as t,l as n,st as r,u as i}from"./vendor-charts-DVOdzzh2.js";import{n as a}from"./mermaid-parser.core-qFqgm_H6.js";import{n as o}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as s}from"./src-6rOMKMLU.js";import{D as c,H as l,K as u,U as d,a as f,b as p,c as m,f as h,v as g,w as _,y as v}from"./chunk-WYO6CB5R-BBbafnWJ.js";import{t as y}from"./chunk-VAUOI2AC-Bgyec1On.js";import{t as b}from"./chunk-JWPE2WC7-DVXcaiue.js";import{i as x}from"./chunk-ICXQ74PX-DGFLQjwm.js";import{t as S}from"./chunk-VR4S4FIN-DykLEeqy.js";import{i as C,n as w}from"./chunk-C7G6YPKG-DvvI9WqY.js";var T=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=d,this.getAccTitle=v,this.setDiagramTitle=u,this.getDiagramTitle=_,this.getAccDescription=g,this.setAccDescription=l}static{o(this,`TreeMapDB`)}getNodes(){return this.nodes}getConfig(){let e=h,t=p();return x({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:``,children:this.outerNodes}}addClass(e,t){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},r=t.replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);r&&r.forEach(e=>{w(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){f(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function E(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}o(E,`buildHierarchy`);var D=o((e,t)=>{b(e,t);let n=[];for(let n of e.TreemapRows??[])n.$type===`ClassDefStatement`&&t.addClass(n.className??``,n.styleText??``);for(let r of e.TreemapRows??[]){let e=r.item;if(!e)continue;let i=r.indent?parseInt(r.indent):0,a=O(e),o=e.classSelector?t.getStylesForClass(e.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:s};n.push(c)}let r=E(n),i=o((e,n)=>{for(let r of e)t.addNode(r,n),r.children&&r.children.length>0&&i(r.children,n+1)},`addNodesRecursively`);i(r,0)},`populate`),O=o(e=>e.name?String(e.name):``,`getItemName`),k={parser:{yy:void 0},parse:o(async e=>{try{let t=await a(`treemap`,e);s.debug(`Treemap AST:`,t);let n=k.parser?.yy;if(!(n instanceof T))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);D(t,n)}catch(e){throw s.error(`Error parsing treemap:`,e),e}},`parse`)},A=10,j=10,M=25,N={draw:o((a,c,l,u)=>{let d=u.db,f=d.getConfig(),h=f.padding??A,g=d.getDiagramTitle(),_=d.getRoot(),{themeVariables:v}=p();if(!_)return;let b=g?30:0,x=y(c),w=f.nodeWidth?f.nodeWidth*j:960,T=f.nodeHeight?f.nodeHeight*j:500,E=w,D=T+b;x.attr(`viewBox`,`0 0 ${E} ${D}`),m(x,D,E,f.useMaxWidth);let O;try{let e=f.valueFormat||`,`;if(e===`$0,0`)O=o(e=>`$`+t(`,`)(e),`valueFormat`);else if(e.startsWith(`$`)&&e.includes(`,`)){let n=/\.\d+/.exec(e),r=n?n[0]:``;O=o(e=>`$`+t(`,`+r)(e),`valueFormat`)}else if(e.startsWith(`$`)){let n=e.substring(1);O=o(e=>`$`+t(n||``)(e),`valueFormat`)}else O=t(e)}catch(e){s.error(`Error creating format function:`,e),O=t(`,`)}let k=r().range([`transparent`,v.cScale0,v.cScale1,v.cScale2,v.cScale3,v.cScale4,v.cScale5,v.cScale6,v.cScale7,v.cScale8,v.cScale9,v.cScale10,v.cScale11]),N=r().range([`transparent`,v.cScalePeer0,v.cScalePeer1,v.cScalePeer2,v.cScalePeer3,v.cScalePeer4,v.cScalePeer5,v.cScalePeer6,v.cScalePeer7,v.cScalePeer8,v.cScalePeer9,v.cScalePeer10,v.cScalePeer11]),P=r().range([v.cScaleLabel0,v.cScaleLabel1,v.cScaleLabel2,v.cScaleLabel3,v.cScaleLabel4,v.cScaleLabel5,v.cScaleLabel6,v.cScaleLabel7,v.cScaleLabel8,v.cScaleLabel9,v.cScaleLabel10,v.cScaleLabel11]);g&&x.append(`text`).attr(`x`,E/2).attr(`y`,b/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(g);let F=x.append(`g`).attr(`transform`,`translate(0, ${b})`).attr(`class`,`treemapContainer`),I=n(_).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),L=e().size([w,T]).paddingTop(e=>e.children&&e.children.length>0?M+j:0).paddingInner(h).paddingLeft(e=>e.children&&e.children.length>0?j:0).paddingRight(e=>e.children&&e.children.length>0?j:0).paddingBottom(e=>e.children&&e.children.length>0?j:0).round(!0)(I),R=L.descendants().filter(e=>e.children&&e.children.length>0),z=F.selectAll(`.treemapSection`).data(R).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);z.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,M).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),z.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${c}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,M),z.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>k(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>N(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=C({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),z.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,M/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`clip-path`,(e,t)=>`url(#clip-section-${c}-${t})`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+P(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+C({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let t=i(this),n=e.data.name;t.text(n);let r=e.x1-e.x0,a;a=f.showValues!==!1&&e.value?r-10-30-10-6:r-6-6;let o=Math.max(15,a),s=t.node();if(s.getComputedTextLength()>o){let e=n;for(;e.length>0;){if(e=n.substring(0,e.length-1),e.length===0){t.text(`...`),s.getComputedTextLength()>o&&t.text(``);break}if(t.text(e+`...`),s.getComputedTextLength()<=o)break}}}),f.showValues!==!1&&z.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,M/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?O(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+P(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+C({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let B=L.leaves(),V=B.length>20,H=V?16:38,U=V?14:28,W=V?4:8,G=V?4:6,K=V?2:4,q=V?8:10,J=V?1:2,Y=F.selectAll(`.treemapLeafGroup`).data(B).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);Y.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?k(e.parent.data.name):k(e.data.name)).attr(`style`,e=>C({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?k(e.parent.data.name):k(e.data.name)).attr(`stroke-width`,3),Y.append(`clipPath`).attr(`id`,(e,t)=>`clip-${c}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),Y.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${H}px;fill:`+P(e.data.name)+`;`+C({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${c}-${t})`).text(e=>e.data.name).each(function(e){let t=i(this),n=e.x1-e.x0,r=e.y1-e.y0,a=t.node(),o=n-2*K,s=r-2*K;if(o<q||s<q){t.style(`display`,`none`);return}let c=parseInt(t.style(`font-size`),10),l=.6;for(;a.getComputedTextLength()>o&&c>W;)c--,t.style(`font-size`,`${c}px`);let u=Math.max(G,Math.min(U,Math.round(c*l))),d=c+J+u;for(;d>s&&c>W&&(c--,u=Math.max(G,Math.min(U,Math.round(c*l))),!(u<G&&c===W));)t.style(`font-size`,`${c}px`),d=c+J+u;t.style(`font-size`,`${c}px`),V?(c<W||s<W)&&t.style(`display`,`none`):(a.getComputedTextLength()>o||c<W||s<c)&&t.style(`display`,`none`)}),f.showValues!==!1&&Y.append(`text`).attr(`class`,`treemapValue`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${U}px;fill:`+P(e.data.name)+`;`+C({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${c}-${t})`).text(e=>e.value?O(e.value):``).each(function(e){let t=i(this),n=this.parentNode;if(!n){t.style(`display`,`none`);return}let r=i(n).select(`.treemapLabel`);if(r.empty()||r.style(`display`)===`none`){t.style(`display`,`none`);return}let a=parseFloat(r.style(`font-size`)),o=Math.max(G,Math.min(U,Math.round(a*.6)));t.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+J;t.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-2*K;t.node().getComputedTextLength()>u||s+o>l||o<G?t.style(`display`,`none`):t.style(`display`,null)}),S(x,f.diagramPadding??8,`flowchart`,f?.useMaxWidth||!1)},`draw`),getClasses:o(function(e,t){return t.db.getClasses()},`getClasses`)},P={sectionStrokeColor:`black`,sectionStrokeWidth:`1`,sectionFillColor:`#efefef`,leafStrokeColor:`black`,leafStrokeWidth:`1`,leafFillColor:`#efefef`,labelFontSize:`12px`,valueFontSize:`10px`,titleFontSize:`14px`},F={parser:k,get db(){return new T},renderer:N,styles:o(({treemap:e}={})=>{let t=x(c(),p().themeVariables),n=x(P,e),r=n.titleColor??t.titleColor,i=n.labelColor??t.textColor,a=n.valueColor??t.textColor;return`
|
|
1
|
+
import{c as e,it as t,l as n,st as r,u as i}from"./vendor-charts-D_CNNxD5.js";import{n as a}from"./mermaid-parser.core-DV_Ys_OF.js";import{n as o}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as s}from"./src-D0ZYDfff.js";import{D as c,H as l,K as u,U as d,a as f,b as p,c as m,f as h,v as g,w as _,y as v}from"./chunk-WYO6CB5R-Cndg0Yo5.js";import{t as y}from"./chunk-VAUOI2AC-BrcFPe7Z.js";import{t as b}from"./chunk-JWPE2WC7-DVXcaiue.js";import{i as x}from"./chunk-ICXQ74PX-zJg8KmvA.js";import{t as S}from"./chunk-VR4S4FIN-jB_W-MHs.js";import{i as C,n as w}from"./chunk-C7G6YPKG-UMP_bNDd.js";var T=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=d,this.getAccTitle=v,this.setDiagramTitle=u,this.getDiagramTitle=_,this.getAccDescription=g,this.setAccDescription=l}static{o(this,`TreeMapDB`)}getNodes(){return this.nodes}getConfig(){let e=h,t=p();return x({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:``,children:this.outerNodes}}addClass(e,t){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},r=t.replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);r&&r.forEach(e=>{w(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){f(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function E(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}o(E,`buildHierarchy`);var D=o((e,t)=>{b(e,t);let n=[];for(let n of e.TreemapRows??[])n.$type===`ClassDefStatement`&&t.addClass(n.className??``,n.styleText??``);for(let r of e.TreemapRows??[]){let e=r.item;if(!e)continue;let i=r.indent?parseInt(r.indent):0,a=O(e),o=e.classSelector?t.getStylesForClass(e.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:s};n.push(c)}let r=E(n),i=o((e,n)=>{for(let r of e)t.addNode(r,n),r.children&&r.children.length>0&&i(r.children,n+1)},`addNodesRecursively`);i(r,0)},`populate`),O=o(e=>e.name?String(e.name):``,`getItemName`),k={parser:{yy:void 0},parse:o(async e=>{try{let t=await a(`treemap`,e);s.debug(`Treemap AST:`,t);let n=k.parser?.yy;if(!(n instanceof T))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);D(t,n)}catch(e){throw s.error(`Error parsing treemap:`,e),e}},`parse`)},A=10,j=10,M=25,N={draw:o((a,c,l,u)=>{let d=u.db,f=d.getConfig(),h=f.padding??A,g=d.getDiagramTitle(),_=d.getRoot(),{themeVariables:v}=p();if(!_)return;let b=g?30:0,x=y(c),w=f.nodeWidth?f.nodeWidth*j:960,T=f.nodeHeight?f.nodeHeight*j:500,E=w,D=T+b;x.attr(`viewBox`,`0 0 ${E} ${D}`),m(x,D,E,f.useMaxWidth);let O;try{let e=f.valueFormat||`,`;if(e===`$0,0`)O=o(e=>`$`+t(`,`)(e),`valueFormat`);else if(e.startsWith(`$`)&&e.includes(`,`)){let n=/\.\d+/.exec(e),r=n?n[0]:``;O=o(e=>`$`+t(`,`+r)(e),`valueFormat`)}else if(e.startsWith(`$`)){let n=e.substring(1);O=o(e=>`$`+t(n||``)(e),`valueFormat`)}else O=t(e)}catch(e){s.error(`Error creating format function:`,e),O=t(`,`)}let k=r().range([`transparent`,v.cScale0,v.cScale1,v.cScale2,v.cScale3,v.cScale4,v.cScale5,v.cScale6,v.cScale7,v.cScale8,v.cScale9,v.cScale10,v.cScale11]),N=r().range([`transparent`,v.cScalePeer0,v.cScalePeer1,v.cScalePeer2,v.cScalePeer3,v.cScalePeer4,v.cScalePeer5,v.cScalePeer6,v.cScalePeer7,v.cScalePeer8,v.cScalePeer9,v.cScalePeer10,v.cScalePeer11]),P=r().range([v.cScaleLabel0,v.cScaleLabel1,v.cScaleLabel2,v.cScaleLabel3,v.cScaleLabel4,v.cScaleLabel5,v.cScaleLabel6,v.cScaleLabel7,v.cScaleLabel8,v.cScaleLabel9,v.cScaleLabel10,v.cScaleLabel11]);g&&x.append(`text`).attr(`x`,E/2).attr(`y`,b/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(g);let F=x.append(`g`).attr(`transform`,`translate(0, ${b})`).attr(`class`,`treemapContainer`),I=n(_).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),L=e().size([w,T]).paddingTop(e=>e.children&&e.children.length>0?M+j:0).paddingInner(h).paddingLeft(e=>e.children&&e.children.length>0?j:0).paddingRight(e=>e.children&&e.children.length>0?j:0).paddingBottom(e=>e.children&&e.children.length>0?j:0).round(!0)(I),R=L.descendants().filter(e=>e.children&&e.children.length>0),z=F.selectAll(`.treemapSection`).data(R).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);z.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,M).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),z.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${c}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,M),z.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>k(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>N(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=C({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),z.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,M/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`clip-path`,(e,t)=>`url(#clip-section-${c}-${t})`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+P(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+C({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let t=i(this),n=e.data.name;t.text(n);let r=e.x1-e.x0,a;a=f.showValues!==!1&&e.value?r-10-30-10-6:r-6-6;let o=Math.max(15,a),s=t.node();if(s.getComputedTextLength()>o){let e=n;for(;e.length>0;){if(e=n.substring(0,e.length-1),e.length===0){t.text(`...`),s.getComputedTextLength()>o&&t.text(``);break}if(t.text(e+`...`),s.getComputedTextLength()<=o)break}}}),f.showValues!==!1&&z.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,M/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?O(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+P(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+C({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let B=L.leaves(),V=B.length>20,H=V?16:38,U=V?14:28,W=V?4:8,G=V?4:6,K=V?2:4,q=V?8:10,J=V?1:2,Y=F.selectAll(`.treemapLeafGroup`).data(B).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);Y.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?k(e.parent.data.name):k(e.data.name)).attr(`style`,e=>C({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?k(e.parent.data.name):k(e.data.name)).attr(`stroke-width`,3),Y.append(`clipPath`).attr(`id`,(e,t)=>`clip-${c}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),Y.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${H}px;fill:`+P(e.data.name)+`;`+C({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${c}-${t})`).text(e=>e.data.name).each(function(e){let t=i(this),n=e.x1-e.x0,r=e.y1-e.y0,a=t.node(),o=n-2*K,s=r-2*K;if(o<q||s<q){t.style(`display`,`none`);return}let c=parseInt(t.style(`font-size`),10),l=.6;for(;a.getComputedTextLength()>o&&c>W;)c--,t.style(`font-size`,`${c}px`);let u=Math.max(G,Math.min(U,Math.round(c*l))),d=c+J+u;for(;d>s&&c>W&&(c--,u=Math.max(G,Math.min(U,Math.round(c*l))),!(u<G&&c===W));)t.style(`font-size`,`${c}px`),d=c+J+u;t.style(`font-size`,`${c}px`),V?(c<W||s<W)&&t.style(`display`,`none`):(a.getComputedTextLength()>o||c<W||s<c)&&t.style(`display`,`none`)}),f.showValues!==!1&&Y.append(`text`).attr(`class`,`treemapValue`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${U}px;fill:`+P(e.data.name)+`;`+C({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${c}-${t})`).text(e=>e.value?O(e.value):``).each(function(e){let t=i(this),n=this.parentNode;if(!n){t.style(`display`,`none`);return}let r=i(n).select(`.treemapLabel`);if(r.empty()||r.style(`display`)===`none`){t.style(`display`,`none`);return}let a=parseFloat(r.style(`font-size`)),o=Math.max(G,Math.min(U,Math.round(a*.6)));t.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+J;t.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-2*K;t.node().getComputedTextLength()>u||s+o>l||o<G?t.style(`display`,`none`):t.style(`display`,null)}),S(x,f.diagramPadding??8,`flowchart`,f?.useMaxWidth||!1)},`draw`),getClasses:o(function(e,t){return t.db.getClasses()},`getClasses`)},P={sectionStrokeColor:`black`,sectionStrokeWidth:`1`,sectionFillColor:`#efefef`,leafStrokeColor:`black`,leafStrokeWidth:`1`,leafFillColor:`#efefef`,labelFontSize:`12px`,valueFontSize:`10px`,titleFontSize:`14px`},F={parser:k,get db(){return new T},renderer:N,styles:o(({treemap:e}={})=>{let t=x(c(),p().themeVariables),n=x(P,e),r=n.titleColor??t.titleColor,i=n.labelColor??t.textColor,a=n.valueColor??t.textColor;return`
|
|
2
2
|
.treemapNode.section {
|
|
3
3
|
stroke: ${n.sectionStrokeColor};
|
|
4
4
|
stroke-width: ${n.sectionStrokeWidth};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./mermaid-parser.core-
|
|
1
|
+
import{n as e}from"./mermaid-parser.core-DV_Ys_OF.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as n}from"./src-D0ZYDfff.js";import{H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f}from"./chunk-WYO6CB5R-Cndg0Yo5.js";import{t as p}from"./chunk-VAUOI2AC-BrcFPe7Z.js";import{t as m}from"./chunk-JWPE2WC7-DVXcaiue.js";import{i as h}from"./chunk-ICXQ74PX-zJg8KmvA.js";var g=l.packet,_=class{constructor(){this.packet=[],this.setAccTitle=a,this.getAccTitle=f,this.setDiagramTitle=i,this.getDiagramTitle=d,this.getAccDescription=u,this.setAccDescription=r}static{t(this,`PacketDB`)}getConfig(){let e=h({...g,...s().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){o(),this.packet=[]}},v=1e4,y=t((e,t)=>{m(e,t);let r=-1,i=[],a=1,{bitsPerRow:o}=t.getConfig();for(let{start:s,end:c,bits:l,label:u}of e.blocks){if(s!==void 0&&c!==void 0&&c<s)throw Error(`Packet block ${s} - ${c} is invalid. End must be greater than start.`);if(s??=r+1,s!==r+1)throw Error(`Packet block ${s} - ${c??s} is not contiguous. It should start from ${r+1}.`);if(l===0)throw Error(`Packet block ${s} is invalid. Cannot have a zero bit field.`);for(c??=s+(l??1)-1,l??=c-s+1,r=c,n.debug(`Packet block ${s} - ${r} with label ${u}`);i.length<=o+1&&t.getPacket().length<v;){let[e,n]=b({start:s,end:c,bits:l,label:u},a,o);if(i.push(e),e.end+1===a*o&&(t.pushWord(i),i=[],a++),!n)break;({start:s,end:c,bits:l,label:u}=n)}}t.pushWord(i)},`populate`),b=t((e,t,n)=>{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),x={parser:{yy:void 0},parse:t(async t=>{let r=await e(`packet`,t),i=x.parser?.yy;if(!(i instanceof _))throw Error(`parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);n.debug(r),y(r,i)},`parse`)},S=t((e,t,n,r)=>{let i=r.db,a=i.getConfig(),{rowHeight:o,paddingY:s,bitWidth:l,bitsPerRow:u}=a,d=i.getPacket(),f=i.getDiagramTitle(),m=o+s,h=m*(d.length+1)-(f?0:o),g=l*u+2,_=p(t);_.attr(`viewBox`,`0 0 ${g} ${h}`),c(_,h,g,a.useMaxWidth);for(let[e,t]of d.entries())C(_,t,e,a);_.append(`text`).text(f).attr(`x`,g/2).attr(`y`,h-m/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),C=t((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:c})=>{let l=e.append(`g`),u=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;if(l.append(`rect`).attr(`x`,t).attr(`y`,u).attr(`width`,n).attr(`height`,r).attr(`class`,`packetBlock`),l.append(`text`).attr(`x`,t+n/2).attr(`y`,u+r/2).attr(`class`,`packetLabel`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).text(e.label),!c)continue;let a=e.end===e.start,d=u-2;l.append(`text`).attr(`x`,t+(a?n/2:0)).attr(`y`,d).attr(`class`,`packetByte start`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,a?`middle`:`start`).text(e.start),a||l.append(`text`).attr(`x`,t+n).attr(`y`,d).attr(`class`,`packetByte end`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,`end`).text(e.end)}},`drawWord`),w={draw:S},T={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},E={parser:x,get db(){return new _},renderer:w,styles:t(({packet:e}={})=>{let t=h(T,e);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${t.byteFontSize};
|
|
4
4
|
}
|