appos 0.8.3-0 → 0.9.0-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.
Files changed (132) hide show
  1. package/dist/api/auth.d.mts +1 -1
  2. package/dist/api/cli.d.mts +2 -2
  3. package/dist/api/cli.mjs +8 -9
  4. package/dist/api/container.d.mts +2 -2
  5. package/dist/api/database.mjs +2 -2
  6. package/dist/api/event.d.mts +2 -2
  7. package/dist/api/event.mjs +2 -2
  8. package/dist/api/mailer.d.mts +2 -2
  9. package/dist/api/mailer.mjs +3 -3
  10. package/dist/api/openapi.d.mts +2 -2
  11. package/dist/api/openapi.mjs +2 -2
  12. package/dist/api/server.d.mts +2 -2
  13. package/dist/api/server.mjs +3 -3
  14. package/dist/api/ssr.d.mts +236 -3
  15. package/dist/api/ssr.mjs +274 -28
  16. package/dist/api/storage.d.mts +2 -2
  17. package/dist/api/storage.mjs +3 -3
  18. package/dist/api/workflow.d.mts +2 -2
  19. package/dist/api/workflow.mjs +3 -3
  20. package/dist/{auth-BqCtM79d.d.mts → auth-Bs8ySjT9.d.mts} +311 -311
  21. package/dist/{auth-rKvHr0Q-.d.ts → auth-CG3TJkB6.d.ts} +25 -25
  22. package/dist/{brand-D0R0TjBE.d.ts → brand-BATfWGwH.d.ts} +13 -9
  23. package/dist/{brand-DnRkdj7V.js → brand-MxWultcm.js} +26 -12
  24. package/dist/{constants-CA1iNKYs.mjs → constants-DS-JRVg4.mjs} +14 -2
  25. package/dist/{container-CESX86sZ.d.mts → container-COgW9sJZ.d.mts} +56 -56
  26. package/dist/{database-Bru1mHUy.mjs → database-BI18y32D.mjs} +1 -1
  27. package/dist/devtools/test.d.mts +2 -2
  28. package/dist/devtools/test.mjs +4 -4
  29. package/dist/devtools/vite.d.mts +34 -1
  30. package/dist/devtools/vite.mjs +141 -6
  31. package/dist/{event-Ub9iLczk.mjs → event-D1796YqX.mjs} +1 -1
  32. package/dist/{openapi-bsEnbzry.mjs → openapi-DSnhsnI5.mjs} +1 -1
  33. package/dist/{panel-DAHuuHti.mjs → panel-C69J9Ydr.mjs} +2 -2
  34. package/dist/panel-X7sB8Tn5.mjs +5 -0
  35. package/dist/routes---1F4glX.mjs +4 -0
  36. package/dist/{routes-Sy68H248.mjs → routes-B6-YvF-_.mjs} +1 -1
  37. package/dist/{server-D-KQTOit.mjs → server-D_b4mKte.mjs} +93 -13
  38. package/dist/web/auth.d.ts +2 -2
  39. package/dist/web/i18n.d.ts +12 -5
  40. package/dist/web/i18n.js +784 -7
  41. package/dist/web/ui/accordion.d.ts +5 -5
  42. package/dist/web/ui/alert-dialog.d.ts +13 -13
  43. package/dist/web/ui/alert.d.ts +5 -5
  44. package/dist/web/ui/animated-check.d.ts +2 -2
  45. package/dist/web/ui/aspect-ratio.d.ts +2 -2
  46. package/dist/web/ui/auth.d.ts +2 -2
  47. package/dist/web/ui/auth.js +1 -1
  48. package/dist/web/ui/avatar.d.ts +7 -7
  49. package/dist/web/ui/badge.d.ts +2 -2
  50. package/dist/web/ui/brand.d.ts +1 -1
  51. package/dist/web/ui/brand.js +1 -1
  52. package/dist/web/ui/breadcrumb.d.ts +7 -7
  53. package/dist/web/ui/button-group.d.ts +5 -5
  54. package/dist/web/ui/button.d.ts +5 -5
  55. package/dist/web/ui/calendar.d.ts +3 -3
  56. package/dist/web/ui/card.d.ts +8 -8
  57. package/dist/web/ui/carousel.d.ts +6 -6
  58. package/dist/web/ui/chart.d.ts +5 -5
  59. package/dist/web/ui/checkbox.d.ts +2 -2
  60. package/dist/web/ui/collapsible.d.ts +4 -4
  61. package/dist/web/ui/command.d.ts +10 -10
  62. package/dist/web/ui/context-menu.d.ts +16 -16
  63. package/dist/web/ui/dialog.d.ts +11 -11
  64. package/dist/web/ui/drawer.d.ts +11 -11
  65. package/dist/web/ui/dropdown-menu.d.ts +16 -16
  66. package/dist/web/ui/empty.d.ts +9 -9
  67. package/dist/web/ui/error-page.d.ts +2 -2
  68. package/dist/web/ui/field.d.ts +13 -13
  69. package/dist/web/ui/hover-card.d.ts +4 -4
  70. package/dist/web/ui/input-group.d.ts +10 -10
  71. package/dist/web/ui/input-otp.d.ts +5 -5
  72. package/dist/web/ui/input.d.ts +2 -2
  73. package/dist/web/ui/item.d.ts +13 -13
  74. package/dist/web/ui/kbd.d.ts +3 -3
  75. package/dist/web/ui/label.d.ts +2 -2
  76. package/dist/web/ui/menubar.d.ts +17 -17
  77. package/dist/web/ui/navigation-menu.d.ts +11 -11
  78. package/dist/web/ui/pagination.d.ts +8 -8
  79. package/dist/web/ui/popover.d.ts +7 -7
  80. package/dist/web/ui/progress.d.ts +6 -6
  81. package/dist/web/ui/radio-group.d.ts +3 -3
  82. package/dist/web/ui/resizable.d.ts +4 -4
  83. package/dist/web/ui/scroll-area.d.ts +3 -3
  84. package/dist/web/ui/select.d.ts +10 -10
  85. package/dist/web/ui/separator.d.ts +2 -2
  86. package/dist/web/ui/sheet.d.ts +9 -9
  87. package/dist/web/ui/sidebar.d.ts +20 -20
  88. package/dist/web/ui/skeleton.d.ts +2 -2
  89. package/dist/web/ui/slider.d.ts +2 -2
  90. package/dist/web/ui/sonner.d.ts +2 -2
  91. package/dist/web/ui/spinner.d.ts +2 -2
  92. package/dist/web/ui/switch.d.ts +2 -2
  93. package/dist/web/ui/table.d.ts +9 -9
  94. package/dist/web/ui/tabs.d.ts +5 -5
  95. package/dist/web/ui/textarea.d.ts +2 -2
  96. package/dist/web/ui/theme.d.ts +85 -0
  97. package/dist/web/ui/theme.js +144 -0
  98. package/dist/web/ui/toggle-group.d.ts +3 -3
  99. package/dist/web/ui/toggle.d.ts +2 -2
  100. package/dist/web/ui/tooltip.d.ts +5 -5
  101. package/dist/{workflow-CRh7IYCp.mjs → workflow-1INsBemZ.mjs} +2 -2
  102. package/package.json +57 -28
  103. package/src/devtools/storybook/.storybook/preview.tsx +1 -1
  104. package/src/devtools/storybook/shims/use-sync-external-store/with-selector.js +5 -0
  105. package/src/universal/locales/en/ui.json +22 -0
  106. package/src/universal/locales/zh-CN/ui.json +22 -0
  107. package/src/universal/locales/zh-TW/ui.json +22 -0
  108. package/src/web/client/i18n.d.ts +1 -1
  109. package/src/web/client/i18n.ts +39 -9
  110. package/src/web/routes/auth/_layout.tsx +6 -1
  111. package/src/web/routes/auth/utils.ts +1 -29
  112. package/src/web/routes/docs/$.tsx +248 -0
  113. package/src/web/routes/docs/_layout.tsx +179 -0
  114. package/src/web/routes/docs/llms-full.txt.ts +66 -0
  115. package/src/web/routes/docs/llms.txt.ts +67 -0
  116. package/src/web/routes/docs/mdx-resource.ts +68 -0
  117. package/src/web/routes/docs/search.ts +104 -0
  118. package/src/web/routes/docs/utils.test.ts +272 -0
  119. package/src/web/routes/docs/utils.ts +660 -0
  120. package/src/web/routes.ts +56 -3
  121. package/src/web/ui/brand.stories.tsx +21 -3
  122. package/src/web/ui/brand.tsx +30 -8
  123. package/src/web/ui/globals.css +37 -0
  124. package/src/web/ui/mermaid.tsx +141 -0
  125. package/src/web/ui/theme.tsx +209 -0
  126. package/src/web/ui/version-select.test.tsx +171 -0
  127. package/src/web/ui/version-select.tsx +214 -0
  128. package/dist/panel-tYeGI0r3.mjs +0 -5
  129. package/dist/routes-C09gOhxC.mjs +0 -4
  130. package/src/web/ui/locales/en/ui.json +0 -232
  131. package/src/web/ui/locales/zh-CN/ui.json +0 -232
  132. package/src/web/ui/locales/zh-TW/ui.json +0 -232
