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.
- package/dist/api/auth.d.mts +1 -1
- package/dist/api/cli.d.mts +2 -2
- package/dist/api/cli.mjs +8 -9
- package/dist/api/container.d.mts +2 -2
- package/dist/api/database.mjs +2 -2
- package/dist/api/event.d.mts +2 -2
- package/dist/api/event.mjs +2 -2
- package/dist/api/mailer.d.mts +2 -2
- package/dist/api/mailer.mjs +3 -3
- package/dist/api/openapi.d.mts +2 -2
- package/dist/api/openapi.mjs +2 -2
- package/dist/api/server.d.mts +2 -2
- package/dist/api/server.mjs +3 -3
- package/dist/api/ssr.d.mts +236 -3
- package/dist/api/ssr.mjs +274 -28
- package/dist/api/storage.d.mts +2 -2
- package/dist/api/storage.mjs +3 -3
- package/dist/api/workflow.d.mts +2 -2
- package/dist/api/workflow.mjs +3 -3
- package/dist/{auth-BqCtM79d.d.mts → auth-Bs8ySjT9.d.mts} +311 -311
- package/dist/{auth-rKvHr0Q-.d.ts → auth-CG3TJkB6.d.ts} +25 -25
- package/dist/{brand-D0R0TjBE.d.ts → brand-BATfWGwH.d.ts} +13 -9
- package/dist/{brand-DnRkdj7V.js → brand-MxWultcm.js} +26 -12
- package/dist/{constants-CA1iNKYs.mjs → constants-DS-JRVg4.mjs} +14 -2
- package/dist/{container-CESX86sZ.d.mts → container-COgW9sJZ.d.mts} +56 -56
- package/dist/{database-Bru1mHUy.mjs → database-BI18y32D.mjs} +1 -1
- package/dist/devtools/test.d.mts +2 -2
- package/dist/devtools/test.mjs +4 -4
- package/dist/devtools/vite.d.mts +34 -1
- package/dist/devtools/vite.mjs +141 -6
- package/dist/{event-Ub9iLczk.mjs → event-D1796YqX.mjs} +1 -1
- package/dist/{openapi-bsEnbzry.mjs → openapi-DSnhsnI5.mjs} +1 -1
- package/dist/{panel-DAHuuHti.mjs → panel-C69J9Ydr.mjs} +2 -2
- package/dist/panel-X7sB8Tn5.mjs +5 -0
- package/dist/routes---1F4glX.mjs +4 -0
- package/dist/{routes-Sy68H248.mjs → routes-B6-YvF-_.mjs} +1 -1
- package/dist/{server-D-KQTOit.mjs → server-D_b4mKte.mjs} +93 -13
- package/dist/web/auth.d.ts +2 -2
- package/dist/web/i18n.d.ts +12 -5
- package/dist/web/i18n.js +784 -7
- package/dist/web/ui/accordion.d.ts +5 -5
- package/dist/web/ui/alert-dialog.d.ts +13 -13
- package/dist/web/ui/alert.d.ts +5 -5
- package/dist/web/ui/animated-check.d.ts +2 -2
- package/dist/web/ui/aspect-ratio.d.ts +2 -2
- package/dist/web/ui/auth.d.ts +2 -2
- package/dist/web/ui/auth.js +1 -1
- package/dist/web/ui/avatar.d.ts +7 -7
- package/dist/web/ui/badge.d.ts +2 -2
- package/dist/web/ui/brand.d.ts +1 -1
- package/dist/web/ui/brand.js +1 -1
- package/dist/web/ui/breadcrumb.d.ts +7 -7
- package/dist/web/ui/button-group.d.ts +5 -5
- package/dist/web/ui/button.d.ts +5 -5
- package/dist/web/ui/calendar.d.ts +3 -3
- package/dist/web/ui/card.d.ts +8 -8
- package/dist/web/ui/carousel.d.ts +6 -6
- package/dist/web/ui/chart.d.ts +5 -5
- package/dist/web/ui/checkbox.d.ts +2 -2
- package/dist/web/ui/collapsible.d.ts +4 -4
- package/dist/web/ui/command.d.ts +10 -10
- package/dist/web/ui/context-menu.d.ts +16 -16
- package/dist/web/ui/dialog.d.ts +11 -11
- package/dist/web/ui/drawer.d.ts +11 -11
- package/dist/web/ui/dropdown-menu.d.ts +16 -16
- package/dist/web/ui/empty.d.ts +9 -9
- package/dist/web/ui/error-page.d.ts +2 -2
- package/dist/web/ui/field.d.ts +13 -13
- package/dist/web/ui/hover-card.d.ts +4 -4
- package/dist/web/ui/input-group.d.ts +10 -10
- package/dist/web/ui/input-otp.d.ts +5 -5
- package/dist/web/ui/input.d.ts +2 -2
- package/dist/web/ui/item.d.ts +13 -13
- package/dist/web/ui/kbd.d.ts +3 -3
- package/dist/web/ui/label.d.ts +2 -2
- package/dist/web/ui/menubar.d.ts +17 -17
- package/dist/web/ui/navigation-menu.d.ts +11 -11
- package/dist/web/ui/pagination.d.ts +8 -8
- package/dist/web/ui/popover.d.ts +7 -7
- package/dist/web/ui/progress.d.ts +6 -6
- package/dist/web/ui/radio-group.d.ts +3 -3
- package/dist/web/ui/resizable.d.ts +4 -4
- package/dist/web/ui/scroll-area.d.ts +3 -3
- package/dist/web/ui/select.d.ts +10 -10
- package/dist/web/ui/separator.d.ts +2 -2
- package/dist/web/ui/sheet.d.ts +9 -9
- package/dist/web/ui/sidebar.d.ts +20 -20
- package/dist/web/ui/skeleton.d.ts +2 -2
- package/dist/web/ui/slider.d.ts +2 -2
- package/dist/web/ui/sonner.d.ts +2 -2
- package/dist/web/ui/spinner.d.ts +2 -2
- package/dist/web/ui/switch.d.ts +2 -2
- package/dist/web/ui/table.d.ts +9 -9
- package/dist/web/ui/tabs.d.ts +5 -5
- package/dist/web/ui/textarea.d.ts +2 -2
- package/dist/web/ui/theme.d.ts +85 -0
- package/dist/web/ui/theme.js +144 -0
- package/dist/web/ui/toggle-group.d.ts +3 -3
- package/dist/web/ui/toggle.d.ts +2 -2
- package/dist/web/ui/tooltip.d.ts +5 -5
- package/dist/{workflow-CRh7IYCp.mjs → workflow-1INsBemZ.mjs} +2 -2
- package/package.json +57 -28
- package/src/devtools/storybook/.storybook/preview.tsx +1 -1
- package/src/devtools/storybook/shims/use-sync-external-store/with-selector.js +5 -0
- package/src/universal/locales/en/ui.json +22 -0
- package/src/universal/locales/zh-CN/ui.json +22 -0
- package/src/universal/locales/zh-TW/ui.json +22 -0
- package/src/web/client/i18n.d.ts +1 -1
- package/src/web/client/i18n.ts +39 -9
- package/src/web/routes/auth/_layout.tsx +6 -1
- package/src/web/routes/auth/utils.ts +1 -29
- package/src/web/routes/docs/$.tsx +248 -0
- package/src/web/routes/docs/_layout.tsx +179 -0
- package/src/web/routes/docs/llms-full.txt.ts +66 -0
- package/src/web/routes/docs/llms.txt.ts +67 -0
- package/src/web/routes/docs/mdx-resource.ts +68 -0
- package/src/web/routes/docs/search.ts +104 -0
- package/src/web/routes/docs/utils.test.ts +272 -0
- package/src/web/routes/docs/utils.ts +660 -0
- package/src/web/routes.ts +56 -3
- package/src/web/ui/brand.stories.tsx +21 -3
- package/src/web/ui/brand.tsx +30 -8
- package/src/web/ui/globals.css +37 -0
- package/src/web/ui/mermaid.tsx +141 -0
- package/src/web/ui/theme.tsx +209 -0
- package/src/web/ui/version-select.test.tsx +171 -0
- package/src/web/ui/version-select.tsx +214 -0
- package/dist/panel-tYeGI0r3.mjs +0 -5
- package/dist/routes-C09gOhxC.mjs +0 -4
- package/src/web/ui/locales/en/ui.json +0 -232
- package/src/web/ui/locales/zh-CN/ui.json +0 -232
- package/src/web/ui/locales/zh-TW/ui.json +0 -232
package/dist/api/auth.d.mts
CHANGED
|
@@ -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-
|
|
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 };
|
package/dist/api/cli.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../logger-C8gOLrUv.mjs";
|
|
2
2
|
import "../database-CxDXJbvJ.mjs";
|
|
3
|
-
import "../auth-
|
|
3
|
+
import "../auth-Bs8ySjT9.mjs";
|
|
4
4
|
import "../cache-M0z3800A.mjs";
|
|
5
|
-
import { n as Container } from "../container-
|
|
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 {
|
|
4
|
-
import { a as loadEvents } from "../event-
|
|
5
|
-
import { i as loadWorkflows } from "../workflow-
|
|
6
|
-
import { r as defineMigrationOpts } from "../database-
|
|
7
|
-
import { t as defineServer } from "../server-
|
|
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-
|
|
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.
|
|
466
|
+
ctx.fail(`Storybook build failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
468
467
|
}
|
|
469
468
|
}
|
|
470
469
|
const entryPoints = await collectEntryPoints();
|
package/dist/api/container.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../logger-C8gOLrUv.mjs";
|
|
2
2
|
import "../database-CxDXJbvJ.mjs";
|
|
3
|
-
import "../auth-
|
|
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-
|
|
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 };
|
package/dist/api/database.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../constants-
|
|
2
|
-
import { a as migrationsSchema, i as defineTestDatabase, n as defineDatabase, r as defineMigrationOpts, t as dbChanges } from "../database-
|
|
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
|
|
package/dist/api/event.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../logger-C8gOLrUv.mjs";
|
|
2
2
|
import "../database-CxDXJbvJ.mjs";
|
|
3
|
-
import "../auth-
|
|
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-
|
|
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 };
|
package/dist/api/event.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../redis-DwTSiGWI.mjs";
|
|
2
|
-
import "../constants-
|
|
3
|
-
import { a as loadEvents, i as defineEventBus, n as dbChangesEvent, r as defineEvent, t as dbChangeInputSchema } from "../event-
|
|
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 };
|
package/dist/api/mailer.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../logger-C8gOLrUv.mjs";
|
|
2
2
|
import "../database-CxDXJbvJ.mjs";
|
|
3
|
-
import "../auth-
|
|
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-
|
|
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 };
|
package/dist/api/mailer.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../auth-schema-DF53iTDS.mjs";
|
|
2
2
|
import "../redis-DwTSiGWI.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import "../event-
|
|
5
|
-
import { a as sendEmail } from "../workflow-
|
|
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";
|
package/dist/api/openapi.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../logger-C8gOLrUv.mjs";
|
|
2
2
|
import "../database-CxDXJbvJ.mjs";
|
|
3
|
-
import "../auth-
|
|
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-
|
|
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 };
|
package/dist/api/openapi.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../constants-
|
|
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-
|
|
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 };
|
package/dist/api/server.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../logger-C8gOLrUv.mjs";
|
|
2
2
|
import "../database-CxDXJbvJ.mjs";
|
|
3
|
-
import "../auth-
|
|
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-
|
|
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 };
|
package/dist/api/server.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../constants-
|
|
2
|
-
import { a as loadMiddleware, i as defineMiddleware, n as defaultI18nConfig, r as defineI18n, t as defineServer } from "../server-
|
|
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-
|
|
5
|
+
import "../openapi-DSnhsnI5.mjs";
|
|
6
6
|
import "../context-tMoLkr9-.mjs";
|
|
7
7
|
|
|
8
8
|
export { defaultI18nConfig, defineI18n, defineMiddleware, defineServer, loadMiddleware };
|
package/dist/api/ssr.d.mts
CHANGED
|
@@ -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-
|
|
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-
|
|
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 };
|