@sixb/app 0.1.2 → 0.1.4
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/README.md +36 -12
- package/dist/agents.d.ts +1 -1
- package/dist/agents.d.ts.map +1 -1
- package/dist/agents.js.map +1 -1
- package/dist/auth.d.ts +22 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +3 -0
- package/dist/auth.js.map +9 -0
- package/dist/build.d.ts +10 -0
- package/dist/build.d.ts.map +1 -1
- package/dist/codegen.d.ts +14 -3
- package/dist/codegen.d.ts.map +1 -1
- package/dist/createCustomApp.d.ts +7 -0
- package/dist/createCustomApp.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +546 -97
- package/dist/index.js.map +6 -6
- package/dist/scanner.d.ts +24 -6
- package/dist/scanner.d.ts.map +1 -1
- package/package.json +13 -3
- package/src/agents.ts +1 -1
- package/src/auth.ts +17 -0
- package/src/build.ts +83 -4
- package/src/codegen.ts +386 -25
- package/src/createCustomApp.ts +100 -13
- package/src/index.ts +2 -0
- package/src/scanner.ts +191 -46
package/README.md
CHANGED
|
@@ -14,25 +14,43 @@ The build pipeline has three stages: **scan**, **codegen**, and **build**.
|
|
|
14
14
|
|
|
15
15
|
### 1. Scan
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
The internal scanner recursively walks `app/` for `page.tsx` (or `page.ts`) files and descendant
|
|
18
|
+
`layout.tsx` files. It converts the file tree into nested React Router routes. Files and folders
|
|
19
|
+
prefixed with `_`, plus the static `app/public/` tree, are ignored.
|
|
18
20
|
|
|
19
21
|
```
|
|
20
22
|
app/
|
|
21
23
|
page.tsx -> /
|
|
22
24
|
about/page.tsx -> /about
|
|
25
|
+
about/layout.tsx -> wraps /about and its descendants
|
|
23
26
|
remote/[id]/page.tsx -> /remote/:id
|
|
27
|
+
remote/[id]/layout.tsx -> wraps /remote/:id and its descendants
|
|
24
28
|
```
|
|
25
29
|
|
|
26
30
|
### 2. Codegen
|
|
27
31
|
|
|
28
32
|
Two functions generate the entry point files into `.sixb/generated/`:
|
|
29
33
|
|
|
30
|
-
- **`generateRouteManifest(routes, generatedDir)`** -- writes `routes.ts` with
|
|
34
|
+
- **`generateRouteManifest(routes, generatedDir)`** -- writes `routes.ts` with static page and
|
|
35
|
+
layout imports plus native nested `RouteObject` entries. Routes are eager on purpose: project
|
|
36
|
+
apps bundle small, and a single bundle means no loading gap when navigating between pages.
|
|
31
37
|
- **`generateAppEntry(projectRoot, generatedDir, options)`** -- writes `index.html` (HTML shell), `main.tsx` (React entry with BrowserRouter, TanStack Query, and the `@sixb/client` SDK), and `app.webmanifest`.
|
|
32
38
|
|
|
33
39
|
The generated entry also intercepts plain same-origin `<a href="/...">` clicks and routes them client-side, so internal links work like react-router's `<Link>` without authors having to remember it. The interceptor is conservative — modified clicks, `target`/`download`/`rel="external"` anchors, cross-origin URLs, reserved Sixb paths (`/api`, `/auth`, `/ws`, `/docs`), and destinations that don't match an app route all keep native browser navigation. `<Link>` remains the idiomatic choice in app code.
|
|
34
40
|
|
|
35
|
-
If `app/layout.tsx` exists, it is
|
|
41
|
+
If `app/layout.tsx` exists, it is the global wrapper outside the route tree. It can also export a
|
|
42
|
+
`metadata` object (`title`, `description`, `favicon`, `themeColor`, and `backgroundColor`). Metadata
|
|
43
|
+
is loaded during generation and written into the static HTML and manifest, so it is available
|
|
44
|
+
before auth and client startup. The root layout module must therefore be import-safe in Bun: do
|
|
45
|
+
not access `window` or `document` at module scope. An `app/globals.css` file is imported
|
|
46
|
+
automatically when present.
|
|
47
|
+
|
|
48
|
+
A descendant `app/**/layout.tsx` wraps only pages at its URL prefix. It receives `children`, can use
|
|
49
|
+
React Router hooks such as `useParams`, and stays mounted while navigation remains inside its
|
|
50
|
+
subtree. Descendant layout metadata is not read. A layout with no project or framework page below
|
|
51
|
+
it creates no route and is not bundled.
|
|
52
|
+
|
|
53
|
+
Add an optional `app/auth.tsx` default export to customize the app audience's magic-link pages. It receives `AuthExperienceProps` from `@sixb/app/auth` with `signIn`, `checkEmail`, `confirm`, `invalidLink`, and `error` states plus framework-owned actions. Sixb builds it separately, includes `app/globals.css`, and serves it from the API's existing `/auth/*` routes. It is not wrapped by `app/layout.tsx`, and it never owns tokens, cookies, callbacks, audience validation, or return redirects. When the file is absent, the generic server login remains the fallback.
|
|
36
54
|
|
|
37
55
|
### Built-in Agent Routes
|
|
38
56
|
|
|
@@ -48,19 +66,24 @@ These routes are generated only when the project has at least one `app/` page, s
|
|
|
48
66
|
|
|
49
67
|
The default agent UI is imported through `@sixb/app/agents`, so app projects do not need to import `@sixb/agent-ui` directly. A framework-owned `agent-ui.css` bundle is generated before the app stylesheet and imports normal `@sixb/ui` styles, which means app-level token overrides in `app/globals.css` still apply in the usual way.
|
|
50
68
|
|
|
51
|
-
|
|
52
|
-
custom app shell without replacing any routes:
|
|
69
|
+
Add `app/agents/layout.tsx` with `AgentWorkspaceProvider` to make the built-in agent navigation
|
|
70
|
+
match the custom app shell without making the provider global or replacing any routes:
|
|
53
71
|
|
|
54
72
|
```tsx
|
|
55
73
|
import { AgentWorkspaceProvider } from "@sixb/app/agents"
|
|
74
|
+
import type { PropsWithChildren } from "react"
|
|
56
75
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
76
|
+
export default function AgentsLayout({ children }: PropsWithChildren) {
|
|
77
|
+
return (
|
|
78
|
+
<AgentWorkspaceProvider
|
|
79
|
+
sidebarHeader={<AppSidebarHeader />}
|
|
80
|
+
sidebarFooter={<AppSidebarFooter />}
|
|
81
|
+
sidebarWidth="12.5rem"
|
|
82
|
+
>
|
|
83
|
+
{children}
|
|
84
|
+
</AgentWorkspaceProvider>
|
|
85
|
+
)
|
|
86
|
+
}
|
|
64
87
|
```
|
|
65
88
|
|
|
66
89
|
Explicit props passed to a project-owned `AgentsPage` override provider defaults. The custom width
|
|
@@ -186,5 +209,6 @@ A file at `app/public/app.webmanifest` is ignored because the generated manifest
|
|
|
186
209
|
| --- | --- |
|
|
187
210
|
| `createCustomApp(options)` | High-level custom app toolkit for dev/build/start |
|
|
188
211
|
| `AppMetadata` | Metadata shape exported by `app/layout.tsx` |
|
|
212
|
+
| `@sixb/app/auth` | Custom auth experience states, actions, and component props |
|
|
189
213
|
| `createTailwindCssCompiler(options)` | Shared Tailwind v4 build pipeline (also used by Atlas) |
|
|
190
214
|
| `@sixb/app/agents` | Full-page agent route plus `AgentPanel`, context provider/hooks, and helpers |
|
package/dist/agents.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { agentContext } from "@sixb/core/agents/context";
|
|
|
5
5
|
export type AgentsPageProps = Omit<AgentChatPageProps, "routeBase">;
|
|
6
6
|
type AgentWorkspaceChrome = Pick<AgentsPageProps, "sidebarHeader" | "sidebarFooter" | "sidebarWidth">;
|
|
7
7
|
export type AgentWorkspaceProviderProps = PropsWithChildren<AgentWorkspaceChrome>;
|
|
8
|
-
/** Configure the framework-owned Agents routes from
|
|
8
|
+
/** Configure the framework-owned Agents routes, typically from `app/agents/layout.tsx`. */
|
|
9
9
|
export declare function AgentWorkspaceProvider({ sidebarHeader, sidebarFooter, sidebarWidth, children, }: AgentWorkspaceProviderProps): import("react").FunctionComponentElement<import("react").ProviderProps<AgentWorkspaceChrome>>;
|
|
10
10
|
export default function AgentsPage(props: AgentsPageProps): import("react").FunctionComponentElement<AgentChatPageProps>;
|
|
11
11
|
//# sourceMappingURL=agents.d.ts.map
|
package/dist/agents.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AACpF,OAAO,EAAgC,KAAK,iBAAiB,EAAc,MAAM,OAAO,CAAA;AAExF,OAAO,EACL,oBAAoB,EACpB,UAAU,EACV,KAAK,eAAe,EACpB,eAAe,GAChB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAExD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAA;AAEnE,KAAK,oBAAoB,GAAG,IAAI,CAC9B,eAAe,EACf,eAAe,GAAG,eAAe,GAAG,cAAc,CACnD,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG,iBAAiB,CAAC,oBAAoB,CAAC,CAAA;AAIjF,
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AACpF,OAAO,EAAgC,KAAK,iBAAiB,EAAc,MAAM,OAAO,CAAA;AAExF,OAAO,EACL,oBAAoB,EACpB,UAAU,EACV,KAAK,eAAe,EACpB,eAAe,GAChB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAExD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAA;AAEnE,KAAK,oBAAoB,GAAG,IAAI,CAC9B,eAAe,EACf,eAAe,GAAG,eAAe,GAAG,cAAc,CACnD,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG,iBAAiB,CAAC,oBAAoB,CAAC,CAAA;AAIjF,2FAA2F;AAC3F,wBAAgB,sBAAsB,CAAC,EACrC,aAAa,EACb,aAAa,EACb,YAAY,EACZ,QAAQ,GACT,EAAE,2BAA2B,iGAM7B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,gEAQxD"}
|
package/dist/agents.js.map
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/agents.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import { AgentChatPage, type AgentChatPageProps } from \"@sixb/agent-ui/react-router\"\nimport { createContext, createElement, type PropsWithChildren, useContext } from \"react\"\n\nexport {\n AgentContextProvider,\n AgentPanel,\n type AgentPanelProps,\n useAgentContext,\n} from \"@sixb/agent-ui\"\n\nexport { agentContext } from \"@sixb/core/agents/context\"\n\nexport type AgentsPageProps = Omit<AgentChatPageProps, \"routeBase\">\n\ntype AgentWorkspaceChrome = Pick<\n AgentsPageProps,\n \"sidebarHeader\" | \"sidebarFooter\" | \"sidebarWidth\"\n>\n\nexport type AgentWorkspaceProviderProps = PropsWithChildren<AgentWorkspaceChrome>\n\nconst AgentWorkspaceContext = createContext<AgentWorkspaceChrome>({})\n\n/** Configure the framework-owned Agents routes from
|
|
5
|
+
"import { AgentChatPage, type AgentChatPageProps } from \"@sixb/agent-ui/react-router\"\nimport { createContext, createElement, type PropsWithChildren, useContext } from \"react\"\n\nexport {\n AgentContextProvider,\n AgentPanel,\n type AgentPanelProps,\n useAgentContext,\n} from \"@sixb/agent-ui\"\n\nexport { agentContext } from \"@sixb/core/agents/context\"\n\nexport type AgentsPageProps = Omit<AgentChatPageProps, \"routeBase\">\n\ntype AgentWorkspaceChrome = Pick<\n AgentsPageProps,\n \"sidebarHeader\" | \"sidebarFooter\" | \"sidebarWidth\"\n>\n\nexport type AgentWorkspaceProviderProps = PropsWithChildren<AgentWorkspaceChrome>\n\nconst AgentWorkspaceContext = createContext<AgentWorkspaceChrome>({})\n\n/** Configure the framework-owned Agents routes, typically from `app/agents/layout.tsx`. */\nexport function AgentWorkspaceProvider({\n sidebarHeader,\n sidebarFooter,\n sidebarWidth,\n children,\n}: AgentWorkspaceProviderProps) {\n return createElement(\n AgentWorkspaceContext.Provider,\n { value: { sidebarHeader, sidebarFooter, sidebarWidth } },\n children\n )\n}\n\nexport default function AgentsPage(props: AgentsPageProps) {\n const workspaceChrome = useContext(AgentWorkspaceContext)\n\n return createElement(AgentChatPage, {\n ...workspaceChrome,\n ...props,\n routeBase: \"/agents\",\n })\n}\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";;AAAA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAOA;AAWA,IAAM,wBAAwB,cAAoC,CAAC,CAAC;AAG7D,SAAS,sBAAsB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,GAC8B;AAAA,EAC9B,OAAO,cACL,sBAAsB,UACtB,EAAE,OAAO,EAAE,eAAe,eAAe,aAAa,EAAE,GACxD,QACF;AAAA;AAGF,SAAwB,UAAU,CAAC,OAAwB;AAAA,EACzD,MAAM,kBAAkB,WAAW,qBAAqB;AAAA,EAExD,OAAO,cAAc,eAAe;AAAA,OAC/B;AAAA,OACA;AAAA,IACH,WAAW;AAAA,EACb,CAAC;AAAA;",
|
|
8
8
|
"debugId": "FD2DDDBFD9CFF84864756E2164756E21",
|
package/dist/auth.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type AuthExperienceState = {
|
|
2
|
+
readonly kind: "signIn";
|
|
3
|
+
} | {
|
|
4
|
+
readonly kind: "checkEmail";
|
|
5
|
+
} | {
|
|
6
|
+
readonly kind: "confirm";
|
|
7
|
+
readonly email?: string;
|
|
8
|
+
} | {
|
|
9
|
+
readonly kind: "invalidLink";
|
|
10
|
+
} | {
|
|
11
|
+
readonly kind: "error";
|
|
12
|
+
};
|
|
13
|
+
export interface AuthExperienceActions {
|
|
14
|
+
requestMagicLink(email: string): void;
|
|
15
|
+
confirmSignIn(): void;
|
|
16
|
+
restartSignIn(): void;
|
|
17
|
+
}
|
|
18
|
+
export interface AuthExperienceProps {
|
|
19
|
+
readonly state: AuthExperienceState;
|
|
20
|
+
readonly actions: AuthExperienceActions;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAC3B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAC3B;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;CAAE,GAC/B;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;CAAE,GAChC;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAA;AAE9B,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACrC,aAAa,IAAI,IAAI,CAAA;IACrB,aAAa,IAAI,IAAI,CAAA;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAA;IACnC,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAA;CACxC"}
|
package/dist/auth.js
ADDED
package/dist/auth.js.map
ADDED
package/dist/build.d.ts
CHANGED
|
@@ -13,10 +13,20 @@ export interface BuildAppResult {
|
|
|
13
13
|
outdir: string;
|
|
14
14
|
logs?: string[];
|
|
15
15
|
}
|
|
16
|
+
export interface BuildAuthExperienceOptions {
|
|
17
|
+
/** Generated HTML shell containing the auth bootstrap placeholder. */
|
|
18
|
+
entryPath: string;
|
|
19
|
+
/** Browser TypeScript entry generated alongside `entryPath`. */
|
|
20
|
+
scriptEntryPath: string;
|
|
21
|
+
/** Directory written for the API server to mount under `/auth`. */
|
|
22
|
+
outdir: string;
|
|
23
|
+
}
|
|
16
24
|
/**
|
|
17
25
|
* Builds the generated browser entry and writes a production-ready static shell and bundle.
|
|
18
26
|
*/
|
|
19
27
|
export declare function buildApp(options: BuildAppOptions): Promise<BuildAppResult>;
|
|
28
|
+
/** Builds the optional custom auth entry as API-served static assets. */
|
|
29
|
+
export declare function buildAuthExperience(options: BuildAuthExperienceOptions): Promise<BuildAppResult>;
|
|
20
30
|
export declare function prepareAppHtmlBundleEntry(entryPath: string): Promise<string>;
|
|
21
31
|
export declare function restoreAppStaticUrls(html: string): string;
|
|
22
32
|
//# sourceMappingURL=build.d.ts.map
|
package/dist/build.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,eAAe;IAC9B,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAA;IACjB,gEAAgE;IAChE,eAAe,EAAE,MAAM,CAAA;IACvB,8EAA8E;IAC9E,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;CAChB;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CA2EhF;AAKD,wBAAsB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CASlF;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzD"}
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,eAAe;IAC9B,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAA;IACjB,gEAAgE;IAChE,eAAe,EAAE,MAAM,CAAA;IACvB,8EAA8E;IAC9E,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;CAChB;AAED,MAAM,WAAW,0BAA0B;IACzC,sEAAsE;IACtE,SAAS,EAAE,MAAM,CAAA;IACjB,gEAAgE;IAChE,eAAe,EAAE,MAAM,CAAA;IACvB,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CA2EhF;AAED,yEAAyE;AACzE,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,cAAc,CAAC,CA+DzB;AAKD,wBAAsB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CASlF;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzD"}
|
package/dist/codegen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AuthSessionAudience } from "@sixb/core";
|
|
2
|
-
import type
|
|
2
|
+
import { type AppRouteLayout, type PageRoute } from "./scanner";
|
|
3
3
|
export interface BuiltInRouteManifestEntry {
|
|
4
4
|
readonly path: string;
|
|
5
5
|
readonly moduleSpecifier: string;
|
|
@@ -7,14 +7,25 @@ export interface BuiltInRouteManifestEntry {
|
|
|
7
7
|
}
|
|
8
8
|
export interface GenerateRouteManifestOptions {
|
|
9
9
|
readonly builtInRoutes?: readonly BuiltInRouteManifestEntry[];
|
|
10
|
+
readonly layouts?: readonly AppRouteLayout[];
|
|
10
11
|
}
|
|
12
|
+
export declare const AUTH_EXPERIENCE_BOOTSTRAP_PLACEHOLDER = "__SIXB_AUTH_BOOTSTRAP__";
|
|
11
13
|
/**
|
|
12
|
-
* Generates `.sixb/generated/routes.ts` with static
|
|
14
|
+
* Generates `.sixb/generated/routes.ts` with static page/layout imports. Modules are
|
|
13
15
|
* eager on purpose: project-specific apps bundle small, and a single bundle
|
|
14
16
|
* (one JS file, one render-blocking CSS file) means no Suspense gap or
|
|
15
17
|
* late-arriving styles when navigating — matching how Atlas routes.
|
|
16
18
|
*/
|
|
17
|
-
export declare function generateRouteManifest(routes: PageRoute[], generatedDir: string, options?: GenerateRouteManifestOptions): Promise<string>;
|
|
19
|
+
export declare function generateRouteManifest(routes: readonly PageRoute[], generatedDir: string, options?: GenerateRouteManifestOptions): Promise<string>;
|
|
20
|
+
/** Generates the optional browser entry served by the API for `/auth/*`. */
|
|
21
|
+
export declare function generateAuthExperienceEntry(projectRoot: string, generatedDir: string, options?: {
|
|
22
|
+
readonly appDir?: string;
|
|
23
|
+
readonly publicDir?: string;
|
|
24
|
+
readonly stylesheetPath?: string | null;
|
|
25
|
+
}): Promise<{
|
|
26
|
+
readonly htmlPath: string;
|
|
27
|
+
readonly mainPath: string;
|
|
28
|
+
} | null>;
|
|
18
29
|
/**
|
|
19
30
|
* Generates the app entry files:
|
|
20
31
|
* - `.sixb/generated/index.html` — HTML shell
|
package/dist/codegen.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codegen.d.ts","sourceRoot":"","sources":["../src/codegen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAIrD,OAAO,KAAK,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"codegen.d.ts","sourceRoot":"","sources":["../src/codegen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAIrD,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAmB,MAAM,WAAW,CAAA;AAEhF,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;IAChC,QAAQ,CAAC,U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C,GACL,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC,CAkbvE"}
|
|
@@ -18,6 +18,12 @@ export interface CustomAppDevOptions {
|
|
|
18
18
|
export interface CustomAppBuildOptions {
|
|
19
19
|
outdir?: string;
|
|
20
20
|
}
|
|
21
|
+
export interface CustomAuthExperienceBuildOptions {
|
|
22
|
+
outdir?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface CustomAuthExperienceBuildResult {
|
|
25
|
+
readonly outdir: string;
|
|
26
|
+
}
|
|
21
27
|
export interface CustomAppStartOptions {
|
|
22
28
|
host?: string;
|
|
23
29
|
port?: number;
|
|
@@ -35,6 +41,7 @@ export interface CustomAppDevServer {
|
|
|
35
41
|
export interface CustomAppInstance {
|
|
36
42
|
scanRoutes(): Promise<PageRoute[]>;
|
|
37
43
|
hasRoutes(): Promise<boolean>;
|
|
44
|
+
prepareAuthExperience(options?: CustomAuthExperienceBuildOptions): Promise<CustomAuthExperienceBuildResult | null>;
|
|
38
45
|
dev(options?: CustomAppDevOptions): Promise<CustomAppDevServer>;
|
|
39
46
|
build(options?: CustomAppBuildOptions): Promise<BuildAppResult>;
|
|
40
47
|
start(options?: CustomAppStartOptions): Promise<CustomAppDevServer>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCustomApp.d.ts","sourceRoot":"","sources":["../src/createCustomApp.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,EACL,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"createCustomApp.d.ts","sourceRoot":"","sources":["../src/createCustomApp.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AACrD,OAAO,EACL,KAAK,cAAc,EAKpB,MAAM,SAAS,CAAA;AAQhB,OA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BAAqB,CACnB,OAAO,CAAC,EAAE,gCAAgC,GACzC,OAAO,CAAC,+BAA+B,GAAG,IAAI,CAAC,CAAA;IAClD,GAAG,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;IAC/D,KAAK,CAAC,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;IAC/D,KAAK,CAAC,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;CACpE;AAWD,wBAAsB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAibjG"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { type CreateCustomAppOptions, type CustomAppBuildOptions, type CustomAppDevOptions, type CustomAppDevServer, type CustomAppInstance, type CustomAppStartOptions, createCustomApp, } from "./createCustomApp";
|
|
1
|
+
export { type CreateCustomAppOptions, type CustomAppBuildOptions, type CustomAppDevOptions, type CustomAppDevServer, type CustomAppInstance, type CustomAppStartOptions, type CustomAuthExperienceBuildOptions, type CustomAuthExperienceBuildResult, createCustomApp, } from "./createCustomApp";
|
|
2
2
|
export type { AppMetadata } from "./metadata";
|
|
3
3
|
export { createTailwindCssCompiler, type TailwindCssCompiler, type TailwindCssCompilerOptions, } from "./tailwind";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,eAAe,GAChB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EACL,yBAAyB,EACzB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,GAChC,MAAM,YAAY,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACpC,eAAe,GAChB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,EACL,yBAAyB,EACzB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,GAChC,MAAM,YAAY,CAAA"}
|