@@ -1,4 +1,4 @@
1
1
  import "../logger-C8gOLrUv.mjs";
2
2
  import "../database-CxDXJbvJ.mjs";
3
- import { a as AuthCaptchaConfig, c as AuthSessionConfig, d as defineAuth, f as defineEndpointRateLimits, i as Auth, l as DefineAuthOptions, n as AccessController, o as AuthConfig, p as defineAuthSchema, r as AuditAction, s as AuthPasskeyConfig, t as AccessControlRoles, u as auditActionSchema } from "../auth-BqCtM79d.mjs";
3
+ import { a as AuthCaptchaConfig, c as AuthSessionConfig, d as defineAuth, f as defineEndpointRateLimits, i as Auth, l as DefineAuthOptions, n as AccessController, o as AuthConfig, p as defineAuthSchema, r as AuditAction, s as AuthPasskeyConfig, t as AccessControlRoles, u as auditActionSchema } from "../auth-Bs8ySjT9.mjs";
4
4
  export { AccessControlRoles, AccessController, AuditAction, Auth, AuthCaptchaConfig, AuthConfig, AuthPasskeyConfig, AuthSessionConfig, DefineAuthOptions, auditActionSchema, defineAuth, defineAuthSchema, defineEndpointRateLimits };
@@ -1,8 +1,8 @@
1
1
  import "../logger-C8gOLrUv.mjs";
