@qilin-agent/client-ui-layout 3.1.3 → 3.1.5
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.i18n.yaml +13 -13
- package/lib/client.js +1 -5
- package/lib/types/client/theme-presenter.d.ts +2 -5
- package/package.json +9 -9
package/README.i18n.yaml
CHANGED
|
@@ -5,36 +5,36 @@
|
|
|
5
5
|
/:
|
|
6
6
|
en: d96ec500357f8268
|
|
7
7
|
zh: 57610f377112cbde
|
|
8
|
-
/qilin-client-ui-layout:
|
|
9
|
-
en:
|
|
10
|
-
zh:
|
|
11
|
-
/qilin-client-ui-layout/summary:
|
|
8
|
+
/qilin-agent-client-ui-layout:
|
|
9
|
+
en: 8c7be7212329e5f6
|
|
10
|
+
zh: 472481fde75bb334
|
|
11
|
+
/qilin-agent-client-ui-layout/summary:
|
|
12
12
|
en: 0315d385c20948ac
|
|
13
13
|
zh: b4d31027504adc25
|
|
14
|
-
/qilin-client-ui-layout/table-of-contents:
|
|
14
|
+
/qilin-agent-client-ui-layout/table-of-contents:
|
|
15
15
|
en: d152484eb41ac6b4
|
|
16
16
|
zh: 09388d293f9be9cb
|
|
17
|
-
/qilin-client-ui-layout/use-this-package:
|
|
17
|
+
/qilin-agent-client-ui-layout/use-this-package:
|
|
18
18
|
en: 5a6817200e8ab63e
|
|
19
19
|
zh: 0b10ec37dab8862a
|
|
20
|
-
/qilin-client-ui-layout/use-this-package/theme-presentation:
|
|
20
|
+
/qilin-agent-client-ui-layout/use-this-package/theme-presentation:
|
|
21
21
|
en: 231853ad6bda45b8
|
|
22
22
|
zh: c6d646b94f348774
|
|
23
|
-
/qilin-client-ui-layout/understand-the-implementation:
|
|
23
|
+
/qilin-agent-client-ui-layout/understand-the-implementation:
|
|
24
24
|
en: ef5330bde14749ff
|
|
25
25
|
zh: 8e3f86aefaebb9bd
|
|
26
|
-
/qilin-client-ui-layout/further-exploration:
|
|
26
|
+
/qilin-agent-client-ui-layout/further-exploration:
|
|
27
27
|
en: 3bc37c626de945a7
|
|
28
28
|
zh: 8359c26f2144c7e4
|
|
29
|
-
/qilin-client-ui-layout/model-experience:
|
|
29
|
+
/qilin-agent-client-ui-layout/model-experience:
|
|
30
30
|
en: 9a94a7197da60052
|
|
31
31
|
zh: 369a59ab63d050f1
|
|
32
|
-
/qilin-client-ui-layout/model-experience/kv-cache-effect:
|
|
32
|
+
/qilin-agent-client-ui-layout/model-experience/kv-cache-effect:
|
|
33
33
|
en: ca75c51c89c2c9b0
|
|
34
34
|
zh: de54f3467ef3b9be
|
|
35
|
-
/qilin-client-ui-layout/known-limitations-and-deferred-work:
|
|
35
|
+
/qilin-agent-client-ui-layout/known-limitations-and-deferred-work:
|
|
36
36
|
en: a2a43711814230d3
|
|
37
37
|
zh: c165c8479c913020
|
|
38
|
-
/qilin-client-ui-layout/known-limitations-and-deferred-work/dev-note:
|
|
38
|
+
/qilin-agent-client-ui-layout/known-limitations-and-deferred-work/dev-note:
|
|
39
39
|
en: e67f633dc6fe7773
|
|
40
40
|
zh: 3bb0c20c93f16f98
|
package/lib/client.js
CHANGED
|
@@ -473,8 +473,6 @@ window.__ModuleLoader__.load({
|
|
|
473
473
|
const THEME_SOURCE_ATTRIBUTE = "data-ds-theme-source";
|
|
474
474
|
/** Body variable carrying the user's content font size in px. */
|
|
475
475
|
const CONTENT_FONT_SIZE_VARIABLE = "--qilin-content-font-size";
|
|
476
|
-
/** Body variable carrying the user's content leading adjustment in px. */
|
|
477
|
-
const CONTENT_LEADING_VARIABLE = "--qilin-content-leading";
|
|
478
476
|
/** Applies theme snapshots to the document; one instance per plugin fiber. */
|
|
479
477
|
var ThemePresenter = class {
|
|
480
478
|
/** Token names this presenter wrote in the last apply (its retraction set). */
|
|
@@ -489,7 +487,7 @@ window.__ModuleLoader__.load({
|
|
|
489
487
|
/**
|
|
490
488
|
* Project a snapshot onto the document: set root `color-scheme` and the body
|
|
491
489
|
* palette attribute from `active.colorScheme` (never the id — `system` is
|
|
492
|
-
* resolved upstream), publish the content font-size
|
|
490
|
+
* resolved upstream), publish the content font-size axis, then
|
|
493
491
|
* replace the previously applied token variables with `active.tokens`.
|
|
494
492
|
* Browser theme-color metadata follows the computed body background after
|
|
495
493
|
* those writes, so the rendered palette remains the color authority.
|
|
@@ -503,7 +501,6 @@ window.__ModuleLoader__.load({
|
|
|
503
501
|
if (scheme === "dark") body.setAttribute(DARK_ATTRIBUTE, "");
|
|
504
502
|
else body.removeAttribute(DARK_ATTRIBUTE);
|
|
505
503
|
body.style.setProperty(CONTENT_FONT_SIZE_VARIABLE, `${snapshot.fontSize}px`);
|
|
506
|
-
body.style.setProperty(CONTENT_LEADING_VARIABLE, `${snapshot.leading}px`);
|
|
507
504
|
for (const name of this.appliedTokens) body.style.removeProperty(name);
|
|
508
505
|
this.appliedTokens = [];
|
|
509
506
|
for (const [name, value] of Object.entries(snapshot.active.tokens)) {
|
|
@@ -523,7 +520,6 @@ window.__ModuleLoader__.load({
|
|
|
523
520
|
const body = document.body;
|
|
524
521
|
body.removeAttribute(DARK_ATTRIBUTE);
|
|
525
522
|
body.style.removeProperty(CONTENT_FONT_SIZE_VARIABLE);
|
|
526
|
-
body.style.removeProperty(CONTENT_LEADING_VARIABLE);
|
|
527
523
|
for (const name of this.appliedTokens) body.style.removeProperty(name);
|
|
528
524
|
this.appliedTokens = [];
|
|
529
525
|
this.themeColorMeta.remove();
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* document — `html { color-scheme }` for native UA chrome (scrollbars, form
|
|
4
4
|
* controls), `body[data-ds-dark-theme]` for the token palette, the active
|
|
5
5
|
* theme's alias-token overrides as inline CSS variables on body, the content
|
|
6
|
-
* font-size
|
|
7
|
-
* `--qilin-content-leading`), `html[data-ds-theme-source]` for native-chrome
|
|
6
|
+
* font-size axis (`--qilin-content-font-size`), `html[data-ds-theme-source]` for native-chrome
|
|
8
7
|
* mirroring, and one presenter-owned `meta[name="theme-color"]` for surrounding
|
|
9
8
|
* browser UI. Pure DOM writes, no
|
|
10
9
|
* React involvement; the presenter only ever retracts what it wrote itself,
|
|
@@ -23,8 +22,6 @@ export declare const DARK_ATTRIBUTE = "data-ds-dark-theme";
|
|
|
23
22
|
export declare const THEME_SOURCE_ATTRIBUTE = "data-ds-theme-source";
|
|
24
23
|
/** Body variable carrying the user's content font size in px. */
|
|
25
24
|
export declare const CONTENT_FONT_SIZE_VARIABLE = "--qilin-content-font-size";
|
|
26
|
-
/** Body variable carrying the user's content leading adjustment in px. */
|
|
27
|
-
export declare const CONTENT_LEADING_VARIABLE = "--qilin-content-leading";
|
|
28
25
|
/** Applies theme snapshots to the document; one instance per plugin fiber. */
|
|
29
26
|
export declare class ThemePresenter {
|
|
30
27
|
/** Token names this presenter wrote in the last apply (its retraction set). */
|
|
@@ -36,7 +33,7 @@ export declare class ThemePresenter {
|
|
|
36
33
|
/**
|
|
37
34
|
* Project a snapshot onto the document: set root `color-scheme` and the body
|
|
38
35
|
* palette attribute from `active.colorScheme` (never the id — `system` is
|
|
39
|
-
* resolved upstream), publish the content font-size
|
|
36
|
+
* resolved upstream), publish the content font-size axis, then
|
|
40
37
|
* replace the previously applied token variables with `active.tokens`.
|
|
41
38
|
* Browser theme-color metadata follows the computed body background after
|
|
42
39
|
* those writes, so the rendered palette remains the color authority.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qilin-agent/client-ui-layout",
|
|
3
3
|
"description": "Shell plugin: three-column AppFrame with drag handles, ctx.layout viewing-state service (navigation + panels)",
|
|
4
|
-
"version": "3.1.
|
|
4
|
+
"version": "3.1.5",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/react": "~18.3.1",
|
|
49
49
|
"react": "^18.2.0",
|
|
50
|
-
"@qilin-agent/
|
|
51
|
-
"@qilin-agent/
|
|
52
|
-
"@qilin-agent/client-
|
|
53
|
-
"@qilin-agent/client-
|
|
54
|
-
"@qilin-agent/client-ui-
|
|
55
|
-
"@qilin-agent/client-ui-
|
|
56
|
-
"@qilin-agent/client-ui-theme": "3.1.
|
|
50
|
+
"@qilin-agent/brand": "3.1.5",
|
|
51
|
+
"@qilin-agent/client-locale": "3.1.5",
|
|
52
|
+
"@qilin-agent/client-ui-renderer": "3.1.5",
|
|
53
|
+
"@qilin-agent/client-store": "3.1.5",
|
|
54
|
+
"@qilin-agent/client-ui-session": "3.1.5",
|
|
55
|
+
"@qilin-agent/client-ui-slots": "3.1.5",
|
|
56
|
+
"@qilin-agent/client-ui-theme": "3.1.5",
|
|
57
57
|
"@qilin-agent/kylin": "~4.0.3",
|
|
58
|
-
"@qilin-agent/client-shortcuts": "3.1.
|
|
58
|
+
"@qilin-agent/client-shortcuts": "3.1.5"
|
|
59
59
|
},
|
|
60
60
|
"files": [
|
|
61
61
|
"lib/index.js",
|