@bitakit/floating-layout-set 0.0.0-stage → 0.3.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/AGENTS.md +49 -0
- package/CLAUDE.md +1 -0
- package/README.md +49 -2
- package/dist/locales/de.json +14 -0
- package/dist/locales/en.json +14 -0
- package/dist/plugin.d.ts +22 -0
- package/dist/plugin.js +26 -0
- package/dist/plugin.permissions.json +7 -0
- package/dist/plugin.slots.json +26 -0
- package/dist/ui/code.d.ts +7 -0
- package/dist/ui/code.js +7 -0
- package/dist/ui/layouts/app.d.ts +10 -0
- package/dist/ui/layouts/app.js +12 -0
- package/dist/ui/layouts/auth.d.ts +8 -0
- package/dist/ui/layouts/auth.js +10 -0
- package/dist/ui/slots/screen.error.d.ts +9 -0
- package/dist/ui/slots/screen.error.js +16 -0
- package/dist/ui/slots/screen.not-found.d.ts +2 -0
- package/dist/ui/slots/screen.not-found.js +13 -0
- package/marketplace/README.md +50 -0
- package/marketplace/screenshots/01-floating-set-wide.png +0 -0
- package/marketplace/screenshots/02-floating-set-sign-in.png +0 -0
- package/marketplace/screenshots/03-floating-set-not-found.png +0 -0
- package/marketplace/screenshots/04-floating-set-error.png +0 -0
- package/marketplace/screenshots/05-floating-set-phone.png +0 -0
- package/marketplace/screenshots/06-floating-set-phone-menu.png +0 -0
- package/package.json +58 -4
- package/styles.css +2 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# @bitakit/floating-layout-set — guide for agents
|
|
2
|
+
|
|
3
|
+
> For agents building an app with this package (it ships in `node_modules/@bitakit/floating-layout-set`).
|
|
4
|
+
> To change the package itself, follow the repository's own AGENTS.md instead.
|
|
5
|
+
|
|
6
|
+
The Floating layout set is a matching set of replaceable parts: the app's frame, the sign-in frame and two
|
|
7
|
+
screens. It is a discovered plugin with the ID `floating-set`, needs `@bitakit/shell` and adds no
|
|
8
|
+
Actions, services, settings or pages.
|
|
9
|
+
|
|
10
|
+
## What it provides
|
|
11
|
+
|
|
12
|
+
| Kind | IDs |
|
|
13
|
+
| ------- | ------------------------------------------------------------------------------------------- |
|
|
14
|
+
| Frame | `floating-set:default` for `layout.app`: floating sidebar on the left, icons when collapsed |
|
|
15
|
+
| Frame | `floating-set:default` for `layout.auth`: split, the page at the end |
|
|
16
|
+
| Screens | `floating-set` for `screen.not-found` and `screen.error` |
|
|
17
|
+
| Locales | `@bitakit/floating-layout-set/locales/en.json`, `de.json` (top-level key `floating-set`) |
|
|
18
|
+
|
|
19
|
+
## Pick it
|
|
20
|
+
|
|
21
|
+
- `npx bitakit shell use floating-set --all` (or the package name) writes one `choose` entry per part
|
|
22
|
+
into `bitakit.config.ts`: `'layout.app': 'floating-set:default'`, `'layout.auth': 'floating-set:default'`,
|
|
23
|
+
`'screen.not-found': 'floating-set'`, `'screen.error': 'floating-set'`.
|
|
24
|
+
- As the only candidate of a part it renders there without a choice. `--part <id>` chooses or
|
|
25
|
+
resets one part; `npx bitakit slots` shows what renders every part.
|
|
26
|
+
- The app's own files (`src/layouts/app.tsx`, `src/layouts/auth.tsx`,
|
|
27
|
+
`src/ui/slots/screen.*.tsx`) win over the package unless `bitakit.config.ts` chooses it:
|
|
28
|
+
after `shell use`, `npx bitakit shell reset --part <id>` lets the app's file render.
|
|
29
|
+
|
|
30
|
+
## What the app keeps doing
|
|
31
|
+
|
|
32
|
+
- `src/app/(app)/layout.tsx` still renders `<AppShell brand account header>{children}</AppShell>`;
|
|
33
|
+
the sidebar shows `brand` and `account`, the bar shows `header`.
|
|
34
|
+
- Navigation, toolbar Actions, header widgets, `sidebar.*`, `shell.content.*` and `shell.footer`
|
|
35
|
+
render as in Shell's own sidebar frame.
|
|
36
|
+
- Sign-in pages use `export const layout = 'auth'`; the panel beside the page is the
|
|
37
|
+
`shell.auth.aside` slot (`src/ui/slots/shell.auth.aside.tsx`), shown from 1024 px.
|
|
38
|
+
- Show the screens through Shell's pages: `<NotFoundPage />` in `not-found.tsx`,
|
|
39
|
+
`<ErrorPage reset={reset} />` in `error.tsx`. The set's error screen offers "Try again" only
|
|
40
|
+
when `reset` is passed.
|
|
41
|
+
|
|
42
|
+
## Rules
|
|
43
|
+
|
|
44
|
+
- The set's frame names its sidebar look. The Shell option `frame` and the Layout settings
|
|
45
|
+
`shell.layout`, `shell.sidebar*` and `shell.navbar` do not change it; for another look use
|
|
46
|
+
Shell's own frame with those options, or another package.
|
|
47
|
+
- The Shell option `auth` does not change the set's sign-in frame either.
|
|
48
|
+
- With `@bitakit/next-intl`, merge the package's catalogs with `mergePluginMessages` so the
|
|
49
|
+
screens are translated.
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@AGENTS.md
|
package/README.md
CHANGED
|
@@ -1,3 +1,50 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Floating layout set
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A matching set for a BitaKit app: a frame with a floating sidebar, a split sign-in frame, and its
|
|
4
|
+
own "not found" and "error" screens. One package, one command, and the app looks of a piece from
|
|
5
|
+
the first page to the last.
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install @bitakit/floating-layout-set
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npx bitakit shell use @bitakit/floating-layout-set --all
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The package is a BitaKit plugin (ID `floating-set`) and needs `@bitakit/shell`. `--all` chooses every
|
|
18
|
+
part it brings; when it is the app's only frame package, its parts render without a choice.
|
|
19
|
+
|
|
20
|
+
| Part | What the set brings |
|
|
21
|
+
| ------------------ | --------------------------------------------------------------------------- |
|
|
22
|
+
| `layout.app` | A floating sidebar on the left that collapses to icons, and a bar beside it |
|
|
23
|
+
| `layout.auth` | The page at the end, a panel for the `shell.auth.aside` slot at the start |
|
|
24
|
+
| `screen.not-found` | "404", what happened, and the way back to the start page |
|
|
25
|
+
| `screen.error` | "500", "Try again" when the page can be retried, and the way back |
|
|
26
|
+
|
|
27
|
+
Each part can also be chosen alone: `npx bitakit shell use floating-set --part layout.auth`.
|
|
28
|
+
`npx bitakit shell reset --part <part>` returns one part to Shell's own.
|
|
29
|
+
|
|
30
|
+
## What it shows where
|
|
31
|
+
|
|
32
|
+
- The sidebar: the app's brand, the navigation and the account menu. On a phone it is a drawer
|
|
33
|
+
behind the bar's button, as Shell's own sidebar is.
|
|
34
|
+
- The bar: the sidebar's button, the header places and the toolbar.
|
|
35
|
+
- The sign-in frame, from 1024 px: the page in one half, what the app puts into
|
|
36
|
+
`shell.auth.aside` in the other. Phones show the page alone.
|
|
37
|
+
- The screens appear wherever the app shows Shell's `NotFoundPage` and `ErrorPage`.
|
|
38
|
+
|
|
39
|
+
The set is Shell's own parts with their look fixed, so features change nothing, and the Layout
|
|
40
|
+
settings that would change the sidebar are not offered while the set renders. Content width,
|
|
41
|
+
density, corners and themes apply as usual.
|
|
42
|
+
|
|
43
|
+
## Good to know
|
|
44
|
+
|
|
45
|
+
- The sign-in frame reaches only pages of the `auth` family. From `@bitakit/better-auth-ui`
|
|
46
|
+
0.3.6 its sign-in pages join it on their own; with an older release set `authLayout: 'auth'` in
|
|
47
|
+
`src/configs/better-auth-ui.ts`.
|
|
48
|
+
- The screens' texts are English and German (`@bitakit/floating-layout-set/locales/<lang>.json`, the
|
|
49
|
+
key `floating-set`); merge them like every package's catalogs.
|
|
50
|
+
- The error screen never shows the error itself.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"floating-set": {
|
|
3
|
+
"home": "Zurück zur Startseite",
|
|
4
|
+
"notFound": {
|
|
5
|
+
"title": "Diese Seite gibt es nicht",
|
|
6
|
+
"description": "Vielleicht ist die Adresse falsch geschrieben, oder die Seite wurde verschoben."
|
|
7
|
+
},
|
|
8
|
+
"error": {
|
|
9
|
+
"title": "Bei uns ist etwas schiefgegangen",
|
|
10
|
+
"description": "Versuchen Sie es erneut. Wenn es wieder passiert, gehen Sie zurück zur Startseite.",
|
|
11
|
+
"retry": "Erneut versuchen"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"floating-set": {
|
|
3
|
+
"home": "Back to the start page",
|
|
4
|
+
"notFound": {
|
|
5
|
+
"title": "This page does not exist",
|
|
6
|
+
"description": "The address may be mistyped, or the page has moved."
|
|
7
|
+
},
|
|
8
|
+
"error": {
|
|
9
|
+
"title": "Something went wrong on our side",
|
|
10
|
+
"description": "Try again. If it keeps happening, go back to the start page.",
|
|
11
|
+
"retry": "Try again"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Generated by BitaKit. Do not edit.
|
|
2
|
+
import type { DiscoveredFile, DiscoveredSlotEntry, DiscoveredServiceEntry, DiscoveredActionEntry, DiscoveredConfigEntry, DiscoveredEventsEntry, DiscoveredCancelableEntry, DiscoveredSettingsEntry } from '@bitakit/core';
|
|
3
|
+
|
|
4
|
+
type PluginSettings = {};
|
|
5
|
+
type PluginSlots = {};
|
|
6
|
+
type PluginServices = {};
|
|
7
|
+
type PluginActions = {};
|
|
8
|
+
type PluginEvents = {};
|
|
9
|
+
type PluginCancelable = {};
|
|
10
|
+
declare module '@bitakit/core' {
|
|
11
|
+
interface ServiceMap extends PluginServices {}
|
|
12
|
+
interface ActionMap extends PluginActions {}
|
|
13
|
+
interface EventMap extends PluginEvents {}
|
|
14
|
+
interface CancelableEventMap extends PluginCancelable {}
|
|
15
|
+
interface SlotMap extends PluginSlots {}
|
|
16
|
+
interface SettingsMap extends PluginSettings {}
|
|
17
|
+
interface ConfigMap { "floating-set": {} }
|
|
18
|
+
}
|
|
19
|
+
import type { Plugin } from '@bitakit/core';
|
|
20
|
+
/** Creates the "floating-set" plugin. Apps discover it through package.json bitakit.plugin. */
|
|
21
|
+
declare const plugin: () => Plugin & { readonly id: "floating-set" };
|
|
22
|
+
export default plugin;
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// Generated by BitaKit. Do not edit.
|
|
3
|
+
import { definePlugin, discoveredFile, discoverActions, discoverServices, discoverSlots, discoverConfig, discoverInterceptors, discoverInstallers, discoverEvents, discoverSettings, pluginSettingsPage, pluginPage, pluginSlot, pluginLayout, pluginProvider } from '@bitakit/core';
|
|
4
|
+
import * as module0 from "./ui/slots/screen.error.js";
|
|
5
|
+
import * as module1 from "./ui/slots/screen.not-found.js";
|
|
6
|
+
import * as module2 from "./ui/layouts/app.js";
|
|
7
|
+
import * as module3 from "./ui/layouts/auth.js";
|
|
8
|
+
|
|
9
|
+
/** Creates the "floating-set" plugin; apps call this once per runtime. */
|
|
10
|
+
export default function plugin() {
|
|
11
|
+
return definePlugin({
|
|
12
|
+
id: "floating-set",
|
|
13
|
+
metadata: {"title":"Floating layout set","version":"0.3.0","description":"A matching set for BitaKit apps: a floating sidebar frame, a split sign-in and its own not-found and error screens.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/mvavesal/bitakit-layouts.git","directory":"packages/floating-set"},"name":"@bitakit/floating-layout-set"},
|
|
14
|
+
dependencies: ["shell"],
|
|
15
|
+
events: discoverEvents([]),
|
|
16
|
+
settings: discoverSettings([]),
|
|
17
|
+
slots: discoverSlots([], "floating-set"),
|
|
18
|
+
services: discoverServices([], "floating-set"),
|
|
19
|
+
actions: discoverActions([], "floating-set"),
|
|
20
|
+
config: discoverConfig([]),
|
|
21
|
+
interceptors: discoverInterceptors([]),
|
|
22
|
+
installs: discoverInstallers([]),
|
|
23
|
+
ui: { pages: [], slots: [pluginSlot(module0, "screen.error", "ui/slots/screen.error.tsx"), pluginSlot(module1, "screen.not-found", "ui/slots/screen.not-found.tsx"), pluginLayout(module2, "app", "default", "ui/layouts/app.tsx"), pluginLayout(module3, "auth", "default", "ui/layouts/auth.tsx")], providers: [] },
|
|
24
|
+
setup: undefined,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"pluginId": "floating-set",
|
|
4
|
+
"definitions": [],
|
|
5
|
+
"unresolved": [],
|
|
6
|
+
"contributions": [
|
|
7
|
+
{
|
|
8
|
+
"slot": "screen.error",
|
|
9
|
+
"file": "ui/slots/screen.error.tsx"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"slot": "screen.not-found",
|
|
13
|
+
"file": "ui/slots/screen.not-found.tsx"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"slot": "layout.app",
|
|
17
|
+
"key": "default",
|
|
18
|
+
"file": "ui/layouts/app.tsx"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"slot": "layout.auth",
|
|
22
|
+
"key": "default",
|
|
23
|
+
"file": "ui/layouts/auth.tsx"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** A screen's message with its status code large above the title. */
|
|
3
|
+
export declare function CodeMessage({ code, title, description, }: {
|
|
4
|
+
code: string;
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
description: ReactNode;
|
|
7
|
+
}): import("react").JSX.Element;
|
package/dist/ui/code.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from '@bitakit/shell/pages';
|
|
4
|
+
/** A screen's message with its status code large above the title. */
|
|
5
|
+
export function CodeMessage({ code, title, description, }) {
|
|
6
|
+
return (_jsxs(EmptyHeader, { children: [_jsx(EmptyMedia, { children: _jsx("span", { "aria-hidden": "true", className: "text-6xl font-semibold text-muted-foreground", children: code }) }), _jsx(EmptyTitle, { role: "heading", "aria-level": 1, children: title }), _jsx(EmptyDescription, { children: description })] }));
|
|
7
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* `floating-set:default` for the app's frame (`layout.app`): Shell's own parts with their look named,
|
|
4
|
+
* so the Layout settings cannot change it. A floating sidebar on the left that collapses to
|
|
5
|
+
* icons holds the app's brand, the navigation and the account; the bar beside it holds the
|
|
6
|
+
* header places and the toolbar.
|
|
7
|
+
*/
|
|
8
|
+
export default function StudioFrame({ children }: {
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { AppShell } from '@bitakit/shell';
|
|
4
|
+
/**
|
|
5
|
+
* `floating-set:default` for the app's frame (`layout.app`): Shell's own parts with their look named,
|
|
6
|
+
* so the Layout settings cannot change it. A floating sidebar on the left that collapses to
|
|
7
|
+
* icons holds the app's brand, the navigation and the account; the bar beside it holds the
|
|
8
|
+
* header places and the toolbar.
|
|
9
|
+
*/
|
|
10
|
+
export default function StudioFrame({ children }) {
|
|
11
|
+
return (_jsxs(_Fragment, { children: [_jsx(AppShell.Sidebar, { variant: "floating", side: "left", collapse: "icons", header: _jsx(AppShell.Brand, {}), footer: _jsx(AppShell.Account, {}) }), _jsx(AppShell.Content, { topBar: _jsx(AppShell.TopBar, { layout: "sidebar", sidebarSide: "left", header: _jsx(AppShell.Header, {}) }), children: children })] }));
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* `floating-set:default` for the frame around sign-in pages (`layout.auth`): Shell's split frame with
|
|
4
|
+
* the page at the end, so the `shell.auth.aside` panel leads.
|
|
5
|
+
*/
|
|
6
|
+
export default function StudioAuth({ children }: {
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { AppShell } from '@bitakit/shell';
|
|
4
|
+
/**
|
|
5
|
+
* `floating-set:default` for the frame around sign-in pages (`layout.auth`): Shell's split frame with
|
|
6
|
+
* the page at the end, so the `shell.auth.aside` panel leads.
|
|
7
|
+
*/
|
|
8
|
+
export default function StudioAuth({ children }) {
|
|
9
|
+
return (_jsx(AppShell.AuthLayout, { layout: "split", form: "end", children: children }));
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `screen.error`: never the raw error. `payload.reset` is the host's recovery, when it has one:
|
|
3
|
+
* the screen offers it as "Try again".
|
|
4
|
+
*/
|
|
5
|
+
export default function StudioError({ payload }: {
|
|
6
|
+
payload?: {
|
|
7
|
+
reset?: () => void;
|
|
8
|
+
};
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useBitaKitNavigation, useTranslation } from '@bitakit/ui';
|
|
4
|
+
import { Button } from '@bitakit/ui/components';
|
|
5
|
+
import { PageState } from '@bitakit/shell/pages';
|
|
6
|
+
import { CodeMessage } from '../code.js';
|
|
7
|
+
/**
|
|
8
|
+
* `screen.error`: never the raw error. `payload.reset` is the host's recovery, when it has one:
|
|
9
|
+
* the screen offers it as "Try again".
|
|
10
|
+
*/
|
|
11
|
+
export default function StudioError({ payload }) {
|
|
12
|
+
const t = useTranslation();
|
|
13
|
+
const { Link } = useBitaKitNavigation();
|
|
14
|
+
const Anchor = Link ?? 'a';
|
|
15
|
+
return (_jsxs(PageState, { content: _jsx(CodeMessage, { code: "500", title: t('floating-set.error.title', undefined, 'Something went wrong on our side'), description: t('floating-set.error.description', undefined, 'Try again. If it keeps happening, go back to the start page.') }), children: [payload?.reset ? (_jsx(Button, { type: "button", onClick: payload.reset, children: t('floating-set.error.retry', undefined, 'Try again') })) : null, _jsx(Button, { asChild: true, variant: "outline", children: _jsx(Anchor, { href: "/", children: t('floating-set.home', undefined, 'Back to the start page') }) })] }));
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useBitaKitNavigation, useTranslation } from '@bitakit/ui';
|
|
4
|
+
import { Button } from '@bitakit/ui/components';
|
|
5
|
+
import { PageState } from '@bitakit/shell/pages';
|
|
6
|
+
import { CodeMessage } from '../code.js';
|
|
7
|
+
/** `screen.not-found`: the status code, what happened, and the way back to the start page. */
|
|
8
|
+
export default function StudioNotFound() {
|
|
9
|
+
const t = useTranslation();
|
|
10
|
+
const { Link } = useBitaKitNavigation();
|
|
11
|
+
const Anchor = Link ?? 'a';
|
|
12
|
+
return (_jsx(PageState, { content: _jsx(CodeMessage, { code: "404", title: t('floating-set.notFound.title', undefined, 'This page does not exist'), description: t('floating-set.notFound.description', undefined, 'The address may be mistyped, or the page has moved.') }), children: _jsx(Button, { asChild: true, children: _jsx(Anchor, { href: "/", children: t('floating-set.home', undefined, 'Back to the start page') }) }) }));
|
|
13
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Floating layout set
|
|
2
|
+
|
|
3
|
+
A matching set for a BitaKit app: a frame with a floating sidebar, a split sign-in frame, and its
|
|
4
|
+
own "not found" and "error" screens. One package, one command, and the app looks of a piece from
|
|
5
|
+
the first page to the last.
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install @bitakit/floating-layout-set
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npx bitakit shell use @bitakit/floating-layout-set --all
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The package is a BitaKit plugin (ID `floating-set`) and needs `@bitakit/shell`. `--all` chooses every
|
|
18
|
+
part it brings; when it is the app's only frame package, its parts render without a choice.
|
|
19
|
+
|
|
20
|
+
| Part | What the set brings |
|
|
21
|
+
| ------------------ | --------------------------------------------------------------------------- |
|
|
22
|
+
| `layout.app` | A floating sidebar on the left that collapses to icons, and a bar beside it |
|
|
23
|
+
| `layout.auth` | The page at the end, a panel for the `shell.auth.aside` slot at the start |
|
|
24
|
+
| `screen.not-found` | "404", what happened, and the way back to the start page |
|
|
25
|
+
| `screen.error` | "500", "Try again" when the page can be retried, and the way back |
|
|
26
|
+
|
|
27
|
+
Each part can also be chosen alone: `npx bitakit shell use floating-set --part layout.auth`.
|
|
28
|
+
`npx bitakit shell reset --part <part>` returns one part to Shell's own.
|
|
29
|
+
|
|
30
|
+
## What it shows where
|
|
31
|
+
|
|
32
|
+
- The sidebar: the app's brand, the navigation and the account menu. On a phone it is a drawer
|
|
33
|
+
behind the bar's button, as Shell's own sidebar is.
|
|
34
|
+
- The bar: the sidebar's button, the header places and the toolbar.
|
|
35
|
+
- The sign-in frame, from 1024 px: the page in one half, what the app puts into
|
|
36
|
+
`shell.auth.aside` in the other. Phones show the page alone.
|
|
37
|
+
- The screens appear wherever the app shows Shell's `NotFoundPage` and `ErrorPage`.
|
|
38
|
+
|
|
39
|
+
The set is Shell's own parts with their look fixed, so features change nothing, and the Layout
|
|
40
|
+
settings that would change the sidebar are not offered while the set renders. Content width,
|
|
41
|
+
density, corners and themes apply as usual.
|
|
42
|
+
|
|
43
|
+
## Good to know
|
|
44
|
+
|
|
45
|
+
- The sign-in frame reaches only pages of the `auth` family. From `@bitakit/better-auth-ui`
|
|
46
|
+
0.3.6 its sign-in pages join it on their own; with an older release set `authLayout: 'auth'` in
|
|
47
|
+
`src/configs/better-auth-ui.ts`.
|
|
48
|
+
- The screens' texts are English and German (`@bitakit/floating-layout-set/locales/<lang>.json`, the
|
|
49
|
+
key `floating-set`); merge them like every package's catalogs.
|
|
50
|
+
- The error screen never shows the error itself.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitakit/floating-layout-set",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "A matching set for BitaKit apps: a floating sidebar frame, a split sign-in and its own not-found and error screens.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"./styles.css"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"styles.css",
|
|
12
|
+
"README.md",
|
|
13
|
+
"AGENTS.md",
|
|
14
|
+
"CLAUDE.md",
|
|
15
|
+
"marketplace"
|
|
16
|
+
],
|
|
17
|
+
"exports": {
|
|
18
|
+
"./plugin": {
|
|
19
|
+
"types": "./dist/plugin.d.ts",
|
|
20
|
+
"default": "./dist/plugin.js"
|
|
21
|
+
},
|
|
22
|
+
"./locales/*.json": "./dist/locales/*.json",
|
|
23
|
+
"./styles.css": "./styles.css",
|
|
24
|
+
"./package.json": "./package.json"
|
|
25
|
+
},
|
|
26
|
+
"bitakit": {
|
|
27
|
+
"plugin": "./plugin",
|
|
28
|
+
"id": "floating-set",
|
|
29
|
+
"title": "Floating layout set",
|
|
30
|
+
"styles": "./styles.css",
|
|
31
|
+
"dependencies": [
|
|
32
|
+
"shell"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "bitakit build",
|
|
37
|
+
"typecheck": "bitakit build --check",
|
|
38
|
+
"test": "node --test tests/*.test.mjs"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"@bitakit/core": "^0.3.7",
|
|
42
|
+
"@bitakit/shell": "^0.3.4",
|
|
43
|
+
"@bitakit/ui": "^0.3.4",
|
|
44
|
+
"react": "^19.0.0",
|
|
45
|
+
"react-dom": "^19.0.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@bitakit/cli": "^0.3.8",
|
|
49
|
+
"@bitakit/layout-testing": "*"
|
|
50
|
+
},
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"repository": {
|
|
53
|
+
"type": "git",
|
|
54
|
+
"url": "git+https://github.com/mvavesal/bitakit-layouts.git",
|
|
55
|
+
"directory": "packages/floating-set"
|
|
56
|
+
},
|
|
57
|
+
"publishConfig": {
|
|
58
|
+
"access": "public"
|
|
59
|
+
}
|
|
60
|
+
}
|
package/styles.css
ADDED