2
2
  import "../database-CxDXJbvJ.mjs";
3
- import "../auth-BqCtM79d.mjs";
3
+ import "../auth-Bs8ySjT9.mjs";
4
4
  import "../cache-M0z3800A.mjs";
5
- import { n as Container } from "../container-CESX86sZ.mjs";
5
+ import { n as Container } from "../container-COgW9sJZ.mjs";
6
6
  import { z } from "zod";
7
7
  import { ChildProcess } from "node:child_process";
8
8
  import * as p from "@clack/prompts";
package/dist/api/cli.mjs CHANGED
@@ -1,13 +1,13 @@
1
1
  import "../auth-schema-DF53iTDS.mjs";
2
2
  import "../redis-DwTSiGWI.mjs";
3
- import { C as version, a as COMMANDS_DIR, b as TEST_EXTENSIONS, f as FILE_EXT, h as MAIN_ENTRY, o as DATABASES_DIR, p as FIXTURES_DIR, r as BUILD_DIR, t as APPOS_DIR, u as EMAIL_THEME_FILE, v as ROOT_CSS_FILE, x as WEB_DIR } from "../constants-CA1iNKYs.mjs";
4
- import { a as loadEvents } from "../event-Ub9iLczk.mjs";
5
- import { i as loadWorkflows } from "../workflow-CRh7IYCp.mjs";
6
- import { r as defineMigrationOpts } from "../database-Bru1mHUy.mjs";
7
- import { t as defineServer } from "../server-D-KQTOit.mjs";
3
+ import { S as WEB_DIR, a as COMMANDS_DIR, d as EMAIL_THEME_FILE, g as MAIN_ENTRY, m as FIXTURES_DIR, o as DATABASES_DIR, p as FILE_EXT, r as BUILD_DIR, t as APPOS_DIR, w as version, x as TEST_EXTENSIONS, y as ROOT_CSS_FILE } from "../constants-DS-JRVg4.mjs";
4
+ import { a as loadEvents } from "../event-D1796YqX.mjs";
5
+ import { i as loadWorkflows } from "../workflow-1INsBemZ.mjs";
6
+ import { r as defineMigrationOpts } from "../database-BI18y32D.mjs";
7
+ import { t as defineServer } from "../server-D_b4mKte.mjs";
8
8
  import "../instrumentation-NIH3Iibm.mjs";
9
9
  import "../app-context-D1ZdyKbf.mjs";
10
- import "../openapi-bsEnbzry.mjs";
10
+ import "../openapi-DSnhsnI5.mjs";
11
11
  import "../context-tMoLkr9-.mjs";
12
12
  import { t as defineWorker } from "../worker-Dv-oM9rL.mjs";
13
13
  import { createRequire } from "node:module";
@@ -458,13 +458,12 @@ var build_default = defineCommand({
458
458
  "-o",
459
459
  `${BUILD_DIR}/storybook`,
460
460
  "--config-dir",
461
- configDir,
462
- "--quiet"
461
+ configDir
463
462
  ]);
464
463
  });
465
464
  ctx.success("Built design system successfully");
466
465
  } catch (error) {
467
- ctx.warn(`Storybook build failed: ${error instanceof Error ? error.message : String(error)}`);
466
+ ctx.fail(`Storybook build failed: ${error instanceof Error ? error.message : String(error)}`);
468
467
  }
469
468
  }
470
469
  const entryPoints = await collectEntryPoints();
@@ -1,6 +1,6 @@
1
1
  import "../logger-C8gOLrUv.mjs";
2
2
  import "../database-CxDXJbvJ.mjs";
3
- import "../auth-BqCtM79d.mjs";
3
+ import "../auth-Bs8ySjT9.mjs";
4
4
  import "../cache-M0z3800A.mjs";
5
- import { An as DefineAppContextOpts, Mn as defineAppContext, On as isLocalDev, a as defineAppContainer, i as WorkerConfig, jn as SessionData, kn as AppContext, n as Container, r as ServerConfig, t as AppContainer } from "../container-CESX86sZ.mjs";
5
+ import { An as DefineAppContextOpts, Mn as defineAppContext, On as isLocalDev, a as defineAppContainer, i as WorkerConfig, jn as SessionData, kn as AppContext, n as Container, r as ServerConfig, t as AppContainer } from "../container-COgW9sJZ.mjs";
6
6
  export { AppContainer, AppContext, Container, DefineAppContextOpts, ServerConfig, SessionData, WorkerConfig, defineAppContainer, defineAppContext, isLocalDev };
