@qilin-agent/client-ui-layout 0.0.0-stage → 3.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/LICENSE +21 -0
- package/README.i18n.yaml +40 -0
- package/README.md +97 -2
- package/README.zh.md +98 -0
- package/lib/client.js +658 -0
- package/lib/index.js +6 -0
- package/lib/types/client/AppFrame.d.ts +7 -0
- package/lib/types/client/DocumentTitle.d.ts +14 -0
- package/lib/types/client/columns.d.ts +51 -0
- package/lib/types/client/index.d.ts +129 -0
- package/lib/types/client/service.d.ts +76 -0
- package/lib/types/client/shortcut-locales.d.ts +7 -0
- package/lib/types/client/stores.d.ts +72 -0
- package/lib/types/client/theme-presenter.d.ts +49 -0
- package/lib/types/index.d.ts +4 -0
- package/package.json +66 -3
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normal column geometry: the right column shrinks, then loses its track,
|
|
3
|
+
* before the center drops below its minimum. The sidebar never concedes here;
|
|
4
|
+
* AppFrame supplies its effective preference after responsive collapse.
|
|
5
|
+
*/
|
|
6
|
+
/** Resolved widths for one frame. */
|
|
7
|
+
export interface Columns {
|
|
8
|
+
sidebar: number;
|
|
9
|
+
center: number;
|
|
10
|
+
rightbar: number;
|
|
11
|
+
}
|
|
12
|
+
/** Center width protected while the normal right column is open. */
|
|
13
|
+
export declare const CENTER_MIN = 400;
|
|
14
|
+
/** Sidebar drag clamp floor. */
|
|
15
|
+
export declare const SIDEBAR_MIN = 264;
|
|
16
|
+
/** Sidebar drag clamp ceiling. */
|
|
17
|
+
export declare const SIDEBAR_MAX = 420;
|
|
18
|
+
/** Sidebar width before any user drag. */
|
|
19
|
+
export declare const SIDEBAR_DEFAULT = 280;
|
|
20
|
+
/** Closed-sidebar rail: a 24px icon column between 16px horizontal paddings. */
|
|
21
|
+
export declare const SIDEBAR_COLLAPSED = 56;
|
|
22
|
+
/** Viewport width below which the sidebar auto-collapses to the rail (deepsuite
|
|
23
|
+
* LG breakpoint); a manual toggle below it re-expands over the squeezed center
|
|
24
|
+
* (stores.ts narrowExpanded). */
|
|
25
|
+
export declare const SIDEBAR_AUTO_COLLAPSE = 1024;
|
|
26
|
+
/** Right column drag clamp floor. */
|
|
27
|
+
export declare const RIGHTBAR_MIN = 300;
|
|
28
|
+
/** Maximum normal right panel width as a fraction of the frame. */
|
|
29
|
+
export declare const RIGHTBAR_MAX_RATIO = 0.7;
|
|
30
|
+
/** First-open right panel preference as a fraction of the frame. */
|
|
31
|
+
export declare const RIGHTBAR_DEFAULT_RATIO = 0.35;
|
|
32
|
+
/**
|
|
33
|
+
* Clamp a panel width into its contract range.
|
|
34
|
+
* @param px - requested width.
|
|
35
|
+
* @param min - range lower bound.
|
|
36
|
+
* @param max - range upper bound.
|
|
37
|
+
* @returns the clamped width.
|
|
38
|
+
*/
|
|
39
|
+
export declare function clampWidth(px: number, min: number, max: number): number;
|
|
40
|
+
/**
|
|
41
|
+
* Solve the three column widths for one viewport frame.
|
|
42
|
+
* @param viewport - available frame width in px.
|
|
43
|
+
* @param sidebar - sidebar width preference in px (0 = closed).
|
|
44
|
+
* @param rightbar - requested right panel width in px (0 = no track).
|
|
45
|
+
* @param collapsedWidth - track width of the closed sidebar; the default keeps
|
|
46
|
+
* the icon rail, 0 hides the column entirely (macOS desktop).
|
|
47
|
+
* @returns actual widths after shrinking or removing the right track; only
|
|
48
|
+
* without that track may the center fall below its minimum, down to zero.
|
|
49
|
+
*/
|
|
50
|
+
export declare function computeColumns(viewport: number, sidebar: number, rightbar: number, collapsedWidth?: number): Columns;
|
|
51
|
+
//# sourceMappingURL=columns.d.ts.map
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layout plugin, browser half: one register() call contributes AppFrame into
|
|
3
|
+
* the runtime's built-in 'root' slot and, in the same breath, declares the
|
|
4
|
+
* four child slots (declaration = exclusive render authority), seats the
|
|
5
|
+
* layout store (panel geometry), and wires the panel-action service face.
|
|
6
|
+
* ctx.layout selects the main panel and controls column geometry; Session
|
|
7
|
+
* selection belongs to the Session Controller. A second effect seats the theme
|
|
8
|
+
* presenter, which projects ctx.theme snapshots onto document.body.
|
|
9
|
+
*/
|
|
10
|
+
import type { Context as ClientContext } from '@qilin-agent/kylin';
|
|
11
|
+
import type { SnapshotSelectorHook } from '@qilin-agent/client-ui-slots';
|
|
12
|
+
import type { PanelInfo } from './service.ts';
|
|
13
|
+
import { zh } from './shortcut-locales.ts';
|
|
14
|
+
export { LayoutController } from './service.ts';
|
|
15
|
+
export type { ILayout, MainPanelId, PanelInfo } from './service.ts';
|
|
16
|
+
/** Selector hook over root-scoped panel selection. */
|
|
17
|
+
export type UsePanelInfo = SnapshotSelectorHook<PanelInfo>;
|
|
18
|
+
declare module '@qilin-agent/kylin' {
|
|
19
|
+
interface Context {
|
|
20
|
+
/** The outward face only; the concrete service stays inside this plugin. */
|
|
21
|
+
layout: import('./service.ts').ILayout;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
declare module '@qilin-agent/client-ui-slots' {
|
|
25
|
+
interface LocaleNamespaceMap {
|
|
26
|
+
/** Layout keyboard command labels. */
|
|
27
|
+
'shortcuts.layout': keyof typeof zh;
|
|
28
|
+
}
|
|
29
|
+
interface GlobalStandardProps {
|
|
30
|
+
/** Subscribe to the selected main panel independently of parent renders. */
|
|
31
|
+
usePanelInfo: UsePanelInfo;
|
|
32
|
+
}
|
|
33
|
+
interface SlotMap {
|
|
34
|
+
/**
|
|
35
|
+
* The whole left column. OCCUPIED by ui-sidebar's SidebarRoot, which
|
|
36
|
+
* declares the workspace and settings seats inside it — registering here
|
|
37
|
+
* replaces the navigation column outright rather than adding to it, and
|
|
38
|
+
* the seats it declares disappear with it. To add something to the
|
|
39
|
+
* sidebar, register into one of those inner seats instead.
|
|
40
|
+
*
|
|
41
|
+
* The occupant receives the frame's live column state (collapsed, width)
|
|
42
|
+
* and is expected to render the compact control rail while collapsed.
|
|
43
|
+
*/
|
|
44
|
+
'sidebar': {
|
|
45
|
+
kind: 'single';
|
|
46
|
+
scope: 'root';
|
|
47
|
+
owner: SidebarOwnerProps;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Central panel selected by sidebar entry id. The reserved `conversation`
|
|
51
|
+
* key hosts the Conversation; other keys receive no Session binding.
|
|
52
|
+
*/
|
|
53
|
+
'main': {
|
|
54
|
+
kind: 'keyed';
|
|
55
|
+
scope: 'root';
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The right column: a track the centre makes room for, or nothing. OCCUPIED
|
|
59
|
+
* by the right Sidebar, which uses the resolved column width in normal
|
|
60
|
+
* mode and covers the viewport in fullscreen, retaining the wide-screen
|
|
61
|
+
* column reservation underneath.
|
|
62
|
+
*
|
|
63
|
+
* Whether the panel is shown, and whether it takes a track, is the
|
|
64
|
+
* occupant's own recorded business — it reports the composition of its
|
|
65
|
+
* expanded and presentation state through `ctx.layout`, and the frame sizes
|
|
66
|
+
* the track and places the resize handle from that. The expand control is
|
|
67
|
+
* not this column's: it is a button in the conversation header. The root
|
|
68
|
+
* occupant decides when to render its Session-bound content.
|
|
69
|
+
*/
|
|
70
|
+
'rightbar': {
|
|
71
|
+
kind: 'single';
|
|
72
|
+
scope: 'root';
|
|
73
|
+
owner: RightbarOwnerProps;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Full-width bottom content below all three columns. Its rendered height
|
|
77
|
+
* reduces the columns' available height; empty content reserves no space.
|
|
78
|
+
* The occupant owns its height, visibility, and controls. It receives no
|
|
79
|
+
* Session binding and remains mounted across main-panel navigation.
|
|
80
|
+
*/
|
|
81
|
+
'shell.bottom': {
|
|
82
|
+
kind: 'single';
|
|
83
|
+
scope: 'root';
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Frame-wide floating layer, above every column and outside their scroll
|
|
87
|
+
* containers. Deliberately generic and unowned by any feature: a badge, a
|
|
88
|
+
* toast stack or a status pill all belong here, and entries order among
|
|
89
|
+
* themselves. The layer itself is click-through — entries opt back into
|
|
90
|
+
* pointer events — so an occupant never blocks the app underneath.
|
|
91
|
+
*
|
|
92
|
+
* This is the additive seat for a frame-wide surface of your own: a fresh
|
|
93
|
+
* `id` is added beside the shipped entries instead of replacing them.
|
|
94
|
+
*/
|
|
95
|
+
'shell.overlay': {
|
|
96
|
+
kind: 'list';
|
|
97
|
+
scope: 'root';
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/** Sidebar owner share: live column state from the frame's concession solve. */
|
|
102
|
+
export interface SidebarOwnerProps {
|
|
103
|
+
/** True when the sidebar is closed (the column renders the compact control rail). */
|
|
104
|
+
collapsed: boolean;
|
|
105
|
+
/** Rendered column width in px (SIDEBAR_COLLAPSED when collapsed). */
|
|
106
|
+
width: number;
|
|
107
|
+
}
|
|
108
|
+
/** Right column owner share: resolved normal geometry and opening eligibility. */
|
|
109
|
+
export interface RightbarOwnerProps {
|
|
110
|
+
/** Resolved normal panel width in px, not the saved preference; zero if it cannot fit. */
|
|
111
|
+
width: number;
|
|
112
|
+
/** Current frame width in px. */
|
|
113
|
+
viewportWidth: number;
|
|
114
|
+
/**
|
|
115
|
+
* Whether a normal right panel can retain 300px beside a 400px center.
|
|
116
|
+
* Before a narrow opening, includes the space from collapsing the left sidebar.
|
|
117
|
+
*/
|
|
118
|
+
canShow: boolean;
|
|
119
|
+
}
|
|
120
|
+
/** Required services (cordis fiber inject — the loader passes all module exports as an object plugin). */
|
|
121
|
+
export declare const inject: string[];
|
|
122
|
+
/**
|
|
123
|
+
* Client plugin body: provide ctx.layout, then one register() call — AppFrame
|
|
124
|
+
* into 'root' with the four child-slot declarations, the layout store seat,
|
|
125
|
+
* and the shared root instance supplying commands and the panel-info source.
|
|
126
|
+
* @param ctx - client root context.
|
|
127
|
+
*/
|
|
128
|
+
export declare function apply(ctx: ClientContext): void;
|
|
129
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LayoutController: the cross-plugin panel-action face behind ctx.layout.
|
|
3
|
+
* Panel geometry and main-panel selection live in the root layout store;
|
|
4
|
+
* the current-session selection lives with the runtime sessions service, and
|
|
5
|
+
* the per-session active view dissolved into ui-conversation's session store
|
|
6
|
+
* (its only consumer). What remains here is the contract other plugins'
|
|
7
|
+
* apply worlds reach for panel transitions (main-panel selection and sidebar toggle,
|
|
8
|
+
* right-panel show/hide from ui-sidebar-right) — writes stay inside the
|
|
9
|
+
* store's declared action set, shared with the root registration.
|
|
10
|
+
*/
|
|
11
|
+
import type { BoundActions, HostObservable } from '@qilin-agent/client-ui-slots';
|
|
12
|
+
import type { Branded } from '@qilin-agent/brand';
|
|
13
|
+
import type { createLayoutStore } from './stores.ts';
|
|
14
|
+
/** Identity shared by a sidebar panel entry and its main-slot occupant. */
|
|
15
|
+
export type MainPanelId = Branded<'MainPanelId'>;
|
|
16
|
+
/** Root-scoped navigation state exposed to panel-aware components. */
|
|
17
|
+
export interface PanelInfo {
|
|
18
|
+
/** Selected global panel; null displays the current Conversation. */
|
|
19
|
+
readonly activePanelId: MainPanelId | null;
|
|
20
|
+
}
|
|
21
|
+
/** The layout store's bound action set (framework-baked, draft params peeled). */
|
|
22
|
+
export type PanelActions = BoundActions<ReturnType<typeof createLayoutStore>>;
|
|
23
|
+
/** Panel navigation and geometry actions exposed through ctx.layout. */
|
|
24
|
+
export interface ILayout {
|
|
25
|
+
/** Selected central panel from the same root store used by `usePanelInfo`. */
|
|
26
|
+
readonly panelInfo: HostObservable<PanelInfo>;
|
|
27
|
+
/**
|
|
28
|
+
* Select a global central panel without changing the current Session.
|
|
29
|
+
* @param panelId - registered main key, or null to show the Conversation.
|
|
30
|
+
* @throws if the selected main key is not registered; preserves the current selection.
|
|
31
|
+
*/
|
|
32
|
+
selectPanel(panelId: MainPanelId | null): void;
|
|
33
|
+
/**
|
|
34
|
+
* Start an asynchronous navigation, superseding any earlier pending navigation.
|
|
35
|
+
* @returns a signal aborted by the next navigation or layout disposal; check it before committing UI state.
|
|
36
|
+
*/
|
|
37
|
+
beginNavigation(): AbortSignal;
|
|
38
|
+
/** Toggle the sidebar panel (closed ⟷ contract default width). */
|
|
39
|
+
toggleSidebar(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Report the right panel's presentation without changing its expanded state.
|
|
42
|
+
* @param track - whether the normal panel width reserves a grid track,
|
|
43
|
+
* including beneath a fullscreen overlay.
|
|
44
|
+
* @param fullscreen - whether the panel covers the frame and hides its outer
|
|
45
|
+
* resize handle; independent of the underlying grid track.
|
|
46
|
+
*/
|
|
47
|
+
openRightbar(track: boolean, fullscreen: boolean): void;
|
|
48
|
+
/** Report the right panel as hidden: no track, no handle. */
|
|
49
|
+
closeRightbar(): void;
|
|
50
|
+
}
|
|
51
|
+
/** Cross-plugin panel-action face (ctx.layout). */
|
|
52
|
+
export declare class LayoutController implements ILayout {
|
|
53
|
+
private readonly panels;
|
|
54
|
+
private readonly hasMainPanel;
|
|
55
|
+
readonly panelInfo: HostObservable<PanelInfo>;
|
|
56
|
+
private navigation;
|
|
57
|
+
/**
|
|
58
|
+
* @param panels - actions of the instance shared with the root entry.
|
|
59
|
+
* @param hasMainPanel - checks the live main-slot registry for a panel id.
|
|
60
|
+
* @param panelInfo - root store's shared central-panel selection source.
|
|
61
|
+
*/
|
|
62
|
+
constructor(panels: PanelActions, hasMainPanel: (id: MainPanelId) => boolean, panelInfo: HostObservable<PanelInfo>);
|
|
63
|
+
/** Select a global panel or return to the Conversation. */
|
|
64
|
+
selectPanel(panelId: MainPanelId | null): void;
|
|
65
|
+
/** @returns the new pending navigation's cancellation signal. */
|
|
66
|
+
beginNavigation(): AbortSignal;
|
|
67
|
+
/** Invalidate pending navigations when the layout owner is unloaded. */
|
|
68
|
+
dispose(): void;
|
|
69
|
+
/** Toggle the sidebar panel (closed ⟷ contract default width). */
|
|
70
|
+
toggleSidebar(): void;
|
|
71
|
+
/** Report the right panel's track and fullscreen presentation. */
|
|
72
|
+
openRightbar(track: boolean, fullscreen: boolean): void;
|
|
73
|
+
/** Report the right panel as hidden: no track, no handle. */
|
|
74
|
+
closeRightbar(): void;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Root-owned frame measurement, panel preferences, and presentation reports.
|
|
3
|
+
* The registration supplies a fresh store and binds its actions to ctx.layout.
|
|
4
|
+
*/
|
|
5
|
+
import { type EngineStoreHandle } from '@qilin-agent/client-store';
|
|
6
|
+
import type { MainPanelId } from './service.ts';
|
|
7
|
+
/**
|
|
8
|
+
* Transient layout preferences. Responsive concessions never rewrite widths;
|
|
9
|
+
* the right panel's expanded state belongs to its occupant.
|
|
10
|
+
*/
|
|
11
|
+
type LayoutState = {
|
|
12
|
+
panelInfo: {
|
|
13
|
+
/** Null selects the Conversation; global panels keep the current Session intact. */
|
|
14
|
+
activePanelId: MainPanelId | null;
|
|
15
|
+
};
|
|
16
|
+
layoutInfo: LayoutInfo;
|
|
17
|
+
};
|
|
18
|
+
type LayoutInfo = {
|
|
19
|
+
sidebar: number;
|
|
20
|
+
/** Last positive frame measurement; window width bootstraps the first render. */
|
|
21
|
+
viewportWidth: number;
|
|
22
|
+
narrowExpanded: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Saved right panel width in px, or null before its first opening. Resizing
|
|
25
|
+
* the frame and closing the panel preserve this preference.
|
|
26
|
+
*/
|
|
27
|
+
rightbar: number | null;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the right panel is drawn at all, in either presentation.
|
|
30
|
+
*
|
|
31
|
+
* Derived chrome, not a source of truth: whether the right surface is
|
|
32
|
+
* expanded is a recorded fact owned by that surface, reported here so the
|
|
33
|
+
* frame can place the panel's resize handle. The occupant reports it; nothing
|
|
34
|
+
* else writes it.
|
|
35
|
+
*/
|
|
36
|
+
rightbarShown: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the normal panel width reserves a grid track, including beneath
|
|
39
|
+
* fullscreen. Reported by the occupant; always false while hidden.
|
|
40
|
+
*/
|
|
41
|
+
rightbarTrack: boolean;
|
|
42
|
+
/** Reported fullscreen presentation; hides the outer resize handle. */
|
|
43
|
+
rightbarFullscreen: boolean;
|
|
44
|
+
/** Suppress transitions for a fullscreen exit until another geometry action. */
|
|
45
|
+
rightbarInstant: boolean;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Annotation twin of the actions literal below (the export needs a declared
|
|
49
|
+
* return type); drift fails assignability at the defineStore call.
|
|
50
|
+
*/
|
|
51
|
+
type LayoutActions = {
|
|
52
|
+
selectPanel: (draft: LayoutState, panelId: MainPanelId | null) => void;
|
|
53
|
+
retainMainPanels: (draft: LayoutState, panelIds: readonly string[]) => void;
|
|
54
|
+
setSidebar: (draft: LayoutState, px: number) => void;
|
|
55
|
+
toggleSidebar: (draft: LayoutState) => void;
|
|
56
|
+
setViewportWidth: (draft: LayoutState, width: number) => void;
|
|
57
|
+
setRightbar: (draft: LayoutState, px: number) => void;
|
|
58
|
+
openRightbar: (draft: LayoutState, track: boolean, fullscreen: boolean) => void;
|
|
59
|
+
closeRightbar: (draft: LayoutState) => void;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Create the layout panel store handle. For the sidebar the preference IS the
|
|
63
|
+
* width, so closing it forgets its drag width — reopening restores the contract
|
|
64
|
+
* default. The right panel initializes at 35% of the frame on first opening
|
|
65
|
+
* and keeps that px preference across resizes and close. Drag writes clamp to
|
|
66
|
+
* the current frame's range. Narrow sidebar toggles change only the expansion
|
|
67
|
+
* override; opening the right panel clears that override.
|
|
68
|
+
* @returns the store handle (spec + type + identity + factory in one).
|
|
69
|
+
*/
|
|
70
|
+
export declare function createLayoutStore(): EngineStoreHandle<LayoutState, LayoutActions>;
|
|
71
|
+
export {};
|
|
72
|
+
//# sourceMappingURL=stores.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global theme DOM applier: projects the resolved ThemeSnapshot onto the
|
|
3
|
+
* document — `html { color-scheme }` for native UA chrome (scrollbars, form
|
|
4
|
+
* controls), `body[data-ds-dark-theme]` for the token palette, the active
|
|
5
|
+
* theme's alias-token overrides as inline CSS variables on body, the content
|
|
6
|
+
* font-size axis (`--qilin-content-font-size`), `html[data-ds-theme-source]` for native-chrome
|
|
7
|
+
* mirroring, and one presenter-owned `meta[name="theme-color"]` for surrounding
|
|
8
|
+
* browser UI. Pure DOM writes, no
|
|
9
|
+
* React involvement; the presenter only ever retracts what it wrote itself,
|
|
10
|
+
* so foreign attributes, metadata, and inline styles survive.
|
|
11
|
+
*/
|
|
12
|
+
import type { ThemeSnapshot } from '@qilin-agent/client-ui-theme/client';
|
|
13
|
+
/** Body attribute selecting the dark base palette in the token stylesheets. */
|
|
14
|
+
export declare const DARK_ATTRIBUTE = "data-ds-dark-theme";
|
|
15
|
+
/**
|
|
16
|
+
* Root attribute publishing the theme source (`light`, `dark`, or `system`)
|
|
17
|
+
* for host shells that mirror it into native window chrome (the Electron
|
|
18
|
+
* preload forwards it to `nativeTheme.themeSource` so macOS vibrancy follows
|
|
19
|
+
* the app theme). `system` only when the preference is `system`; a fixed
|
|
20
|
+
* preference (including registered theme ids) publishes its resolved scheme.
|
|
21
|
+
*/
|
|
22
|
+
export declare const THEME_SOURCE_ATTRIBUTE = "data-ds-theme-source";
|
|
23
|
+
/** Body variable carrying the user's content font size in px. */
|
|
24
|
+
export declare const CONTENT_FONT_SIZE_VARIABLE = "--qilin-content-font-size";
|
|
25
|
+
/** Applies theme snapshots to the document; one instance per plugin fiber. */
|
|
26
|
+
export declare class ThemePresenter {
|
|
27
|
+
/** Token names this presenter wrote in the last apply (its retraction set). */
|
|
28
|
+
private appliedTokens;
|
|
29
|
+
/** The single metadata node this presenter inserts and removes. */
|
|
30
|
+
private readonly themeColorMeta;
|
|
31
|
+
/** Create the presenter-owned metadata node before the first snapshot arrives. */
|
|
32
|
+
constructor();
|
|
33
|
+
/**
|
|
34
|
+
* Project a snapshot onto the document: set root `color-scheme` and the body
|
|
35
|
+
* palette attribute from `active.colorScheme` (never the id — `system` is
|
|
36
|
+
* resolved upstream), publish the content font-size axis, then
|
|
37
|
+
* replace the previously applied token variables with `active.tokens`.
|
|
38
|
+
* Browser theme-color metadata follows the computed body background after
|
|
39
|
+
* those writes, so the rendered palette remains the color authority.
|
|
40
|
+
* @param snapshot - resolved theme snapshot from ctx.theme.
|
|
41
|
+
*/
|
|
42
|
+
apply(snapshot: ThemeSnapshot): void;
|
|
43
|
+
/**
|
|
44
|
+
* Retract root color-scheme, the theme-source attribute, the palette attribute, token variables,
|
|
45
|
+
* the content axes, and the owned metadata node.
|
|
46
|
+
*/
|
|
47
|
+
dispose(): void;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=theme-presenter.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,69 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qilin-agent/client-ui-layout",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"description": "Shell plugin: three-column AppFrame with drag handles, ctx.layout viewing-state service (navigation + panels)",
|
|
4
|
+
"version": "3.1.4",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/kkutysllb/QiLin.git",
|
|
11
|
+
"directory": "packages/client/ui-layout"
|
|
12
|
+
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
15
|
+
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"main": "lib/index.js",
|
|
18
|
+
"types": "lib/types/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./lib/types/index.d.ts",
|
|
22
|
+
"default": "./lib/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./client": {
|
|
25
|
+
"types": "./lib/types/client/index.d.ts",
|
|
26
|
+
"default": "./lib/client.js"
|
|
27
|
+
},
|
|
28
|
+
"./src/*": "./src/*",
|
|
29
|
+
"./package.json": "./package.json"
|
|
30
|
+
},
|
|
31
|
+
"qilin": {
|
|
32
|
+
"client": {
|
|
33
|
+
"inject": [
|
|
34
|
+
"@qilin-agent/client-locale",
|
|
35
|
+
"@qilin-agent/client-shortcuts",
|
|
36
|
+
"@qilin-agent/client-ui-renderer",
|
|
37
|
+
"@qilin-agent/client-ui-session",
|
|
38
|
+
"@qilin-agent/client-ui-theme"
|
|
39
|
+
],
|
|
40
|
+
"platform": "web"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"@qilin-agent/kylin": "~4.0.3"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/react": "~18.3.1",
|
|
49
|
+
"react": "^18.2.0",
|
|
50
|
+
"@qilin-agent/brand": "3.1.4",
|
|
51
|
+
"@qilin-agent/client-locale": "3.1.4",
|
|
52
|
+
"@qilin-agent/client-store": "3.1.4",
|
|
53
|
+
"@qilin-agent/client-ui-session": "3.1.4",
|
|
54
|
+
"@qilin-agent/client-ui-slots": "3.1.4",
|
|
55
|
+
"@qilin-agent/client-ui-renderer": "3.1.4",
|
|
56
|
+
"@qilin-agent/client-ui-theme": "3.1.4",
|
|
57
|
+
"@qilin-agent/client-shortcuts": "3.1.4",
|
|
58
|
+
"@qilin-agent/kylin": "~4.0.3"
|
|
59
|
+
},
|
|
60
|
+
"files": [
|
|
61
|
+
"lib/index.js",
|
|
62
|
+
"lib/client.js",
|
|
63
|
+
"lib/types/**/*.d.ts"
|
|
64
|
+
],
|
|
65
|
+
"scripts": {
|
|
66
|
+
"bundle": "tsdown",
|
|
67
|
+
"watch": "tsdown --watch"
|
|
68
|
+
}
|
|
6
69
|
}
|