@nocobase/portal-template-default 1.0.15 → 1.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/AGENTS.md +8 -0
  2. package/README.MD +4 -0
  3. package/dist/assets/{LineDraw-iG-ADes-.js → LineDraw-BBB5hwuJ.js} +1 -1
  4. package/dist/assets/{SymbolDraw-DXoSw1tM.js → SymbolDraw-CKS3uUb_.js} +1 -1
  5. package/dist/assets/{VisualMapping-C_ee4Eht.js → VisualMapping-BCwaW3TD.js} +1 -1
  6. package/dist/assets/auth-method-demo-BdCCvEEz.js +1 -0
  7. package/dist/assets/{auto-login-provider-5Uxza9Ms.js → auto-login-provider-DO5Il6Dp.js} +2 -2
  8. package/dist/assets/auto-login-provider-TQ08B6-i.js +1 -0
  9. package/dist/assets/auto-redirect-provider-ButXp0A3.js +1 -0
  10. package/dist/assets/auto-redirect-provider-DnGGP2Vn.js +1 -0
  11. package/dist/assets/auto-redirect-provider-ja-vFPaF.js +1 -0
  12. package/dist/assets/calendar-C7xnRgOT.js +1 -0
  13. package/dist/assets/{cas-sign-in-button-CyqG1QME.js → cas-sign-in-button-BZCa4lR6.js} +1 -1
  14. package/dist/assets/{components-D-ptYjX_.js → components-_g-GjQeV.js} +3 -3
  15. package/dist/assets/{configuration-gate-C08mkkiX.js → configuration-gate-B4XVz7tS.js} +1 -1
  16. package/dist/assets/{createClipPathFromCoordSys-wj34-b1B.js → createClipPathFromCoordSys-z9Kmh-tu.js} +1 -1
  17. package/dist/assets/createSeriesDataSimply-CPqysF0K.js +1 -0
  18. package/dist/assets/{customGraphicKeyframeAnimation-DWrhrHL_.js → customGraphicKeyframeAnimation-DMU5crAu.js} +1 -1
  19. package/dist/assets/demo-BPlae2bp.js +1 -0
  20. package/dist/assets/demo-Bj_Y0RrW.js +1 -0
  21. package/dist/assets/demo-CKPAQOib.js +1 -0
  22. package/dist/assets/demo-CXRTPvIx.js +1 -0
  23. package/dist/assets/demo-DJuVDu1n.js +1 -0
  24. package/dist/assets/demo-DUmWU7ik.js +1 -0
  25. package/dist/assets/demo-NhIzFRE1.js +1 -0
  26. package/dist/assets/{dingtalk-sign-in-button-DSWsSruv.js → dingtalk-sign-in-button-DMPgE5kT.js} +1 -1
  27. package/dist/assets/{echarts-preview-DxHNfq1C.js → echarts-preview-R96Pbqmz.js} +1 -1
  28. package/dist/assets/{echarts-runtime-D8kXn6ME.js → echarts-runtime-Ce_z2eX_.js} +3 -3
  29. package/dist/assets/{echarts-runtime-advanced-QY8v95qK.js → echarts-runtime-advanced-Dr80KHJR.js} +1 -1
  30. package/dist/assets/{echarts-runtime-common-D-yqAK-r.js → echarts-runtime-common-DB95Yfc1.js} +1 -1
  31. package/dist/assets/{echarts-runtime-components-P4-i8jPU.js → echarts-runtime-components-DCJEaTJk.js} +1 -1
  32. package/dist/assets/{echarts-runtime-hierarchy-ByQZ-DbP.js → echarts-runtime-hierarchy-CezgZs9O.js} +1 -1
  33. package/dist/assets/{floating-BFVEyPEp.js → floating-O9WmiDXk.js} +2 -2
  34. package/dist/assets/index-BBKV6O5d.css +1 -0
  35. package/dist/assets/{index-Btk35Nx-.js → index-CPzehPGe.js} +3 -3
  36. package/dist/assets/index-Cc6awvdg.js +1064 -0
  37. package/dist/assets/index-ChA0z9ke.js +38 -0
  38. package/dist/assets/{index-um5hdKdZ.js → index-DgB7uTMs.js} +2 -2
  39. package/dist/assets/{index-CwNxd66J.js → index-DroUAK80.js} +1 -1
  40. package/dist/assets/index-WKvygTBp.js +59 -0
  41. package/dist/assets/{labelHelper-DQqRy3a_.js → labelHelper-Dk5jkiD-.js} +1 -1
  42. package/dist/assets/ldap-sign-in-form-CKN4l7qM.js +1 -0
  43. package/dist/assets/{oidc-sign-in-button-CQdRcR_p.js → oidc-sign-in-button-BIRonrpC.js} +1 -1
  44. package/dist/assets/{page-context-CnQ4GYM7.js → page-context-DAiW_dId.js} +3 -3
  45. package/dist/assets/prompt-card-rGZqpqkF.js +1 -0
  46. package/dist/assets/prompt-output-B4h3uLWf.js +1 -0
  47. package/dist/assets/saml-sign-in-button-B4ugaLIb.js +1 -0
  48. package/dist/assets/{sectorHelper-DN_Vv6OL.js → sectorHelper-BuxrrJrA.js} +1 -1
  49. package/dist/assets/shortcut-BhKXxJLs.js +47 -0
  50. package/dist/assets/{sms-sign-in-form-DTX9GV2I.js → sms-sign-in-form-DKpxRDdZ.js} +1 -1
  51. package/dist/assets/{static.browser-jI1psK0d.js → static.browser-kzzpH0Xt.js} +8 -8
  52. package/dist/assets/switch-BdVxPIVU.js +1 -0
  53. package/dist/assets/{tool-cards-DFttLAfo.js → tool-cards-CpczIke-.js} +3 -3
  54. package/dist/assets/{use-authenticator-sign-in-CRGjzXju.js → use-authenticator-sign-in-CIj210ry.js} +1 -1
  55. package/dist/assets/use-dingtalk-sign-in-BW4kkXD3.js +1 -0
  56. package/dist/assets/{use-wecom-sign-in-C9j8wfCD.js → use-wecom-sign-in-dIqMtcN9.js} +1 -1
  57. package/dist/assets/wecom-sign-in-button-Dn_2zDab.js +1 -0
  58. package/dist/index.html +2 -2
  59. package/dist/index.raw.html +2 -2
  60. package/package.json +9 -1
  61. package/src/App.tsx +5 -2
  62. package/src/app/extension.ts +2 -0
  63. package/src/app/extensions.tsx +18 -6
  64. package/src/app/route-access-guard.tsx +22 -0
  65. package/src/app/route-runtime.ts +173 -0
  66. package/src/app/routes.tsx +2 -2
  67. package/src/components/app-shell/header.tsx +56 -1
  68. package/src/components/app-shell/sidebar.tsx +14 -2
  69. package/src/components/auth/sign-up-form.tsx +287 -59
  70. package/src/components/auth/types.ts +23 -1
  71. package/src/extensions/nocobase-acl/README.md +28 -14
  72. package/src/extensions/nocobase-acl/demo/index.tsx +87 -15
  73. package/src/extensions/nocobase-acl/demo/prompt-generator.tsx +1 -0
  74. package/src/extensions/nocobase-mail/README.md +74 -0
  75. package/src/extensions/nocobase-mail/components/index.ts +79 -0
  76. package/src/extensions/nocobase-mail/components/mail-api.ts +423 -0
  77. package/src/extensions/nocobase-mail/components/mail-attachment-list.tsx +67 -0
  78. package/src/extensions/nocobase-mail/components/mail-compose-attachments.tsx +166 -0
  79. package/src/extensions/nocobase-mail/components/mail-compose.tsx +1071 -0
  80. package/src/extensions/nocobase-mail/components/mail-detail.tsx +653 -0
  81. package/src/extensions/nocobase-mail/components/mail-draft-autosave.ts +26 -0
  82. package/src/extensions/nocobase-mail/components/mail-empty.tsx +48 -0
  83. package/src/extensions/nocobase-mail/components/mail-filters.tsx +277 -0
  84. package/src/extensions/nocobase-mail/components/mail-inbox.tsx +544 -0
  85. package/src/extensions/nocobase-mail/components/mail-inline-images.ts +69 -0
  86. package/src/extensions/nocobase-mail/components/mail-label-badge.tsx +25 -0
  87. package/src/extensions/nocobase-mail/components/mail-label-manager.tsx +271 -0
  88. package/src/extensions/nocobase-mail/components/mail-labels-editor.tsx +267 -0
  89. package/src/extensions/nocobase-mail/components/mail-mass-tracking.tsx +271 -0
  90. package/src/extensions/nocobase-mail/components/mail-note-editor.tsx +99 -0
  91. package/src/extensions/nocobase-mail/components/mail-recipient-input.tsx +260 -0
  92. package/src/extensions/nocobase-mail/components/mail-reply-quote.ts +28 -0
  93. package/src/extensions/nocobase-mail/components/mail-rich-editor.tsx +287 -0
  94. package/src/extensions/nocobase-mail/components/mail-send-actions.tsx +238 -0
  95. package/src/extensions/nocobase-mail/components/mail-senders.ts +61 -0
  96. package/src/extensions/nocobase-mail/components/mail-settings-drawer.tsx +708 -0
  97. package/src/extensions/nocobase-mail/components/mail-showcase-layout.tsx +64 -0
  98. package/src/extensions/nocobase-mail/components/mail-signature-manager.tsx +258 -0
  99. package/src/extensions/nocobase-mail/components/mail-signatures.ts +25 -0
  100. package/src/extensions/nocobase-mail/components/mail-table.tsx +476 -0
  101. package/src/extensions/nocobase-mail/components/mail-template-manager.tsx +204 -0
  102. package/src/extensions/nocobase-mail/components/mail-toolbar.tsx +155 -0
  103. package/src/extensions/nocobase-mail/components/mail-unread.tsx +111 -0
  104. package/src/extensions/nocobase-mail/components/types.ts +297 -0
  105. package/src/extensions/nocobase-mail/components/use-mail-compose.tsx +262 -0
  106. package/src/extensions/nocobase-mail/components/use-mail-mass-messages.ts +54 -0
  107. package/src/extensions/nocobase-mail/components/use-mail-messages.ts +113 -0
  108. package/src/extensions/nocobase-mail/components/use-mail-signatures.ts +122 -0
  109. package/src/extensions/nocobase-mail/components/use-mail-templates.ts +54 -0
  110. package/src/extensions/nocobase-mail/extension.tsx +105 -0
  111. package/src/extensions/nocobase-mail/index.ts +1 -0
  112. package/src/extensions/nocobase-mail/mail-demo-pages.tsx +503 -0
  113. package/src/extensions/nocobase-mail/mail-pages.tsx +201 -0
  114. package/src/extensions/nocobase-mail/tests/mail-quote-html-regression.mjs +51 -0
  115. package/src/extensions/nocobase-mail/tests/mail-regression.mjs +649 -0
  116. package/src/extensions/nocobase-users-example/app-routes.tsx +121 -0
  117. package/src/extensions/nocobase-users-example/extension.tsx +2 -100
  118. package/src/extensions/nocobase-users-example/index.ts +1 -0
  119. package/src/lib/nocobase/acl/menu.ts +17 -3
  120. package/src/lib/nocobase/acl/types.ts +4 -0
  121. package/src/locales/en-US.ts +2 -1
  122. package/src/locales/zh-CN.ts +2 -1
  123. package/src/providers/runtime-config.ts +18 -0
  124. package/src/routes.tsx +10 -0
  125. package/src/vite-env.d.ts +3 -0
  126. package/vite.config.ts +8 -0
  127. package/dist/assets/auth-method-demo-DaOCuvsq.js +0 -1
  128. package/dist/assets/auto-login-provider-DyaPGK2D.js +0 -1
  129. package/dist/assets/auto-redirect-provider-CfwRvYOI.js +0 -1
  130. package/dist/assets/auto-redirect-provider-Cr3jmYts.js +0 -1
  131. package/dist/assets/auto-redirect-provider-QkJQRBbG.js +0 -1
  132. package/dist/assets/calendar-DjDRfD5t.js +0 -1
  133. package/dist/assets/card-DuQBOS6A.js +0 -1
  134. package/dist/assets/createSeriesDataSimply-D0A6SAVQ.js +0 -1
  135. package/dist/assets/demo-BYWHeKUe.js +0 -1
  136. package/dist/assets/demo-CPWoNtx8.js +0 -1
  137. package/dist/assets/demo-CyvJk5zV.js +0 -1
  138. package/dist/assets/demo-D4OiKplc.js +0 -1
  139. package/dist/assets/demo-DBueJg0m.js +0 -1
  140. package/dist/assets/demo-DkIhyiRK.js +0 -1
  141. package/dist/assets/demo-tpTjO0sC.js +0 -1
  142. package/dist/assets/index-BgCbGDMc.js +0 -43
  143. package/dist/assets/index-MB-jfQld.js +0 -686
  144. package/dist/assets/index-NH3aqqQz.css +0 -1
  145. package/dist/assets/index-gFtCXH3o.js +0 -58
  146. package/dist/assets/ldap-sign-in-form--6Gt3yGq.js +0 -1
  147. package/dist/assets/prompt-card-B2RS4nt2.js +0 -1
  148. package/dist/assets/prompt-output-DZHRM2ft.js +0 -1
  149. package/dist/assets/saml-sign-in-button-BHL5a0JV.js +0 -1
  150. package/dist/assets/shortcut-C5x5LQWU.js +0 -47
  151. package/dist/assets/switch-CRL8PmRI.js +0 -1
  152. package/dist/assets/use-dingtalk-sign-in-8WYzJ2jf.js +0 -1
  153. package/dist/assets/wecom-sign-in-button-mIS1zGSU.js +0 -1