@@ -1,5 +1,5 @@
1
- import "../constants-CA1iNKYs.mjs";
2
- import { a as migrationsSchema, i as defineTestDatabase, n as defineDatabase, r as defineMigrationOpts, t as dbChanges } from "../database-Bru1mHUy.mjs";
1
+ import "../constants-DS-JRVg4.mjs";
2
+ import { a as migrationsSchema, i as defineTestDatabase, n as defineDatabase, r as defineMigrationOpts, t as dbChanges } from "../database-BI18y32D.mjs";
3
3
 
4
4
  export * from "drizzle-orm"
5
5
 
@@ -1,6 +1,6 @@
1
1
  import "../logger-C8gOLrUv.mjs";
2
2
  import "../database-CxDXJbvJ.mjs";
3
- import "../auth-BqCtM79d.mjs";
3
+ import "../auth-Bs8ySjT9.mjs";
4
4
  import "../cache-M0z3800A.mjs";
5
- import { Bn as defineEvent, Fn as Event, Hn as loadEvents, In as EventBus, Ln as EventContext, Nn as DbChangeInput, Pn as DefineEventBusOptions, Rn as dbChangeInputSchema, Vn as defineEventBus, zn as dbChangesEvent } from "../container-CESX86sZ.mjs";
5
+ import { Bn as defineEvent, Fn as Event, Hn as loadEvents, In as EventBus, Ln as EventContext, Nn as DbChangeInput, Pn as DefineEventBusOptions, Rn as dbChangeInputSchema, Vn as defineEventBus, zn as dbChangesEvent } from "../container-COgW9sJZ.mjs";
6
6
  export { DbChangeInput, DefineEventBusOptions, Event, EventBus, EventContext, dbChangeInputSchema, dbChangesEvent, defineEvent, defineEventBus, loadEvents };
@@ -1,5 +1,5 @@
1
1
  import "../redis-DwTSiGWI.mjs";
2
- import "../constants-CA1iNKYs.mjs";
3
- import { a as loadEvents, i as defineEventBus, n as dbChangesEvent, r as defineEvent, t as dbChangeInputSchema } from "../event-Ub9iLczk.mjs";
2
+ import "../constants-DS-JRVg4.mjs";
3
+ import { a as loadEvents, i as defineEventBus, n as dbChangesEvent, r as defineEvent, t as dbChangeInputSchema } from "../event-D1796YqX.mjs";
4
4
 
5
5
  export { dbChangeInputSchema, dbChangesEvent, defineEvent, defineEventBus, loadEvents };
@@ -1,6 +1,6 @@
1
1
  import "../logger-C8gOLrUv.mjs";
2
2
  import "../database-CxDXJbvJ.mjs";
3
- import "../auth-BqCtM79d.mjs";
3
+ import "../auth-Bs8ySjT9.mjs";
4
4
  import "../cache-M0z3800A.mjs";
5
- import { $ as EmailButtonProps, A as Row, B as render, C as MailerPayloadReact, D as Preview, E as MarkdownProps, F as TailwindProps, G as EmailTheme, H as EmailLayout, I as defineEmail, J as getDefaultEmailTheme, K as defineEmailTailwindConfig, L as defineMailer, M as Section, N as SectionProps, O as PreviewProps, P as Tailwind, Q as Container, R as plainTextSelectors, S as MailerPayloadHtml, T as Markdown, U as EmailLayoutProps, V as toPlainText, W as EMAIL_THEME_KEYS, X as CodeBlock, Y as Button, Z as CodeInline, _ as HeadProps, _t as emailImgVariantKeys, at as EmailImgProps, b as Mailer, c as DefineEmailOptions, ct as Heading, d as EmailColumn, dt as Link, et as EmailCodeBlockProps, f as EmailColumnProps, ft as Text, g as Head, gt as emailHeadingSizeKeys, h as FontProps, ht as emailContainerVariantKeys, it as EmailHrProps, j as RowProps, k as RenderOptions, l as DefineMailerOptions, lt as Hr, m as Font, mt as emailButtonVariantKeys, nt as EmailContainerProps, o as Body, ot as EmailLinkProps, p as EmailComponent, pt as emailButtonSizeKeys, q as defineEmailTheme, rt as EmailHeadingProps, s as BodyProps, st as EmailTextProps, tt as EmailCodeInlineProps, u as DefineMailerOptionsWithQueue, ut as Img, v as Html, vt as emailTextVariantKeys, w as MailerWithQueue, x as MailerPayload, y as HtmlProps, z as pretty } from "../container-CESX86sZ.mjs";
5
+ import { $ as EmailButtonProps, A as Row, B as render, C as MailerPayloadReact, D as Preview, E as MarkdownProps, F as TailwindProps, G as EmailTheme, H as EmailLayout, I as defineEmail, J as getDefaultEmailTheme, K as defineEmailTailwindConfig, L as defineMailer, M as Section, N as SectionProps, O as PreviewProps, P as Tailwind, Q as Container, R as plainTextSelectors, S as MailerPayloadHtml, T as Markdown, U as EmailLayoutProps, V as toPlainText, W as EMAIL_THEME_KEYS, X as CodeBlock, Y as Button, Z as CodeInline, _ as HeadProps, _t as emailImgVariantKeys, at as EmailImgProps, b as Mailer, c as DefineEmailOptions, ct as Heading, d as EmailColumn, dt as Link, et as EmailCodeBlockProps, f as EmailColumnProps, ft as Text, g as Head, gt as emailHeadingSizeKeys, h as FontProps, ht as emailContainerVariantKeys, it as EmailHrProps, j as RowProps, k as RenderOptions, l as DefineMailerOptions, lt as Hr, m as Font, mt as emailButtonVariantKeys, nt as EmailContainerProps, o as Body, ot as EmailLinkProps, p as EmailComponent, pt as emailButtonSizeKeys, q as defineEmailTheme, rt as EmailHeadingProps, s as BodyProps, st as EmailTextProps, tt as EmailCodeInlineProps, u as DefineMailerOptionsWithQueue, ut as Img, v as Html, vt as emailTextVariantKeys, w as MailerWithQueue, x as MailerPayload, y as HtmlProps, z as pretty } from "../container-COgW9sJZ.mjs";
6
6
  export { Body, BodyProps, Button, CodeBlock, CodeInline, DefineEmailOptions, DefineMailerOptions, DefineMailerOptionsWithQueue, EMAIL_THEME_KEYS, EmailButtonProps, EmailCodeBlockProps, EmailCodeInlineProps, EmailColumn, EmailColumnProps, EmailComponent, Container as EmailContainer, EmailContainerProps, EmailHeadingProps, EmailHrProps, EmailImgProps, EmailLayout, EmailLayoutProps, EmailLinkProps, EmailTextProps, EmailTheme, Font, FontProps, Head, HeadProps, Heading, Hr, Html, HtmlProps, Img, Link, Mailer, MailerPayload, MailerPayloadHtml, MailerPayloadReact, MailerWithQueue, Markdown, MarkdownProps, Preview, PreviewProps, RenderOptions, Row, RowProps, Section, SectionProps, Tailwind, TailwindProps, Text, defineEmail, defineEmailTailwindConfig, defineEmailTheme, defineMailer, emailButtonSizeKeys, emailButtonVariantKeys, emailContainerVariantKeys, emailHeadingSizeKeys, emailImgVariantKeys, emailTextVariantKeys, getDefaultEmailTheme, plainTextSelectors, pretty, render, toPlainText };
@@ -1,8 +1,8 @@
1
1
  import "../auth-schema-DF53iTDS.mjs";
2
2
  import "../redis-DwTSiGWI.mjs";
3
- import { i as BUILD_OUTPUT_DIR, u as EMAIL_THEME_FILE, v as ROOT_CSS_FILE, x as WEB_DIR } from "../constants-CA1iNKYs.mjs";
4
- import "../event-Ub9iLczk.mjs";
5
- import { a as sendEmail } from "../workflow-CRh7IYCp.mjs";
3
+ import { S as WEB_DIR, d as EMAIL_THEME_FILE, i as BUILD_OUTPUT_DIR, y as ROOT_CSS_FILE } from "../constants-DS-JRVg4.mjs";
4
+ import "../event-D1796YqX.mjs";
5
+ import { a as sendEmail } from "../workflow-1INsBemZ.mjs";
6
6
  import { n as parseThemeFromString } from "../colors-BNWHnGHM.mjs";
7
7
  import { join } from "node:path";
8
8
  import { existsSync, readFileSync } from "node:fs";
@@ -1,6 +1,6 @@
1
1
  import "../logger-C8gOLrUv.mjs";
2
2
  import "../database-CxDXJbvJ.mjs";
3
- import "../auth-BqCtM79d.mjs";
3
+ import "../auth-Bs8ySjT9.mjs";
4
4
  import "../cache-M0z3800A.mjs";
5
- import { $t as DefineOpenAPIConfigInput, Qt as DefineOpenAPIConfig, an as RouteModule, cn as defineOpenAPIConfig, dn as generateOpenAPIDocument, en as DefineOpenAPIReturn, fn as loadAndRegisterAPIRoutes, hn as writeOpenAPISpecs, in as OpenAPIRegistration, ln as defineOpenAPIEndpoint, mn as scanAPIRoutes, nn as OpenAPIMethodSpec, on as ValidationErrorResponse, pn as registerRoutes, rn as OpenAPIObjectConfigV31, sn as defineOpenAPI, tn as HandlerParams, un as defineTypedResponses } from "../container-CESX86sZ.mjs";
5
+ import { $t as DefineOpenAPIConfigInput, Qt as DefineOpenAPIConfig, an as RouteModule, cn as defineOpenAPIConfig, dn as generateOpenAPIDocument, en as DefineOpenAPIReturn, fn as loadAndRegisterAPIRoutes, hn as writeOpenAPISpecs, in as OpenAPIRegistration, ln as defineOpenAPIEndpoint, mn as scanAPIRoutes, nn as OpenAPIMethodSpec, on as ValidationErrorResponse, pn as registerRoutes, rn as OpenAPIObjectConfigV31, sn as defineOpenAPI, tn as HandlerParams, un as defineTypedResponses } from "../container-COgW9sJZ.mjs";
6
6
  export { DefineOpenAPIConfig, DefineOpenAPIConfigInput, DefineOpenAPIReturn, HandlerParams, OpenAPIMethodSpec, OpenAPIObjectConfigV31, OpenAPIRegistration, RouteModule, ValidationErrorResponse, defineOpenAPI, defineOpenAPIConfig, defineOpenAPIEndpoint, defineTypedResponses, generateOpenAPIDocument, loadAndRegisterAPIRoutes, registerRoutes, scanAPIRoutes, writeOpenAPISpecs };