@@ -1,9 +1,9 @@
1
- import{t as E,b as c,bi as O,bj as B,j as e,bk as T,bl as G,bm as V,bn as _,bo as H,bp as M,bq as X,D as i,aO as J,c as A,k as L,d as Q,e as W,f as Y,g as Z,i as ee,I as te,br as x,bs as f,bt as b,B as g,b1 as ae,bu as se,bv as re,bw as oe}from"./index-MB-jfQld.js";import{C as v,a as y,b as C,c as R,d as D}from"./card-DuQBOS6A.js";import{P as ne}from"./prompt-output-DZHRM2ft.js";/**
1
+ import{y as F,b as c,bq as L,br as B,j as e,bs as T,bt as G,bu as H,bv as V,bw as _,bx as M,by as X,K as i,aH as J,c as A,C as b,k as v,l as y,m as C,n as R,o as O,d as Q,e as W,f as Y,g as Z,i as ee,I as te,bz as x,bA as f,bB as D,B as g,b9 as ae,bC as se,bD as re,bE as oe}from"./index-Cc6awvdg.js";import{P as ne}from"./prompt-output-B4h3uLWf.js";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const ie=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],N=E("arrow-right",ie);function U({title:t,description:a,actions:s,children:o,closeLabel:p,closeTo:w,beforeClose:r,className:I,nested:z}){const k=c.useContext(O),$=k>0,{open:S,setOpen:P,close:n,navigateAfterClose:q}=B({closeTo:w,beforeClose:r,animated:!0}),F=c.useCallback((d,K)=>{if(d){P(!0);return}K.cancel(),n()},[n,P]);return e.jsx(T.Provider,{value:n,children:e.jsx(O.Provider,{value:k+1,children:e.jsxs(G,{open:S,onOpenChange:F,onOpenChangeComplete:d=>{d||q()},children:[e.jsxs(V,{children:[$?e.jsx(le,{open:S,onClose:n}):e.jsx(_,{className:"fixed inset-0 isolate z-50 bg-black/10 duration-150 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",onClick:d=>{d.stopPropagation(),n()}}),e.jsxs(H,{className:A("fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl bg-popover text-sm text-popover-foreground ring-1 ring-foreground/10 duration-150 outline-none sm:max-w-2xl data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",I),children:[e.jsxs("header",{className:"relative shrink-0 border-b px-5 py-4 pr-14 text-left",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx(M,{className:"font-heading truncate text-lg font-medium",children:t}),a?e.jsx(X,{className:"text-sm text-muted-foreground",children:a}):null]}),s?e.jsx("div",{className:"flex shrink-0 items-center gap-2",children:s}):null]}),e.jsxs(i,{type:"button",variant:"ghost",size:"icon-sm",className:"absolute top-3 right-3",onClick:()=>void n(),children:[e.jsx(J,{}),e.jsx("span",{className:"sr-only",children:p})]})]}),o]})]}),z]})})})}function le({open:t,onClose:a}){return e.jsx("div",{role:"presentation","aria-hidden":"true",className:A("fixed inset-0 isolate z-50 bg-black/10 transition-opacity duration-150 supports-backdrop-filter:backdrop-blur-xs",t?"opacity-100":"pointer-events-none opacity-0"),onClick:s=>{s.stopPropagation(),a()}})}function de({children:t,closeTo:a,beforeClose:s}){const{close:o}=B({closeTo:a,beforeClose:s,animated:!1});return e.jsx(T.Provider,{value:o,children:t})}const m=[{id:"drawer",number:"1",title:"Drawer route",description:"Keep the current page mounted and open one URL-backed drawer.",path:"drawer",routeShape:"Page → Drawer"},{id:"dialog",number:"2",title:"Dialog route",description:"Open focused content in a modal while preserving the page URL history.",path:"dialog",routeShape:"Page → Dialog"},{id:"page",number:"3",title:"Child page",description:"Replace the current page instead of rendering the child inside an overlay.",path:"page",routeShape:"Page → Child page"},{id:"nested-drawers",number:"4",title:"Second-level drawer",description:"Push the lower drawer outward and keep the top drawer at a stable size.",path:"drawer/second",routeShape:"Page → Drawer → Drawer"},{id:"page-drawer-dialog",number:"5",title:"Page, drawer, and dialog",description:"Compose different presentation types without coupling business content to them.",path:"page/drawer/dialog",routeShape:"Child page → Drawer → Dialog"}];function ce(t,a){const s={drawer:"Keep the current page mounted and open the target content with RouteDrawer. Closing the drawer returns to the page route.",dialog:"Keep the current page mounted and open the target content with RouteDialog. The dialog route must be directly addressable and dismissible through the shared close lifecycle.",page:"Render the target content as a real child page with RoutePage. Register it as a page route branch rather than placing it inside a drawer outlet.","nested-drawers":"Create a parent RouteDrawer with an Outlet and pass the rendered child outlet through its nested prop. The second RouteDrawer must push the lower drawer outward, keep equal widths, and close back to the parent route.","page-drawer-dialog":"Render a RoutePage first, place a RouteDrawer route inside that page, then render a RouteDialog as the drawer's nested route. Closing each layer must return to the immediately lower URL."}[t.id];return`Build ${a||"the requested workflow"} with the installed NocoBase route surfaces.
6
+ */const ie=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],N=F("arrow-right",ie);function U({title:t,description:a,actions:s,children:o,closeLabel:p,closeTo:w,beforeClose:r,className:z,nested:I}){const k=c.useContext(L),K=k>0,{open:S,setOpen:P,close:n,navigateAfterClose:$}=B({closeTo:w,beforeClose:r,animated:!0}),q=c.useCallback((d,E)=>{if(d){P(!0);return}E.cancel(),n()},[n,P]);return e.jsx(T.Provider,{value:n,children:e.jsx(L.Provider,{value:k+1,children:e.jsxs(G,{open:S,onOpenChange:q,onOpenChangeComplete:d=>{d||$()},children:[e.jsxs(H,{children:[K?e.jsx(le,{open:S,onClose:n}):e.jsx(V,{className:"fixed inset-0 isolate z-50 bg-black/10 duration-150 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",onClick:d=>{d.stopPropagation(),n()}}),e.jsxs(_,{className:A("fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl bg-popover text-sm text-popover-foreground ring-1 ring-foreground/10 duration-150 outline-none sm:max-w-2xl data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",z),children:[e.jsxs("header",{className:"relative shrink-0 border-b px-5 py-4 pr-14 text-left",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx(M,{className:"font-heading truncate text-lg font-medium",children:t}),a?e.jsx(X,{className:"text-sm text-muted-foreground",children:a}):null]}),s?e.jsx("div",{className:"flex shrink-0 items-center gap-2",children:s}):null]}),e.jsxs(i,{type:"button",variant:"ghost",size:"icon-sm",className:"absolute top-3 right-3",onClick:()=>void n(),children:[e.jsx(J,{}),e.jsx("span",{className:"sr-only",children:p})]})]}),o]})]}),I]})})})}function le({open:t,onClose:a}){return e.jsx("div",{role:"presentation","aria-hidden":"true",className:A("fixed inset-0 isolate z-50 bg-black/10 transition-opacity duration-150 supports-backdrop-filter:backdrop-blur-xs",t?"opacity-100":"pointer-events-none opacity-0"),onClick:s=>{s.stopPropagation(),a()}})}function de({children:t,closeTo:a,beforeClose:s}){const{close:o}=B({closeTo:a,beforeClose:s,animated:!1});return e.jsx(T.Provider,{value:o,children:t})}const m=[{id:"drawer",number:"1",title:"Drawer route",description:"Keep the current page mounted and open one URL-backed drawer.",path:"drawer",routeShape:"Page → Drawer"},{id:"dialog",number:"2",title:"Dialog route",description:"Open focused content in a modal while preserving the page URL history.",path:"dialog",routeShape:"Page → Dialog"},{id:"page",number:"3",title:"Child page",description:"Replace the current page instead of rendering the child inside an overlay.",path:"page",routeShape:"Page → Child page"},{id:"nested-drawers",number:"4",title:"Second-level drawer",description:"Push the lower drawer outward and keep the top drawer at a stable size.",path:"drawer/second",routeShape:"Page → Drawer → Drawer"},{id:"page-drawer-dialog",number:"5",title:"Page, drawer, and dialog",description:"Compose different presentation types without coupling business content to them.",path:"page/drawer/dialog",routeShape:"Child page → Drawer → Dialog"}];function ce(t,a){const s={drawer:"Keep the current page mounted and open the target content with RouteDrawer. Closing the drawer returns to the page route.",dialog:"Keep the current page mounted and open the target content with RouteDialog. The dialog route must be directly addressable and dismissible through the shared close lifecycle.",page:"Render the target content as a real child page with RoutePage. Register it as a page route branch rather than placing it inside a drawer outlet.","nested-drawers":"Create a parent RouteDrawer with an Outlet and pass the rendered child outlet through its nested prop. The second RouteDrawer must push the lower drawer outward, keep equal widths, and close back to the parent route.","page-drawer-dialog":"Render a RoutePage first, place a RouteDrawer route inside that page, then render a RouteDialog as the drawer's nested route. Closing each layer must return to the immediately lower URL."}[t.id];return`Build ${a||"the requested workflow"} with the installed NocoBase route surfaces.
7
7
 
8
8
  Scenario:
9
9
  - ${t.routeShape}
@@ -20,4 +20,4 @@ Implementation requirements:
20
20
  - Direct URL entry, refresh, browser back/forward, Escape, the close button, and backdrop dismissal must all restore the correct layer stack.
21
21
  - Apply Refine CanAccess with an AccessDenied fallback to each business resource/action independently; do not rely on a parent list permission for unrelated child pages.
22
22
 
23
- Deliver the complete route definitions and React components using the application's existing design system.`}function ue(){const[t,a]=c.useState("drawer"),[s,o]=c.useState("a customer detail workflow"),p=m.find(r=>r.id===t)??m[0],w=c.useMemo(()=>ce(p,s),[p,s]);return e.jsxs(v,{children:[e.jsxs(y,{children:[e.jsx(C,{children:"Prompt generator"}),e.jsx(R,{children:"Generate a complete routing scenario, not just an isolated overlay component."})]}),e.jsxs(D,{className:"grid items-start gap-5 xl:grid-cols-[360px_minmax(0,1fr)]",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(L,{htmlFor:"route-surface-scenario",children:"Scenario"}),e.jsxs(Q,{value:t,onValueChange:r=>a(r),children:[e.jsx(W,{id:"route-surface-scenario",className:"w-full",children:e.jsx(Y,{})}),e.jsx(Z,{children:m.map(r=>e.jsxs(ee,{value:r.id,children:[r.number,". ",r.title]},r.id))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(L,{htmlFor:"route-surface-target",children:"Business target"}),e.jsx(te,{id:"route-surface-target",value:s,onChange:r=>o(r.target.value)})]})]}),e.jsx(ne,{title:"Generated routing prompt",description:"Updates as you change the scenario and business target.",prompt:w,promptClassName:"min-h-80"})]})]})}const j="/route-surfaces";function l(){const{pathname:t}=ae(),a=t.indexOf(j);return a>=0?t.slice(0,a+j.length):j}function xe(){const t=x(),a=f();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{variant:"secondary",children:"Route surfaces"}),e.jsx("h1",{className:"font-heading text-3xl font-semibold tracking-tight",children:"URL-backed pages and overlays"}),e.jsx("p",{className:"max-w-3xl text-muted-foreground",children:"Keep business content independent from whether it appears as a page, drawer, dialog, or nested combination. Every preview below supports a direct URL and browser history."})]}),e.jsx("div",{className:"grid gap-4 lg:grid-cols-2 xl:grid-cols-3",children:m.map(s=>e.jsxs(v,{className:"flex flex-col",children:[e.jsxs(y,{children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs(g,{variant:"outline",children:["Scenario ",s.number]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:s.routeShape})]}),e.jsx(C,{children:s.title}),e.jsx(R,{children:s.description})]}),e.jsx(D,{className:"mt-auto",children:e.jsxs(i,{type:"button",variant:"outline",className:"w-full",onClick:()=>t(s.path),children:["Open preview",e.jsx(N,{})]})})]},s.id))}),e.jsx(ue,{})]}),a]})}function fe(){const t=x(),a=f(),s=l();return e.jsx(b,{title:"Customer details",description:"A routed drawer keeps the scenario page mounted behind it.",closeLabel:"Close",closeTo:s,nested:a,children:e.jsx(u,{label:"Drawer",title:"Northwind renewal",description:"Business content does not know that it is rendered inside a drawer.",children:e.jsxs(i,{onClick:()=>t("second"),children:["Open second-level drawer",e.jsx(N,{})]})})})}function we(){const t=l();return e.jsx(b,{title:"Renewal activity",description:"The lower drawer is pushed outward and remains behind the layer mask.",closeLabel:"Close",closeTo:`${t}/drawer`,children:e.jsx(u,{label:"Second-level drawer",title:"Latest review",description:"Clicking this layer's backdrop closes only the top drawer."})})}function je(){const t=l();return e.jsx(U,{title:"Approve renewal",description:"A modal route for a focused decision.",closeLabel:"Close",closeTo:t,children:e.jsx(u,{label:"Dialog",title:"Approval required",description:"The page stays mounted while the URL represents the active dialog."})})}function be(){const t=f(),a=l();return e.jsx(de,{closeTo:a,children:e.jsx(pe,{nested:t})})}function pe({nested:t}){const a=se(),s=x();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{variant:"secondary",children:"Child page"}),e.jsx("h1",{className:"font-heading text-3xl font-semibold tracking-tight",children:"Customer workspace"}),e.jsx("p",{className:"text-muted-foreground",children:"This route replaces the Demo home instead of rendering inside its Outlet."})]}),e.jsxs(i,{variant:"outline",onClick:()=>void a(),children:[e.jsx(re,{}),"Back to scenarios"]})]}),e.jsxs(v,{children:[e.jsxs(y,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(oe,{className:"size-5 text-primary"}),e.jsx(C,{children:"Page-owned workflow"})]}),e.jsx(R,{children:"A page can still host routed overlays without becoming coupled to their content."})]}),e.jsx(D,{children:e.jsx(i,{onClick:()=>s("drawer"),children:"Open page drawer"})})]})]}),t]})}function ve(){const t=x(),a=f(),s=l();return e.jsx(b,{title:"Customer activity",description:"This drawer belongs to the child page route.",closeLabel:"Close",closeTo:`${s}/page`,nested:a,children:e.jsx(u,{label:"Page drawer",title:"Renewal conversation",description:"Open a dialog above this drawer to test mixed presentation types.",children:e.jsxs(i,{onClick:()=>t("dialog"),children:["Open confirmation dialog",e.jsx(N,{})]})})})}function ye(){const t=l();return e.jsx(U,{title:"Confirm follow-up",description:"The dialog is nested in the drawer route subtree.",closeLabel:"Close",closeTo:`${t}/page/drawer`,children:e.jsx(u,{label:"Nested dialog",title:"Schedule a follow-up?",description:"Closing returns to the drawer; closing the drawer then returns to the page."})})}function u({label:t,title:a,description:s,children:o}){return e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-5",children:e.jsxs("div",{className:"space-y-5",children:[e.jsx(g,{variant:"outline",children:t}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-xl font-semibold",children:a}),e.jsx("p",{className:"text-muted-foreground",children:s})]}),e.jsxs("div",{className:"grid gap-3 rounded-lg border bg-muted/30 p-4 sm:grid-cols-2",children:[e.jsx(h,{label:"Owner",value:"Ada Lovelace"}),e.jsx(h,{label:"Status",value:"In review"}),e.jsx(h,{label:"Value",value:"$48,000"}),e.jsx(h,{label:"Renewal",value:"September 30"})]}),o?e.jsx("div",{children:o}):null]})})}function h({label:t,value:a}){return e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:t}),e.jsx("div",{className:"font-medium",children:a})]})}export{je as DemoDialogRoute,fe as DemoDrawerRoute,ye as DemoPageDrawerDialogRoute,ve as DemoPageDrawerRoute,be as DemoPageRoute,we as DemoSecondDrawerRoute,xe as RouteSurfacesDemoHome};
23
+ Deliver the complete route definitions and React components using the application's existing design system.`}function ue(){const[t,a]=c.useState("drawer"),[s,o]=c.useState("a customer detail workflow"),p=m.find(r=>r.id===t)??m[0],w=c.useMemo(()=>ce(p,s),[p,s]);return e.jsxs(b,{children:[e.jsxs(v,{children:[e.jsx(y,{children:"Prompt generator"}),e.jsx(C,{children:"Generate a complete routing scenario, not just an isolated overlay component."})]}),e.jsxs(R,{className:"grid items-start gap-5 xl:grid-cols-[360px_minmax(0,1fr)]",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(O,{htmlFor:"route-surface-scenario",children:"Scenario"}),e.jsxs(Q,{value:t,onValueChange:r=>a(r),children:[e.jsx(W,{id:"route-surface-scenario",className:"w-full",children:e.jsx(Y,{})}),e.jsx(Z,{children:m.map(r=>e.jsxs(ee,{value:r.id,children:[r.number,". ",r.title]},r.id))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(O,{htmlFor:"route-surface-target",children:"Business target"}),e.jsx(te,{id:"route-surface-target",value:s,onChange:r=>o(r.target.value)})]})]}),e.jsx(ne,{title:"Generated routing prompt",description:"Updates as you change the scenario and business target.",prompt:w,promptClassName:"min-h-80"})]})]})}const j="/route-surfaces";function l(){const{pathname:t}=ae(),a=t.indexOf(j);return a>=0?t.slice(0,a+j.length):j}function ge(){const t=x(),a=f();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{variant:"secondary",children:"Route surfaces"}),e.jsx("h1",{className:"font-heading text-3xl font-semibold tracking-tight",children:"URL-backed pages and overlays"}),e.jsx("p",{className:"max-w-3xl text-muted-foreground",children:"Keep business content independent from whether it appears as a page, drawer, dialog, or nested combination. Every preview below supports a direct URL and browser history."})]}),e.jsx("div",{className:"grid gap-4 lg:grid-cols-2 xl:grid-cols-3",children:m.map(s=>e.jsxs(b,{className:"flex flex-col",children:[e.jsxs(v,{children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs(g,{variant:"outline",children:["Scenario ",s.number]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:s.routeShape})]}),e.jsx(y,{children:s.title}),e.jsx(C,{children:s.description})]}),e.jsx(R,{className:"mt-auto",children:e.jsxs(i,{type:"button",variant:"outline",className:"w-full",onClick:()=>t(s.path),children:["Open preview",e.jsx(N,{})]})})]},s.id))}),e.jsx(ue,{})]}),a]})}function xe(){const t=x(),a=f(),s=l();return e.jsx(D,{title:"Customer details",description:"A routed drawer keeps the scenario page mounted behind it.",closeLabel:"Close",closeTo:s,nested:a,children:e.jsx(u,{label:"Drawer",title:"Northwind renewal",description:"Business content does not know that it is rendered inside a drawer.",children:e.jsxs(i,{onClick:()=>t("second"),children:["Open second-level drawer",e.jsx(N,{})]})})})}function fe(){const t=l();return e.jsx(D,{title:"Renewal activity",description:"The lower drawer is pushed outward and remains behind the layer mask.",closeLabel:"Close",closeTo:`${t}/drawer`,children:e.jsx(u,{label:"Second-level drawer",title:"Latest review",description:"Clicking this layer's backdrop closes only the top drawer."})})}function we(){const t=l();return e.jsx(U,{title:"Approve renewal",description:"A modal route for a focused decision.",closeLabel:"Close",closeTo:t,children:e.jsx(u,{label:"Dialog",title:"Approval required",description:"The page stays mounted while the URL represents the active dialog."})})}function je(){const t=f(),a=l();return e.jsx(de,{closeTo:a,children:e.jsx(pe,{nested:t})})}function pe({nested:t}){const a=se(),s=x();return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(g,{variant:"secondary",children:"Child page"}),e.jsx("h1",{className:"font-heading text-3xl font-semibold tracking-tight",children:"Customer workspace"}),e.jsx("p",{className:"text-muted-foreground",children:"This route replaces the Demo home instead of rendering inside its Outlet."})]}),e.jsxs(i,{variant:"outline",onClick:()=>void a(),children:[e.jsx(re,{}),"Back to scenarios"]})]}),e.jsxs(b,{children:[e.jsxs(v,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(oe,{className:"size-5 text-primary"}),e.jsx(y,{children:"Page-owned workflow"})]}),e.jsx(C,{children:"A page can still host routed overlays without becoming coupled to their content."})]}),e.jsx(R,{children:e.jsx(i,{onClick:()=>s("drawer"),children:"Open page drawer"})})]})]}),t]})}function be(){const t=x(),a=f(),s=l();return e.jsx(D,{title:"Customer activity",description:"This drawer belongs to the child page route.",closeLabel:"Close",closeTo:`${s}/page`,nested:a,children:e.jsx(u,{label:"Page drawer",title:"Renewal conversation",description:"Open a dialog above this drawer to test mixed presentation types.",children:e.jsxs(i,{onClick:()=>t("dialog"),children:["Open confirmation dialog",e.jsx(N,{})]})})})}function ve(){const t=l();return e.jsx(U,{title:"Confirm follow-up",description:"The dialog is nested in the drawer route subtree.",closeLabel:"Close",closeTo:`${t}/page/drawer`,children:e.jsx(u,{label:"Nested dialog",title:"Schedule a follow-up?",description:"Closing returns to the drawer; closing the drawer then returns to the page."})})}function u({label:t,title:a,description:s,children:o}){return e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-5",children:e.jsxs("div",{className:"space-y-5",children:[e.jsx(g,{variant:"outline",children:t}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-xl font-semibold",children:a}),e.jsx("p",{className:"text-muted-foreground",children:s})]}),e.jsxs("div",{className:"grid gap-3 rounded-lg border bg-muted/30 p-4 sm:grid-cols-2",children:[e.jsx(h,{label:"Owner",value:"Ada Lovelace"}),e.jsx(h,{label:"Status",value:"In review"}),e.jsx(h,{label:"Value",value:"$48,000"}),e.jsx(h,{label:"Renewal",value:"September 30"})]}),o?e.jsx("div",{children:o}):null]})})}function h({label:t,value:a}){return e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-xs text-muted-foreground",children:t}),e.jsx("div",{className:"font-medium",children:a})]})}export{we as DemoDialogRoute,xe as DemoDrawerRoute,ve as DemoPageDrawerDialogRoute,be as DemoPageDrawerRoute,je as DemoPageRoute,fe as DemoSecondDrawerRoute,ge as RouteSurfacesDemoHome};