@@ -1,5 +1,5 @@
1
- import "../constants-CA1iNKYs.mjs";
1
+ import "../constants-DS-JRVg4.mjs";
2
2
  import "../app-context-D1ZdyKbf.mjs";
3
- import { a as generateOpenAPIDocument, c as scanAPIRoutes, i as defineTypedResponses, l as writeOpenAPISpecs, n as defineOpenAPIConfig, o as loadAndRegisterAPIRoutes, r as defineOpenAPIEndpoint, s as registerRoutes, t as defineOpenAPI } from "../openapi-bsEnbzry.mjs";
3
+ import { a as generateOpenAPIDocument, c as scanAPIRoutes, i as defineTypedResponses, l as writeOpenAPISpecs, n as defineOpenAPIConfig, o as loadAndRegisterAPIRoutes, r as defineOpenAPIEndpoint, s as registerRoutes, t as defineOpenAPI } from "../openapi-DSnhsnI5.mjs";
4
4
 
5
5
  export { defineOpenAPI, defineOpenAPIConfig, defineOpenAPIEndpoint, defineTypedResponses, generateOpenAPIDocument, loadAndRegisterAPIRoutes, registerRoutes, scanAPIRoutes, writeOpenAPISpecs };
@@ -1,6 +1,6 @@
1
1
  import "../logger-C8gOLrUv.mjs";
2
2
  import "../database-CxDXJbvJ.mjs";
3
- import "../auth-BqCtM79d.mjs";
3
+ import "../auth-Bs8ySjT9.mjs";
4
4
  import "../cache-M0z3800A.mjs";
5
- import { Cn as defineServer, Dn as i18n, En as defineI18n, Sn as ServerInstance, Tn as defaultI18nConfig, _n as defineMiddleware, bn as DefineServerOptions, gn as Middleware, vn as loadMiddleware, wn as I18nInitOptions, xn as Server, yn as App } from "../container-CESX86sZ.mjs";
5
+ import { Cn as defineServer, Dn as i18n, En as defineI18n, Sn as ServerInstance, Tn as defaultI18nConfig, _n as defineMiddleware, bn as DefineServerOptions, gn as Middleware, vn as loadMiddleware, wn as I18nInitOptions, xn as Server, yn as App } from "../container-COgW9sJZ.mjs";
6
6
  export { App, DefineServerOptions, I18nInitOptions, Middleware, Server, ServerInstance, defaultI18nConfig, defineI18n, defineMiddleware, defineServer, i18n, loadMiddleware };
@@ -1,8 +1,8 @@
1
- import "../constants-CA1iNKYs.mjs";
2
- import { a as loadMiddleware, i as defineMiddleware, n as defaultI18nConfig, r as defineI18n, t as defineServer } from "../server-D-KQTOit.mjs";
1
+ import "../constants-DS-JRVg4.mjs";
2
+ import { a as loadMiddleware, i as defineMiddleware, n as defaultI18nConfig, r as defineI18n, t as defineServer } from "../server-D_b4mKte.mjs";
3
3
  import "../instrumentation-NIH3Iibm.mjs";
4
4
  import "../app-context-D1ZdyKbf.mjs";
5
- import "../openapi-bsEnbzry.mjs";
5
+ import "../openapi-DSnhsnI5.mjs";
6
6
  import "../context-tMoLkr9-.mjs";
7
7
 
8
8
  export { defaultI18nConfig, defineI18n, defineMiddleware, defineServer, loadMiddleware };
@@ -1,8 +1,8 @@
1
1
  import "../logger-C8gOLrUv.mjs";
2
2
  import "../database-CxDXJbvJ.mjs";
3
- import { m as AuthPaths, o as AuthConfig } from "../auth-BqCtM79d.mjs";
3
+ import { m as AuthPaths, o as AuthConfig } from "../auth-Bs8ySjT9.mjs";
4
4
  import "../cache-M0z3800A.mjs";
5
- import { kn as AppContext } from "../container-CESX86sZ.mjs";
5
+ import { kn as AppContext } from "../container-COgW9sJZ.mjs";
6
6
  import * as react_router0 from "react-router";
7
7
  import { RouterContextProvider } from "react-router";
8
8
  import { GetLoadContextFunction } from "@react-router/express";
@@ -92,7 +92,240 @@ interface AuthRoutesConfig {
92
92
  */
93
93
  declare function defineAuthRoutes(options: AuthRoutesOptions): AuthRoutesConfig;
94
94
  //#endregion
95
+ //#region src/web/routes/docs/utils.d.ts
96
+ /**
97
+ * Options for configuring documentation routes.
98
+ */
99
+ interface DocsRoutesOptions {
100
+ /**
101
+ * Base URL path for documentation.
102
+ *
103
+ * @default "/docs"
104
+ */
105
+ basePath?: string;
106
+ /**
107
+ * Directory containing documentation MDX files.
108
+ *
109
+ * @default "docs"
110
+ */
111
+ dir?: string;
112
+ /**
113
+ * Explicit version list. If not provided, versions are auto-discovered
114
+ * from docs/v*\/ folders (or docs/{defaultLanguage}/v*\/ with i18n).
115
+ *
116
+ * @example ["v1", "v2"]
117
+ */
118
+ versions?: string[];
119
+ /**
120
+ * i18n configuration for docs. Matches vite.config.ts docs.i18n structure.
121
+ *
122
+ * When provided, version discovery looks inside the default language folder
123
+ * (e.g., docs/en/v1, docs/en/v2) instead of docs/ directly.
124
+ *
125
+ * @example
126
+ * ```typescript
127
+ * i18n: {
128
+ * languages: ["en", "zh-CN", "zh-TW"],
129
+ * defaultLanguage: "en",
130
+ * }
131
+ * ```
132
+ */
133
+ i18n?: {
134
+ /** List of supported language codes. */languages: string[]; /** Default language code used for version discovery. */
135
+ defaultLanguage: string;
136
+ };
137
+ }
138
+ /**
139
+ * Middleware function type for React Router v7.
140
+ */
141
+ type MiddlewareFunction = (args: {
142
+ request: Request;
143
+ params: Record<string, string | undefined>;
144
+ }, next: () => Promise<Response>) => Promise<Response> | Response;
145
+ /**
146
+ * Configuration object returned by defineDocsRoutes().
147
+ */
148
+ interface DocsRoutesConfig {
149
+ /**
150
+ * Route configuration to spread into your routes.ts default export.
151
+ *
152
+ * @example
153
+ * ```typescript
154
+ * export default [
155
+ * ...docsRoutes.routes,
156
+ * ...flatRoutes({ config }),
157
+ * ];
158
+ * ```
159
+ */
160
+ routes: RouteConfigEntry[];
161
+ /**
162
+ * Middleware to add to root.tsx for handling .mdx requests.
163
+ *
164
+ * Rewrites /docs/*.mdx requests to internal /__mdx.docs/* route.
165
+ *
166
+ * @example
167
+ * ```typescript
168
+ * // root.tsx
169
+ * import { docsRoutes } from "./routes.ts";
170
+ * export const middleware = [docsRoutes.middleware];
171
+ * ```
172
+ */
173
+ middleware: MiddlewareFunction;
174
+ /**
175
+ * The base URL path for documentation.
176
+ */
177
+ basePath: string;
178
+ /**
179
+ * Discovered or provided version list.
180
+ */
181
+ versions: string[];
182
+ }
183
+ /**
184
+ * Generates documentation route configuration.
185
+ *
186
+ * Creates routes for a Fumadocs-powered documentation site with:
187
+ * - Version support (auto-discovered from docs/v*\/ folders)
188
+ * - Clean URLs for latest version (no version prefix)
189
+ * - Full-text search via Fumadocs
190
+ *
191
+ * Language is determined by Accept-Language header via i18n middleware.
192
+ *
193
+ * @param options - Configuration options
194
+ * @returns Configuration object with routes and metadata
195
+ *
196
+ * @example
197
+ * ```typescript
198
+ * import { defineDocsRoutes, defineFlatRoutes } from "appos/api/ssr";
199
+ *
200
+ * export const docsRoutes = defineDocsRoutes({
201
+ * basePath: "/docs",
202
+ * });
203
+ *
204
+ * export default [
205
+ * ...await defineFlatRoutes({ config }),
206
+ * ...docsRoutes.routes,
207
+ * ];
208
+ * ```
209
+ */
210
+ declare function defineDocsRoutes(options?: DocsRoutesOptions): DocsRoutesConfig;
211
+ /**
212
+ * Parsed components from a documentation URL path.
213
+ */
214
+ interface ParsedDocsPath {
215
+ /**
216
+ * Version from URL (e.g., "v1") or resolved latest version.
217
+ */
218
+ version: string | null;
219
+ /**
220
+ * Remaining path segments after version.
221
+ */
222
+ slug: string[];
223
+ /**
224
+ * Whether this resolves to the latest version.
225
+ * True when no version in URL or version equals latest.
226
+ */
227
+ isLatest: boolean;
228
+ }
229
+ /**
230
+ * Parses a docs path into version and slug components.
231
+ *
232
+ * If no version in URL and versions exist, resolves to latest version.
233
+ * Handles both versioned and non-versioned documentation structures.
234
+ *
235
+ * @param path - Path after the docs base path (e.g., "v1/getting-started")
236
+ * @returns Parsed path components
237
+ *
238
+ * @example
239
+ * ```typescript
240
+ * // With versions ["v1", "v2"], latest is "v2"
241
+ * parseDocsPath("v1/getting-started")
242
+ * // → { version: "v1", slug: ["getting-started"], isLatest: false }
243
+ *
244
+ * parseDocsPath("getting-started")
245
+ * // → { version: "v2", slug: ["getting-started"], isLatest: true }
246
+ * ```
247
+ */
248
+ declare function parseDocsPath(path: string): ParsedDocsPath;
249
+ declare global {
250
+ var __APPOS_DOCS_VERSIONS__: string[] | undefined;
251
+ var __APPOS_DOCS_LATEST_VERSION__: string | null | undefined;
252
+ var __APPOS_DOCS_DIR__: string | undefined;
253
+ var __APPOS_DOCS_BASE_PATH__: string | undefined;
254
+ }
255
+ /**
256
+ * Creates middleware for handling raw MDX file requests.
257
+ *
258
+ * Rewrites requests like `/docs/*.mdx` to the internal MDX resource route.
259
+ * Must be called after `defineDocsRoutes()` has been executed, as it reads
260
+ * from the global config set by that function.
261
+ *
262
+ * If docs are not configured (i.e., `defineDocsRoutes()` was not called or
263
+ * returned no routes), returns a no-op middleware.
264
+ *
265
+ * @returns Middleware function to add to root.tsx middleware array.
266
+ *
267
+ * @example
268
+ * ```typescript
269
+ * // routes.ts
270
+ * export const docsRoutes = defineDocsRoutes({ basePath: "/docs" });
271
+ *
272
+ * // root.tsx
273
+ * import { defineDocsMiddleware } from "appos/api/ssr";
274
+ * export const middleware = [defineDocsMiddleware()];
275
+ * ```
276
+ */
277
+ declare function defineDocsMiddleware(): MiddlewareFunction;
278
+ /**
279
+ * Options for building a docs page URL.
280
+ */
281
+ interface BuildDocsPageUrlOptions {
282
+ /** Base path for docs (e.g., "/docs"). */
283
+ basePath: string;
284
+ /** Page path segments from fumadocs (e.g., ["v2", "getting-started"]). */
285
+ slugs: string[];
286
+ /** Latest version identifier (e.g., "v2"). */
287
+ latestVersion?: string | null;
288
+ }
289
+ /**
290
+ * Builds a docs page URL with proper latest version omission.
291
+ *
292
+ * URL patterns:
293
+ * - Latest version: /docs/getting-started
294
+ * - Non-latest version: /docs/v1/getting-started
295
+ *
296
+ * @param options - URL building options.
297
+ * @returns URL path string.
298
+ *
299
+ * @example
300
+ * ```typescript
301
+ * // Latest version
302
+ * buildDocsPageUrl({
303
+ * basePath: "/docs",
304
+ * slugs: ["v2", "getting-started"],
305
+ * latestVersion: "v2",
306
+ * });
307
+ * // Returns: "/docs/getting-started"
308
+ * ```
309
+ */
310
+ declare function buildDocsPageUrl(options: BuildDocsPageUrlOptions): string;
311
+ //#endregion
95
312
  //#region src/web/routes.d.ts
313
+ /**
314
+ * Resolves absolute path to a route file in this package.
315
+ *
316
+ * Finds the package root by walking up until finding package.json,
317
+ * then returns path to src/web/routes/{relativePath}.
318
+ *
319
+ * @param relativePath - Path relative to src/web/routes/
320
+ * @returns Absolute path to the route file
321
+ *
322
+ * @example
323
+ * ```typescript
324
+ * resolveRoutePath("auth/login.tsx")
325
+ * // → "/path/to/appos/src/web/routes/auth/login.tsx"
326
+ * ```
327
+ */
328
+ declare function resolveRoutePath(relativePath: string): string;
96
329
  /**
97
330
  * Options for configuring flat routes.
98
331
  */
@@ -147,4 +380,4 @@ declare function defineFlatRoutes(options: DefineFlatRoutesOptions): Promise<Rou
147
380
  */
148
381
  declare const appLoadContext: react_router0.RouterContext<AppContext>;
149
382
  //#endregion
150
- export { type AuthPaths, type AuthRoutesConfig, type AuthRoutesOptions, type Config, DefineFlatRoutesOptions, type GetLoadContextFunction, type RenderToPipeableStreamOptions, type RouteConfig, RouterContextProvider, appLoadContext, createReadableStreamFromReadable, defineAuthRoutes, defineFlatRoutes, isbot, renderToPipeableStream };
383
+ export { type AuthPaths, type AuthRoutesConfig, type AuthRoutesOptions, type BuildDocsPageUrlOptions, type Config, DefineFlatRoutesOptions, type DocsRoutesConfig, type DocsRoutesOptions, type GetLoadContextFunction, type MiddlewareFunction, type ParsedDocsPath, type RenderToPipeableStreamOptions, type RouteConfig, RouterContextProvider, appLoadContext, buildDocsPageUrl, createReadableStreamFromReadable, defineAuthRoutes, defineDocsMiddleware, defineDocsRoutes, defineFlatRoutes, isbot, parseDocsPath, renderToPipeableStream, resolveRoutePath };