@kriya-ai/harness 0.0.0-stage → 0.2.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/README.md +379 -2
- package/SAFETY.md +162 -0
- package/THIRD_PARTY_NOTICES.md +7911 -0
- package/bin/kriya.js +577 -0
- package/bundle/cordis.patch.yml +397 -0
- package/contract/SOURCE.md +15 -0
- package/contract/contract.json +1355 -0
- package/package.json +57 -4
- package/plugins/anchor/index.js +56 -0
- package/plugins/anchor/package.json +13 -0
- package/plugins/approvals/index.js +183 -0
- package/plugins/approvals/package.json +13 -0
- package/plugins/brand/DESIGN.md +112 -0
- package/plugins/brand/client.js +826 -0
- package/plugins/brand/index.js +15 -0
- package/plugins/brand/package.json +25 -0
- package/plugins/brand/src/client.js +823 -0
- package/plugins/browser/index.js +218 -0
- package/plugins/browser/package.json +13 -0
- package/plugins/budget/index.js +108 -0
- package/plugins/budget/package.json +13 -0
- package/plugins/changes/client.js +245 -0
- package/plugins/changes/index.js +75 -0
- package/plugins/changes/package.json +22 -0
- package/plugins/edit/client.js +113 -0
- package/plugins/edit/index.js +58 -0
- package/plugins/edit/package.json +23 -0
- package/plugins/fs-freshness/index.js +28 -0
- package/plugins/fs-freshness/package.json +13 -0
- package/plugins/graph/client.js +178 -0
- package/plugins/graph/index.js +4 -0
- package/plugins/graph/package.json +22 -0
- package/plugins/kriya-handoff/index.js +194 -0
- package/plugins/kriya-handoff/package.json +13 -0
- package/plugins/kriya-tools/index.js +189 -0
- package/plugins/kriya-tools/package.json +13 -0
- package/plugins/loop/index.js +743 -0
- package/plugins/loop/package.json +13 -0
- package/plugins/mirror/index.js +235 -0
- package/plugins/mirror/package.json +13 -0
- package/plugins/overview/client.js +276 -0
- package/plugins/overview/index.js +95 -0
- package/plugins/overview/package.json +22 -0
- package/plugins/preview/client.js +337 -0
- package/plugins/preview/index.js +4 -0
- package/plugins/preview/package.json +22 -0
- package/plugins/progress/client.js +290 -0
- package/plugins/progress/index.js +100 -0
- package/plugins/progress/package.json +22 -0
- package/plugins/projects/client.js +249 -0
- package/plugins/projects/index.js +30 -0
- package/plugins/projects/package.json +24 -0
- package/plugins/rea/index.js +256 -0
- package/plugins/rea/package.json +10 -0
- package/plugins/rea/skill/LICENSE +21 -0
- package/plugins/rea/skill/SKILL.md +360 -0
- package/plugins/rea/skill/references/android-applications.md +36 -0
- package/plugins/rea/skill/references/connection-and-recovery.md +127 -0
- package/plugins/rea/skill/references/evidence-workflows.md +71 -0
- package/plugins/rea/skill/references/javascript-applications.md +218 -0
- package/plugins/rea/skill/references/native-and-artifacts.md +297 -0
- package/plugins/rea/skill/references/runtime-observation.md +78 -0
- package/plugins/remote/index.js +297 -0
- package/plugins/remote/package.json +10 -0
- package/plugins/router/index.js +84 -0
- package/plugins/router/package.json +13 -0
- package/plugins/sessions/client.js +68 -0
- package/plugins/sessions/index.js +79 -0
- package/plugins/sessions/package.json +20 -0
- package/plugins/skills/client.js +504 -0
- package/plugins/skills/index.js +166 -0
- package/plugins/skills/package.json +23 -0
- package/src/api.js +97 -0
- package/src/browser.js +286 -0
- package/src/changes.js +191 -0
- package/src/checkpoints.js +313 -0
- package/src/daemon.js +503 -0
- package/src/doctor.js +137 -0
- package/src/edit/core/anchors.js +102 -0
- package/src/edit/core/audio.js +158 -0
- package/src/edit/core/faces.js +99 -0
- package/src/edit/core/ffmpeg.js +258 -0
- package/src/edit/core/handoff.js +220 -0
- package/src/edit/core/history.js +90 -0
- package/src/edit/core/layout.js +92 -0
- package/src/edit/core/mix.js +115 -0
- package/src/edit/core/ops.js +602 -0
- package/src/edit/core/plan.js +266 -0
- package/src/edit/core/project.d.ts +134 -0
- package/src/edit/core/project.js +307 -0
- package/src/edit/core/reframe.js +125 -0
- package/src/edit/core/solver.js +416 -0
- package/src/edit/core/time.js +110 -0
- package/src/edit/core/tonemap.js +57 -0
- package/src/edit/director/ask.js +120 -0
- package/src/edit/director/gateway.js +16 -0
- package/src/edit/director/revise.js +186 -0
- package/src/edit/engine/capabilities.js +33 -0
- package/src/edit/engine/captions.js +154 -0
- package/src/edit/engine/color.js +269 -0
- package/src/edit/engine/confine.js +67 -0
- package/src/edit/engine/dna.js +148 -0
- package/src/edit/engine/index.js +473 -0
- package/src/edit/engine/loudness.js +43 -0
- package/src/edit/engine/media.js +57 -0
- package/src/edit/engine/motion.js +281 -0
- package/src/edit/engine/packs.js +87 -0
- package/src/edit/engine/probe.js +101 -0
- package/src/edit/engine/receipt.js +123 -0
- package/src/edit/engine/tool.js +101 -0
- package/src/edit/gates/copy.js +113 -0
- package/src/edit/gates/index.js +430 -0
- package/src/edit/gates/picture.js +130 -0
- package/src/edit/gates/sound.js +58 -0
- package/src/edit/gates/speech.js +127 -0
- package/src/edit/gates/text.js +196 -0
- package/src/edit/gates/text.swift +22 -0
- package/src/edit/graph/index.js +139 -0
- package/src/edit/graph/journal.js +69 -0
- package/src/edit/graph/scheduler.js +79 -0
- package/src/edit/host/client.js +58 -0
- package/src/edit/host/deliver.js +119 -0
- package/src/edit/host/jobs.js +84 -0
- package/src/edit/host/main.js +135 -0
- package/src/edit/host/paths.js +11 -0
- package/src/edit/host/projects.js +415 -0
- package/src/edit/host/server.js +391 -0
- package/src/edit/host/taste.js +135 -0
- package/src/edit/host/tavi.js +417 -0
- package/src/edit/host/watch.js +141 -0
- package/src/edit/index/db.js +109 -0
- package/src/edit/index/index.js +236 -0
- package/src/edit/index/layers/faces.js +78 -0
- package/src/edit/index/layers/faces.swift +18 -0
- package/src/edit/index/layers/meta.js +35 -0
- package/src/edit/index/layers/music.js +146 -0
- package/src/edit/index/layers/quality.js +120 -0
- package/src/edit/index/layers/retakes.js +132 -0
- package/src/edit/index/layers/screen.js +99 -0
- package/src/edit/index/layers/shots.js +29 -0
- package/src/edit/index/layers/sound.js +42 -0
- package/src/edit/index/layers/words.js +64 -0
- package/src/edit/index/story.js +248 -0
- package/src/edit/index/views.js +71 -0
- package/src/edit/loop/governor.js +112 -0
- package/src/edit/loop/loop.js +69 -0
- package/src/edit/loop/make.js +115 -0
- package/src/edit/loop/repair.js +97 -0
- package/src/edit/loop/replay.js +32 -0
- package/src/edit/recipes/multicam.js +461 -0
- package/src/edit/recipes/reel.js +202 -0
- package/src/edit/recipes/short-from-long.js +237 -0
- package/src/edit/recipes/tutorial.js +137 -0
- package/src/edit/recipes/youtube.js +155 -0
- package/src/edit/runtime/cli.js +126 -0
- package/src/edit/runtime/doctor.js +122 -0
- package/src/edit/runtime/fetch.js +15 -0
- package/src/edit/runtime/licences.js +88 -0
- package/src/edit/runtime/manifest.js +73 -0
- package/src/edit/runtime/setup.js +252 -0
- package/src/failure.js +69 -0
- package/src/gateway-proxy.js +213 -0
- package/src/intent.js +130 -0
- package/src/launch.js +315 -0
- package/src/live.js +81 -0
- package/src/local-skills.js +284 -0
- package/src/login.js +82 -0
- package/src/loop.js +428 -0
- package/src/modes.js +128 -0
- package/src/overview.js +71 -0
- package/src/paths.js +30 -0
- package/src/profiles.js +92 -0
- package/src/projects.js +104 -0
- package/src/recon.js +244 -0
- package/src/rules.js +139 -0
- package/src/runner.bundle.js +21172 -0
- package/src/sentinel.js +248 -0
- package/src/skill-switches.js +130 -0
- package/src/store.js +58 -0
- package/src/strict.js +124 -0
- package/src/verify.js +659 -0
- package/src/world.js +268 -0
- package/studio/dist/index.html +14 -0
- package/studio/dist/studio.css +163 -0
- package/studio/dist/studio.js +1 -0
|
@@ -0,0 +1,823 @@
|
|
|
1
|
+
// Kriya Harness brand and theme, browser half (DESIGN.md). Source file:
|
|
2
|
+
// scripts/build-brand.js inlines the fonts and writes ../client.js, the
|
|
3
|
+
// module DSH loads. Edit this file, then run `npm run build:brand`.
|
|
4
|
+
//
|
|
5
|
+
// Everything goes through seams DeepSeek Harness offers other identities:
|
|
6
|
+
// theme token overrides (ctx.theme.overrideTokens, light and dark pairs),
|
|
7
|
+
// the brand slots (sidebar mark and name, conversation hero mark) and
|
|
8
|
+
// plugin-owned styles. No DSH file is edited (HD-02).
|
|
9
|
+
window.__ModuleLoader__.load({
|
|
10
|
+
id: "@kriya-ai/harness-brand",
|
|
11
|
+
factory: (require) => {
|
|
12
|
+
const { jsx, jsxs } = require("react/jsx-runtime")
|
|
13
|
+
const { useEffect, useState } = require("react")
|
|
14
|
+
|
|
15
|
+
const PLUGIN = "@kriya-ai/harness-brand"
|
|
16
|
+
const PRODUCT = "Kriya Harness"
|
|
17
|
+
const UPSTREAM = "DeepSeek Harness"
|
|
18
|
+
|
|
19
|
+
/* ───────────────────────────── palette ───────────────────────────── */
|
|
20
|
+
|
|
21
|
+
// Kriya's colours (the Kriya app's globals.css) on DSH's tokens.
|
|
22
|
+
// [light, dark]; DSH picks the pair's half for the active scheme.
|
|
23
|
+
// tint(rgbs)(alpha): a colour at one alpha, or at a [light, dark] pair
|
|
24
|
+
const tint = (rgbs) => (alpha) =>
|
|
25
|
+
rgbs.map((rgb, i) => `rgb(${rgb} / ${Array.isArray(alpha) ? alpha[i] : alpha})`)
|
|
26
|
+
const INK = ["19 41 43", "242 234 223"]
|
|
27
|
+
const ink = tint(INK)
|
|
28
|
+
const TEAL = ["#1F6362", "#6CC0B8"]
|
|
29
|
+
const teal = tint(["31 99 98", "108 192 184"])
|
|
30
|
+
const SAFFRON = ["#B4622F", "#E7A46D"]
|
|
31
|
+
const saffron = tint(["180 98 47", "231 164 109"])
|
|
32
|
+
|
|
33
|
+
const PAPER = ["#F3EEE6", "#0A1213"]
|
|
34
|
+
const SHEET = ["#FBF8F3", "#122021"]
|
|
35
|
+
const SHEET_2 = ["#FFFDF9", "#172A2B"]
|
|
36
|
+
const LOOM = ["#EAE3D7", "#071011"]
|
|
37
|
+
|
|
38
|
+
const FONT_TEXT = `"KH Geist", "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif`
|
|
39
|
+
const FONT_CODE = `"KH JetBrains Mono", "JetBrains Mono", "SF Mono", Consolas, "Liberation Mono", Menlo, monospace`
|
|
40
|
+
const FONT_DISPLAY = `"KH Fraunces", Georgia, "Times New Roman", serif`
|
|
41
|
+
|
|
42
|
+
const TOKENS = {
|
|
43
|
+
// Surfaces
|
|
44
|
+
"--dsw-alias-bg-base": PAPER,
|
|
45
|
+
"--dsw-alias-bg-layer-1": SHEET,
|
|
46
|
+
"--dsw-alias-bg-layer-2": SHEET_2,
|
|
47
|
+
"--dsw-alias-bg-layer-3": ["#FFFFFF", "#1C3132"],
|
|
48
|
+
"--dsw-alias-bg-overlay": SHEET,
|
|
49
|
+
"--dsw-alias-bg-module-platform": ["#EFE9DF", "#0F1C1D"],
|
|
50
|
+
"--dsw-alias-bg-multi-select": ["#EFE9DF", "#0F1C1D"],
|
|
51
|
+
"--dsw-alias-bg-document-preview": LOOM,
|
|
52
|
+
"--dsw-alias-bg-document-selection": teal(0.3),
|
|
53
|
+
"--dsw-alias-bg-skeleton": ink(0.05),
|
|
54
|
+
"--dsw-specific-sidebar-fill": LOOM,
|
|
55
|
+
"--dsw-specific-sidebar-nav-item-hover": ink(0.055),
|
|
56
|
+
"--dsw-specific-sidebar-nav-item-active": ["rgb(255 255 255 / 0.62)", "rgb(242 234 223 / 0.08)"],
|
|
57
|
+
"--dsw-specific-sidebar-nav-item-active-accent": teal(0.14),
|
|
58
|
+
"--dsw-specific-input-major": SHEET_2,
|
|
59
|
+
"--dsw-specific-login-input": SHEET,
|
|
60
|
+
"--dsw-alias-menu-group-header-fill": ["rgb(251 248 243 / 0.95)", "rgb(18 32 33 / 0.95)"],
|
|
61
|
+
"--dsw-specific-selector": ink(0.05),
|
|
62
|
+
"--dsw-specific-tip": ink(0.05),
|
|
63
|
+
// The person's own messages: a teal-dyed sheet
|
|
64
|
+
"--dsw-specific-bubble": teal(0.11),
|
|
65
|
+
"--dsw-specific-bubble-highlight": teal(0.2),
|
|
66
|
+
"--dsw-alias-turn-trigger-bg": ["#EFE9DF", "#0F1C1D"],
|
|
67
|
+
"--dsw-alias-turn-trigger-bg-hover": ink(0.07),
|
|
68
|
+
"--dsw-alias-settings-card-fill": ["rgb(255 255 255 / 0.55)", "rgb(242 234 223 / 0.05)"],
|
|
69
|
+
"--dsw-alias-settings-card-stroke": ink(0.14),
|
|
70
|
+
|
|
71
|
+
// Text
|
|
72
|
+
"--dsw-alias-label-primary": ["#13292B", "#F2EADF"],
|
|
73
|
+
"--dsw-alias-label-primary-dimmed": ["#1C3436", "#E6DED2"],
|
|
74
|
+
"--dsw-alias-label-primary-bluish": ["#174C4B", "#9FD8D1"],
|
|
75
|
+
"--dsw-alias-label-primary-inverted": ["#FBF8F3", "#0A1213"],
|
|
76
|
+
"--dsw-alias-label-primary-foreground": ["#FBF8F3", "#0D1A1B"],
|
|
77
|
+
"--dsw-alias-label-secondary": ["#4C5F60", "#A8B8B5"],
|
|
78
|
+
"--dsw-alias-label-tertiary": ["#56686A", "#8A9B98"],
|
|
79
|
+
"--dsw-alias-label-caption": ["#6C7B7A", "#6F817F"],
|
|
80
|
+
"--dsw-alias-label-dimmed": ["#D8D0C3", "#2A3B3C"],
|
|
81
|
+
"--dsw-alias-label-document-preview": ["#4C5F60", "#A8B8B5"],
|
|
82
|
+
"--dsw-alias-brand-primary": ["#13292B", "#F2EADF"],
|
|
83
|
+
"--dsw-alias-brand-primary-invert": ["#13292B", "#F2EADF"],
|
|
84
|
+
"--dsw-alias-brand-text": ["#13292B", "#F2EADF"],
|
|
85
|
+
"--dsw-alias-link": TEAL,
|
|
86
|
+
"--dsw-alias-menu-icon": ["#2E4446", "#C9D4D1"],
|
|
87
|
+
|
|
88
|
+
// Action: teal replaces DSH's blue everywhere it means "do this"
|
|
89
|
+
"--dsw-alias-state-business-primary": TEAL,
|
|
90
|
+
"--dsw-alias-state-business-tertiary": teal(0.13),
|
|
91
|
+
"--dsw-alias-brand-primary-new-colorprimary-new-color": TEAL,
|
|
92
|
+
"--dsw-alias-button-info-fill": TEAL,
|
|
93
|
+
"--dsw-alias-button-info-hover": ["#2A7A78", "#8FD3CB"],
|
|
94
|
+
"--dsw-alias-onboarding-accent": TEAL,
|
|
95
|
+
"--dsw-alias-button-primary-fill": ["#173A3D", "#F2EADF"],
|
|
96
|
+
"--dsw-alias-button-primary-hover": ["#22504F", "#FFF8EE"],
|
|
97
|
+
"--dsw-alias-button-primary-dimmed": ink(0.08),
|
|
98
|
+
"--dsw-alias-button-contrast-fill": ["#4C5F60", "#A8B8B5"],
|
|
99
|
+
"--dsw-alias-button-elevated-fill": SHEET_2,
|
|
100
|
+
"--dsw-alias-button-floating-fill": SHEET_2,
|
|
101
|
+
"--dsw-alias-button-floating-hover": ["#F2ECE2", "#1C3132"],
|
|
102
|
+
"--dsw-alias-button-ghost-active-fill": ink(0.07),
|
|
103
|
+
"--dsw-alias-button-ghost-active-hover": ink(0.1),
|
|
104
|
+
"--dsw-alias-button-ghost-active-border": ink(0.3),
|
|
105
|
+
"--dsw-alias-interactive-bg-hover": ink(0.05),
|
|
106
|
+
"--dsw-alias-interactive-bg-active": ink(0.09),
|
|
107
|
+
"--dsw-alias-interactive-bg-hover-accent": teal(0.15),
|
|
108
|
+
"--dsw-alias-interactive-bg-hover-solid": ["#ECE6DC", "#172A2B"],
|
|
109
|
+
"--dsw-alias-interactive-bg-hover-danger": ["rgb(194 65 58 / 0.08)", "rgb(240 122 110 / 0.1)"],
|
|
110
|
+
"--dsw-alias-switch-thumb": ["#FFFDF9", "#A8B8B5"],
|
|
111
|
+
|
|
112
|
+
// The agent at work: saffron thread instead of DSH's blue sweep
|
|
113
|
+
"--dsw-alias-label-deep-diving": ["#8F4C1F", "#E7A46D"],
|
|
114
|
+
"--dsw-alias-label-deep-diving-shimmer": ["#E09A62", "#F6D2AE"],
|
|
115
|
+
|
|
116
|
+
// States (Kriya's own; saffron carries warnings)
|
|
117
|
+
"--dsw-alias-state-success-primary": ["#2C8A5F", "#6FD3A0"],
|
|
118
|
+
"--dsw-alias-state-success-secondary": ["#3FA673", "#8BDDB3"],
|
|
119
|
+
"--dsw-alias-state-success-tertiary": ["rgb(44 138 95 / 0.12)", "rgb(111 211 160 / 0.14)"],
|
|
120
|
+
"--dsw-alias-state-error-primary": ["#C2413A", "#F07A6E"],
|
|
121
|
+
"--dsw-alias-state-error-secondary": ["#D9655E", "#F49A90"],
|
|
122
|
+
"--dsw-alias-state-warn-primary": SAFFRON,
|
|
123
|
+
"--dsw-alias-state-warn-secondary": ["#C77A45", "#EDB688"],
|
|
124
|
+
"--dsw-alias-state-warn-tertiary": saffron(0.13),
|
|
125
|
+
"--dsw-alias-state-warn-label": ["#8F4C1F", "#E7A46D"],
|
|
126
|
+
"--dsw-alias-state-idle-primary": ["#CFC6B8", "#3A4B4C"],
|
|
127
|
+
|
|
128
|
+
// Lines
|
|
129
|
+
"--dsw-alias-border-l1": ink(0.06),
|
|
130
|
+
"--dsw-alias-border-l2": ink(0.11),
|
|
131
|
+
"--dsw-alias-border-l2-darkmode-thin": ink(0.11),
|
|
132
|
+
"--dsw-alias-border-l3": ink(0.14),
|
|
133
|
+
"--dsw-alias-border-l4": ink(0.2),
|
|
134
|
+
|
|
135
|
+
// Replies
|
|
136
|
+
"--dsw-alias-markdown-code-block": ["#EDE7DD", "#0E1A1B"],
|
|
137
|
+
"--dsw-alias-markdown-code-block-banner": ["#E6DFD3", "#0B1617"],
|
|
138
|
+
"--dsw-alias-markdown-inline-code": ink(0.065),
|
|
139
|
+
"--dsw-alias-markdown-citation": teal(0.11),
|
|
140
|
+
"--dsw-alias-markdown-tag": ink(0.06),
|
|
141
|
+
"--dsw-alias-markdown-placeholder": ink(0.05),
|
|
142
|
+
"--dsw-alias-markdown-code-segment-selected": SHEET_2,
|
|
143
|
+
"--dsw-alias-markdown-code-segment-unselected": ["#E6DFD3", "#0B1617"],
|
|
144
|
+
|
|
145
|
+
// Small surfaces
|
|
146
|
+
"--dsw-alias-scrollbar-bg-l1": ink(0.16),
|
|
147
|
+
"--dsw-alias-scrollbar-bg-l2": ink(0.16),
|
|
148
|
+
"--dsw-alias-scrollbar-hover-l1": ink(0.28),
|
|
149
|
+
"--dsw-alias-scrollbar-hover-l2": ink(0.28),
|
|
150
|
+
"--dsw-alias-toast-bg": ["#13292B", "#F2EADF"],
|
|
151
|
+
"--dsw-alias-toast-label": ["#FBF8F3", "#0D1A1B"],
|
|
152
|
+
"--dsw-alias-tooltip-bg": ["#13292B", "#22393A"],
|
|
153
|
+
"--dsw-alias-tooltip-key-bg": ["#2A4547", "#34504F"],
|
|
154
|
+
|
|
155
|
+
// The start screen's thread: light on the dark K, dark on the cream K
|
|
156
|
+
"--kh-thread": ["#E7A46D", "#9A5424"],
|
|
157
|
+
|
|
158
|
+
// Glass (DESIGN.md, Material): sheet tinted panes over a lit ground.
|
|
159
|
+
// The ground: paper lit teal from the top left, warm from the bottom right
|
|
160
|
+
"--kh-ground-a": teal([0.12, 0.1]),
|
|
161
|
+
"--kh-ground-b": saffron([0.09, 0.06]),
|
|
162
|
+
// The pool of light the start screen's K sits in
|
|
163
|
+
"--kh-halo": ["rgb(255 255 255 / 0.9)", "rgb(108 192 184 / 0.09)"],
|
|
164
|
+
// Panes: thin for the sidebar, thick where text is typed or read
|
|
165
|
+
"--kh-glass": ["rgb(251 248 243 / 0.55)", "rgb(18 32 33 / 0.5)"],
|
|
166
|
+
"--kh-glass-thick": ["rgb(253 251 247 / 0.76)", "rgb(21 37 38 / 0.74)"],
|
|
167
|
+
"--kh-blur": ["blur(28px) saturate(170%)", "blur(28px) saturate(140%)"],
|
|
168
|
+
// Light caught on a pane's top edge, and its hairline
|
|
169
|
+
"--kh-rim": [
|
|
170
|
+
"inset 0 1px 0 0 rgb(255 255 255 / 0.9), inset 0 0 0 0.5px rgb(19 41 43 / 0.1)",
|
|
171
|
+
"inset 0 1px 0 0 rgb(255 255 255 / 0.075), inset 0 0 0 0.5px rgb(242 234 223 / 0.1)",
|
|
172
|
+
],
|
|
173
|
+
"--kh-edge": ink([0.1, 0.09]),
|
|
174
|
+
// Wells sit below the pane, chips sit on it
|
|
175
|
+
"--kh-well": ink([0.045, 0.05]),
|
|
176
|
+
"--kh-chip": ["rgb(255 255 255 / 0.7)", "rgb(242 234 223 / 0.075)"],
|
|
177
|
+
"--kh-chip-hover": ["rgb(255 255 255 / 0.92)", "rgb(242 234 223 / 0.11)"],
|
|
178
|
+
"--kh-shade": ["rgb(19 41 43 / 0.08)", "rgb(0 0 0 / 0.35)"],
|
|
179
|
+
// Lift: how far a pane floats above the ground
|
|
180
|
+
"--kh-lift": [
|
|
181
|
+
"0 1px 1px rgb(19 41 43 / 0.03), 0 6px 16px -4px rgb(19 41 43 / 0.08), 0 22px 44px -18px rgb(19 41 43 / 0.14)",
|
|
182
|
+
"0 1px 1px rgb(0 0 0 / 0.25), 0 10px 28px -6px rgb(0 0 0 / 0.42), 0 28px 56px -22px rgb(0 0 0 / 0.5)",
|
|
183
|
+
],
|
|
184
|
+
"--kh-lift-high": [
|
|
185
|
+
"0 2px 4px rgb(19 41 43 / 0.04), 0 16px 40px -8px rgb(19 41 43 / 0.16), 0 44px 88px -24px rgb(19 41 43 / 0.2)",
|
|
186
|
+
"0 2px 4px rgb(0 0 0 / 0.3), 0 20px 48px -8px rgb(0 0 0 / 0.55), 0 48px 96px -24px rgb(0 0 0 / 0.6)",
|
|
187
|
+
],
|
|
188
|
+
// Focus: a teal edge and a soft halo; approvals: the same in saffron
|
|
189
|
+
"--kh-focus-edge": teal([0.5, 0.55]),
|
|
190
|
+
"--kh-focus-halo": teal([0.12, 0.14]),
|
|
191
|
+
"--kh-warn-edge": saffron([0.45, 0.4]),
|
|
192
|
+
"--kh-warn-halo": saffron([0.1, 0.1]),
|
|
193
|
+
"--kh-bubble-rim": [
|
|
194
|
+
"inset 0 1px 0 0 rgb(255 255 255 / 0.55), inset 0 0 0 0.5px rgb(31 99 98 / 0.16)",
|
|
195
|
+
"inset 0 1px 0 0 rgb(255 255 255 / 0.06), inset 0 0 0 0.5px rgb(108 192 184 / 0.16)",
|
|
196
|
+
],
|
|
197
|
+
"--kh-press-shadow": teal([0.35, 0.3]),
|
|
198
|
+
|
|
199
|
+
// DSH's own glass and radii, tuned to the panes above
|
|
200
|
+
"--dsw-specific-menu": ["rgb(252 250 246 / 0.8)", "rgb(22 38 39 / 0.8)"],
|
|
201
|
+
"--dsw-menu-backdrop-filter": ["blur(32px) saturate(180%)", "blur(32px) saturate(150%)"],
|
|
202
|
+
"--dsw-alias-bg-mask-1": ["rgb(19 41 43 / 0.16)", "rgb(2 6 7 / 0.55)"],
|
|
203
|
+
"--dsw-mask-blur": ["blur(8px)", "blur(8px)"],
|
|
204
|
+
"--dsw-radius-panel": ["24px", "24px"],
|
|
205
|
+
|
|
206
|
+
// Type. A font chosen in Settings still comes first (DSH puts the
|
|
207
|
+
// person's list ahead of these defaults)
|
|
208
|
+
"--dsh-font-family-text-default": [FONT_TEXT, FONT_TEXT],
|
|
209
|
+
"--dsh-font-family-code-default": [FONT_CODE, FONT_CODE],
|
|
210
|
+
"--dsw-font-family-brand": [FONT_DISPLAY, FONT_DISPLAY],
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/** { token: { light, dark } }, the shape ctx.theme.overrideTokens takes */
|
|
214
|
+
const overrides = () =>
|
|
215
|
+
Object.fromEntries(Object.entries(TOKENS).map(([name, [light, dark]]) => [name, { light, dark }]))
|
|
216
|
+
|
|
217
|
+
/* ─────────────────────────────── mark ────────────────────────────── */
|
|
218
|
+
|
|
219
|
+
// Kriya's mark (components/brand.tsx in the Kriya app): split stem,
|
|
220
|
+
// rising arm, blade leg, and the terracotta leaf where they meet
|
|
221
|
+
const K_PATHS = [
|
|
222
|
+
"M17 13h8.5v17.5L17 39z",
|
|
223
|
+
"M17 44l8.5-8.5V51H17z",
|
|
224
|
+
"M29 31 43 13h9.5L33.5 35z",
|
|
225
|
+
"M30 39.5c9.5 0.5 17 4.5 22 11.5H41.5c-4.5-3.5-8.5-7.2-11.5-11.5z",
|
|
226
|
+
]
|
|
227
|
+
const LEAF = "M33.5 36.5c4.6-3.6 10-4.8 15.5-3.8-4.4 4-9.8 5.3-15.5 3.8z"
|
|
228
|
+
// The K's strokes span x 17–52.5 and y 13–51: its optical centre is
|
|
229
|
+
// (34.75, 32), not the 64-unit tile's (32, 32). Every placement below
|
|
230
|
+
// centres that box, so the mark sits true in the tile and on the start
|
|
231
|
+
// screen (it used to sit 2.2 units right of centre)
|
|
232
|
+
const K_TILE = "translate(4.2 6.4) scale(0.8)"
|
|
233
|
+
|
|
234
|
+
const tileSvg = () =>
|
|
235
|
+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">' +
|
|
236
|
+
'<rect width="64" height="64" rx="18" fill="#1F4F50"/>' +
|
|
237
|
+
`<g transform="${K_TILE}" fill="#FCE6C6">` +
|
|
238
|
+
K_PATHS.map((d) => `<path d="${d}"/>`).join("") +
|
|
239
|
+
`<path d="${LEAF}" fill="#E09A62"/></g></svg>`
|
|
240
|
+
|
|
241
|
+
/** The tile: sidebar and tab icon */
|
|
242
|
+
function KriyaMark({ size = 24, className }) {
|
|
243
|
+
return jsxs("svg", {
|
|
244
|
+
viewBox: "0 0 64 64",
|
|
245
|
+
width: size,
|
|
246
|
+
height: size,
|
|
247
|
+
className,
|
|
248
|
+
role: "img",
|
|
249
|
+
"aria-label": "Kriya",
|
|
250
|
+
children: [
|
|
251
|
+
jsx("rect", { width: 64, height: 64, rx: 18, fill: "#1F4F50" }),
|
|
252
|
+
jsxs("g", {
|
|
253
|
+
transform: K_TILE,
|
|
254
|
+
fill: "#FCE6C6",
|
|
255
|
+
children: [
|
|
256
|
+
...K_PATHS.map((d) => jsx("path", { d }, d)),
|
|
257
|
+
jsx("path", { d: LEAF, fill: "#E09A62" }, "leaf"),
|
|
258
|
+
],
|
|
259
|
+
}),
|
|
260
|
+
],
|
|
261
|
+
})
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
function KriyaName() {
|
|
265
|
+
return jsxs("span", {
|
|
266
|
+
className: "kh-name",
|
|
267
|
+
children: [PRODUCT, jsx("span", { className: "kh-name-beta", children: "beta" })],
|
|
268
|
+
})
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/* ─────────────────────── the start screen (hero) ─────────────────── */
|
|
272
|
+
|
|
273
|
+
// The one memorable thing (DESIGN.md): the K is stitched in saffron
|
|
274
|
+
// thread, then fills in, then the question appears. Once per page load
|
|
275
|
+
let stitchedThisLoad = false
|
|
276
|
+
|
|
277
|
+
function StitchedK() {
|
|
278
|
+
// A remount (new session) shows it finished, not stitching again
|
|
279
|
+
const [animate, setAnimate] = useState(() => {
|
|
280
|
+
const first = !stitchedThisLoad
|
|
281
|
+
stitchedThisLoad = true
|
|
282
|
+
return first
|
|
283
|
+
})
|
|
284
|
+
// Once sewn, drop the animation: DSH moving the hero (a layout change)
|
|
285
|
+
// would otherwise make the browser play it again
|
|
286
|
+
useEffect(() => {
|
|
287
|
+
if (!animate) return
|
|
288
|
+
const done = setTimeout(() => setAnimate(false), 1600)
|
|
289
|
+
return () => clearTimeout(done)
|
|
290
|
+
}, [animate])
|
|
291
|
+
const parts = [...K_PATHS, LEAF]
|
|
292
|
+
return jsxs("svg", {
|
|
293
|
+
className: `kh-stitch${animate ? " kh-stitch-play" : ""}`,
|
|
294
|
+
// 50 × 48 around the K's centre (34.75, 32)
|
|
295
|
+
viewBox: "9.75 8 50 48",
|
|
296
|
+
role: "img",
|
|
297
|
+
"aria-label": "Kriya",
|
|
298
|
+
children: [
|
|
299
|
+
jsx("defs", {
|
|
300
|
+
children: parts.flatMap((d, i) => [
|
|
301
|
+
// Reveals the thread along the stroke, as if sewn in
|
|
302
|
+
jsx(
|
|
303
|
+
"mask",
|
|
304
|
+
{
|
|
305
|
+
id: `kh-reveal-${i}`,
|
|
306
|
+
maskUnits: "userSpaceOnUse",
|
|
307
|
+
children: jsx("path", {
|
|
308
|
+
d,
|
|
309
|
+
className: "kh-reveal",
|
|
310
|
+
style: { animationDelay: `${i * 0.12}s` },
|
|
311
|
+
pathLength: 100,
|
|
312
|
+
}),
|
|
313
|
+
},
|
|
314
|
+
`m${i}`
|
|
315
|
+
),
|
|
316
|
+
// Keeps the thread inside its shape: a topstitch, not an outline
|
|
317
|
+
jsx("clipPath", { id: `kh-inside-${i}`, children: jsx("path", { d }) }, `c${i}`),
|
|
318
|
+
]),
|
|
319
|
+
}),
|
|
320
|
+
// The cloth: the filled K, dyed in after the stitching
|
|
321
|
+
jsxs("g", {
|
|
322
|
+
className: "kh-cloth",
|
|
323
|
+
children: [
|
|
324
|
+
...K_PATHS.map((d) => jsx("path", { d }, `f${d}`)),
|
|
325
|
+
jsx("path", { d: LEAF, className: "kh-leaf" }, "fleaf"),
|
|
326
|
+
],
|
|
327
|
+
}),
|
|
328
|
+
// The thread: a running stitch along every edge
|
|
329
|
+
jsx("g", {
|
|
330
|
+
className: "kh-thread",
|
|
331
|
+
children: parts.map((d, i) =>
|
|
332
|
+
jsx(
|
|
333
|
+
"g",
|
|
334
|
+
{
|
|
335
|
+
clipPath: `url(#kh-inside-${i})`,
|
|
336
|
+
className: i === parts.length - 1 ? "kh-thread-leaf" : undefined,
|
|
337
|
+
// No pathLength here: stitches keep one length on every stroke
|
|
338
|
+
children: jsx("path", { d, mask: `url(#kh-reveal-${i})` }),
|
|
339
|
+
},
|
|
340
|
+
`t${i}`
|
|
341
|
+
)
|
|
342
|
+
),
|
|
343
|
+
}),
|
|
344
|
+
],
|
|
345
|
+
})
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
function KriyaHero() {
|
|
349
|
+
return jsxs("span", {
|
|
350
|
+
className: "kh-hero",
|
|
351
|
+
"data-kriya-hero": "",
|
|
352
|
+
children: [
|
|
353
|
+
jsx(StitchedK, {}),
|
|
354
|
+
jsx("span", { className: "kh-hero-question", children: "What are we working on?" }),
|
|
355
|
+
jsx("span", {
|
|
356
|
+
className: "kh-hero-note",
|
|
357
|
+
children: "Runs in this folder on your computer. Model use counts toward your Kriya plan.",
|
|
358
|
+
}),
|
|
359
|
+
],
|
|
360
|
+
})
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/* ──────────────────────────── the material ───────────────────────── */
|
|
364
|
+
|
|
365
|
+
// Glass over cloth (DESIGN.md, Material). DSH's panes keep their layout
|
|
366
|
+
// and behaviour; these rules only change what they're made of. Every
|
|
367
|
+
// DSH class named here is checked against the pinned DSH
|
|
368
|
+
// (tests/brand.test.js), so a bump that renames one fails a test first.
|
|
369
|
+
// Rules sit under html[data-kh-glass] (set by installStyles): it outranks
|
|
370
|
+
// DSH's single-class rules whatever order the stylesheets load in.
|
|
371
|
+
//
|
|
372
|
+
// A pane's glass is drawn on its ::before, never on the pane: a
|
|
373
|
+
// backdrop-filter on the pane itself would trap DSH's position: fixed
|
|
374
|
+
// children (the collapsed sidebar's buttons) inside it.
|
|
375
|
+
const G = "html[data-kh-glass]"
|
|
376
|
+
const PANES = [
|
|
377
|
+
".hHd-Xa_root:not(.hHd-Xa_collapsed)", // sidebar
|
|
378
|
+
".uV2eYG_card", // composer
|
|
379
|
+
".mna1RW_card", // approval
|
|
380
|
+
".VOzbGW_panel", // settings
|
|
381
|
+
]
|
|
382
|
+
// A plain selector list, not :is(): each pane keeps its own specificity,
|
|
383
|
+
// so a pane's own rule below wins over these shared ones
|
|
384
|
+
const panes = (suffix = "") => PANES.map((pane) => `${G} ${pane}${suffix}`).join(",\n")
|
|
385
|
+
|
|
386
|
+
// Fine grain on the ground, so the glass has something to bend
|
|
387
|
+
const GRAIN =
|
|
388
|
+
"data:image/svg+xml," +
|
|
389
|
+
encodeURIComponent(
|
|
390
|
+
"<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'>" +
|
|
391
|
+
"<filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/>" +
|
|
392
|
+
"<feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 .09 0 0 0 0'/></filter>" +
|
|
393
|
+
"<rect width='100%' height='100%' filter='url(#g)'/></svg>"
|
|
394
|
+
)
|
|
395
|
+
|
|
396
|
+
const GLASS_CSS = `
|
|
397
|
+
${G} body {
|
|
398
|
+
--kh-ease: cubic-bezier(.2, .8, .2, 1);
|
|
399
|
+
-webkit-font-smoothing: antialiased;
|
|
400
|
+
-moz-osx-font-smoothing: grayscale;
|
|
401
|
+
text-rendering: optimizeLegibility;
|
|
402
|
+
}
|
|
403
|
+
/* DSH's elevations, re-declared on every element as DSH does, so all its
|
|
404
|
+
other floating surfaces share the panes' lift */
|
|
405
|
+
${G} body, ${G} body * {
|
|
406
|
+
--dsw-elevation-soft: var(--dsw-elevation-stroke), var(--kh-lift);
|
|
407
|
+
--dsw-elevation-panel: var(--dsw-elevation-stroke), var(--kh-lift);
|
|
408
|
+
--dsw-elevation-prominent: var(--dsw-elevation-stroke), var(--kh-lift-high);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/* ── The ground ── */
|
|
412
|
+
${G} .pI_x6G_frame {
|
|
413
|
+
background-color: var(--dsw-alias-bg-base);
|
|
414
|
+
background-image:
|
|
415
|
+
url("${GRAIN}"),
|
|
416
|
+
radial-gradient(80vmax 60vmax at 30% -10%, var(--kh-ground-a), transparent 62%),
|
|
417
|
+
radial-gradient(70vmax 55vmax at 100% 100%, var(--kh-ground-b), transparent 60%);
|
|
418
|
+
}
|
|
419
|
+
${G} .pI_x6G_frame::before,
|
|
420
|
+
${G} .pI_x6G_sidebarCol,
|
|
421
|
+
${G} .pI_x6G_centerCol,
|
|
422
|
+
${G} .pI_x6G_rightbarCol { background: transparent; }
|
|
423
|
+
|
|
424
|
+
/* ── Panes ── */
|
|
425
|
+
${panes()} {
|
|
426
|
+
position: relative;
|
|
427
|
+
isolation: isolate;
|
|
428
|
+
background: transparent;
|
|
429
|
+
box-shadow: var(--kh-lift);
|
|
430
|
+
transition: box-shadow .24s var(--kh-ease);
|
|
431
|
+
}
|
|
432
|
+
${panes("::before")} {
|
|
433
|
+
content: "";
|
|
434
|
+
position: absolute;
|
|
435
|
+
inset: 0;
|
|
436
|
+
z-index: -1;
|
|
437
|
+
border-radius: inherit;
|
|
438
|
+
pointer-events: none;
|
|
439
|
+
background: var(--kh-pane, var(--kh-glass));
|
|
440
|
+
-webkit-backdrop-filter: var(--kh-blur);
|
|
441
|
+
backdrop-filter: var(--kh-blur);
|
|
442
|
+
box-shadow: var(--kh-rim);
|
|
443
|
+
transition: box-shadow .24s var(--kh-ease);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/* Sidebar: a pane floating on the ground, inset from the window's edges.
|
|
447
|
+
DSH sizes the sidebar inline (it resizes), so only the glass is inset
|
|
448
|
+
and the content padded to sit inside it */
|
|
449
|
+
${G} .hHd-Xa_root:not(.hHd-Xa_collapsed) {
|
|
450
|
+
--dsh-sidebar-inline-padding: 20px;
|
|
451
|
+
padding-top: 16px;
|
|
452
|
+
padding-bottom: 14px;
|
|
453
|
+
box-shadow: none;
|
|
454
|
+
}
|
|
455
|
+
${G} .hHd-Xa_root:not(.hHd-Xa_collapsed)::before {
|
|
456
|
+
inset: 10px 6px 10px 10px;
|
|
457
|
+
border-radius: 22px;
|
|
458
|
+
box-shadow: var(--kh-rim), 0 1px 1px var(--kh-shade), 0 14px 32px -22px var(--kh-shade);
|
|
459
|
+
}
|
|
460
|
+
${G} .hHd-Xa_footArea { background: transparent; }
|
|
461
|
+
/* The list's scroll fade is painted in DSH's solid sidebar colour, which
|
|
462
|
+
would show as a band on glass */
|
|
463
|
+
${G} .bhn1Oq_fade { display: none; }
|
|
464
|
+
${G} .YDXeBa_sessionRow { border-radius: 10px; }
|
|
465
|
+
${G} .YDXeBa_sessionRow.YDXeBa_selected { background: var(--kh-chip); box-shadow: var(--kh-rim); }
|
|
466
|
+
${G} .hHd-Xa_root:not(.hHd-Xa_collapsed) .hHd-Xa_newSession {
|
|
467
|
+
height: 40px;
|
|
468
|
+
border: 0;
|
|
469
|
+
border-radius: 14px;
|
|
470
|
+
background: var(--kh-chip);
|
|
471
|
+
box-shadow: var(--kh-rim), 0 1px 2px var(--kh-shade), 0 6px 14px -8px var(--kh-shade);
|
|
472
|
+
transition: background-color .18s var(--kh-ease), transform .18s var(--kh-ease);
|
|
473
|
+
}
|
|
474
|
+
${G} .hHd-Xa_root:not(.hHd-Xa_collapsed) .hHd-Xa_newSession:hover { background: var(--kh-chip-hover); }
|
|
475
|
+
${G} .hHd-Xa_root:not(.hHd-Xa_collapsed) .hHd-Xa_newSession svg { color: var(--dsw-alias-link); }
|
|
476
|
+
${G} .hHd-Xa_panelRow { border-radius: 10px; transition: background-color .16s var(--kh-ease); }
|
|
477
|
+
|
|
478
|
+
/* Composer: the thickest pane, where the person types; it lights teal
|
|
479
|
+
while it has focus */
|
|
480
|
+
${G} .uV2eYG_card { --kh-pane: var(--kh-glass-thick); }
|
|
481
|
+
${G} .uV2eYG_card:focus-within { box-shadow: 0 0 0 4px var(--kh-focus-halo), var(--kh-lift); }
|
|
482
|
+
${G} .uV2eYG_card:focus-within::before { box-shadow: var(--kh-rim), inset 0 0 0 1px var(--kh-focus-edge); }
|
|
483
|
+
${G} .uV2eYG_primary {
|
|
484
|
+
color: var(--dsw-alias-label-primary-foreground);
|
|
485
|
+
box-shadow: inset 0 1px 0 rgb(255 255 255 / .28), inset 0 -1px 0 rgb(0 0 0 / .14), 0 6px 14px -5px var(--kh-press-shadow);
|
|
486
|
+
transition: background-color .18s var(--kh-ease), transform .18s var(--kh-ease), box-shadow .18s var(--kh-ease);
|
|
487
|
+
}
|
|
488
|
+
${G} .uV2eYG_primary:active:not(:disabled) { transform: translateY(-2px) scale(.93); }
|
|
489
|
+
${G} .uV2eYG_primary:disabled {
|
|
490
|
+
opacity: 1;
|
|
491
|
+
color: var(--dsw-alias-label-tertiary);
|
|
492
|
+
background: var(--kh-well);
|
|
493
|
+
box-shadow: inset 0 0 0 .5px var(--kh-edge);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/* Approval: the same pane, edged in saffron while it waits */
|
|
497
|
+
${G} .mna1RW_card {
|
|
498
|
+
--kh-pane: var(--kh-glass-thick);
|
|
499
|
+
border-color: var(--kh-warn-edge);
|
|
500
|
+
box-shadow: 0 0 0 4px var(--kh-warn-halo), var(--kh-lift);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/* Settings: a pane over a blurred scrim, its sections on a quiet well */
|
|
504
|
+
${G} .VOzbGW_panel { --kh-pane: var(--kh-glass-thick); box-shadow: var(--kh-lift-high); }
|
|
505
|
+
${G} .VOzbGW_nav { background: var(--kh-well); box-shadow: inset -0.5px 0 0 var(--kh-edge); }
|
|
506
|
+
${G} .VOzbGW_navTitle {
|
|
507
|
+
font-family: var(--dsw-font-family-brand);
|
|
508
|
+
font-size: 22px;
|
|
509
|
+
line-height: 28px;
|
|
510
|
+
font-weight: 440;
|
|
511
|
+
font-variation-settings: "opsz" 48, "SOFT" 60;
|
|
512
|
+
letter-spacing: -0.016em;
|
|
513
|
+
}
|
|
514
|
+
${G} .VOzbGW_navCell { border-radius: 10px; transition: background-color .16s var(--kh-ease); }
|
|
515
|
+
${G} .VOzbGW_navCell.VOzbGW_active {
|
|
516
|
+
font-weight: 500;
|
|
517
|
+
background: var(--kh-chip);
|
|
518
|
+
box-shadow: var(--kh-rim), 0 1px 2px var(--kh-shade);
|
|
519
|
+
}
|
|
520
|
+
${G} .VOzbGW_navCell.VOzbGW_active svg { color: var(--dsw-alias-link); }
|
|
521
|
+
${G} .VOzbGW_close { border-radius: 999px; }
|
|
522
|
+
|
|
523
|
+
/* ── The conversation ── */
|
|
524
|
+
${G} .wSkVaW_crumbCurrent { font-weight: 560; letter-spacing: -0.011em; }
|
|
525
|
+
/* Chat and Trajectory: a segmented control instead of underlines */
|
|
526
|
+
${G} .wSkVaW_viewTabs {
|
|
527
|
+
display: flex;
|
|
528
|
+
gap: 2px;
|
|
529
|
+
padding: 3px;
|
|
530
|
+
border-radius: 12px;
|
|
531
|
+
background: var(--kh-well);
|
|
532
|
+
box-shadow: inset 0 0 0 .5px var(--kh-edge);
|
|
533
|
+
}
|
|
534
|
+
${G} .wSkVaW_tab {
|
|
535
|
+
min-height: 26px;
|
|
536
|
+
padding: 0 12px;
|
|
537
|
+
border-radius: 9px;
|
|
538
|
+
color: var(--dsw-alias-label-secondary);
|
|
539
|
+
transition: color .16s var(--kh-ease), background-color .16s var(--kh-ease);
|
|
540
|
+
}
|
|
541
|
+
${G} .wSkVaW_tab:hover { color: var(--dsw-alias-label-primary); }
|
|
542
|
+
${G} .wSkVaW_tab::after { display: none; }
|
|
543
|
+
${G} .wSkVaW_tabActive {
|
|
544
|
+
color: var(--dsw-alias-label-primary);
|
|
545
|
+
background: var(--kh-chip);
|
|
546
|
+
box-shadow: var(--kh-rim), 0 1px 2px var(--kh-shade);
|
|
547
|
+
}
|
|
548
|
+
/* The person's message: a teal-dyed pane, its corner turned toward them */
|
|
549
|
+
${G} .Sixlwa_bubble {
|
|
550
|
+
border-radius: 20px 20px 6px 20px;
|
|
551
|
+
box-shadow: var(--kh-bubble-rim);
|
|
552
|
+
}
|
|
553
|
+
${G} .xzv4MW_timeStart { font-variant-numeric: tabular-nums; }
|
|
554
|
+
|
|
555
|
+
/* Settings → General's Language row: Kriya Harness has one language (see
|
|
556
|
+
speakKriya), so there's nothing to choose */
|
|
557
|
+
${G} .hVGvvW_row { display: none; }
|
|
558
|
+
|
|
559
|
+
/* The agent at work: a running stitch in saffron thread instead of
|
|
560
|
+
DeepSeek's whale */
|
|
561
|
+
${G} .EvIC1a_runningWhaleAnimated,
|
|
562
|
+
${G} .EvIC1a_runningWhaleStill { display: none !important; }
|
|
563
|
+
${G} .EvIC1a_runningIcon::before {
|
|
564
|
+
content: "";
|
|
565
|
+
position: absolute;
|
|
566
|
+
inset: calc(50% - 1px) 0;
|
|
567
|
+
border-radius: 1px;
|
|
568
|
+
background: repeating-linear-gradient(90deg, currentColor 0 3px, transparent 3px 5.5px);
|
|
569
|
+
-webkit-mask: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
|
|
570
|
+
mask: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/* ── The start screen ── */
|
|
574
|
+
${G} .kh-hero::before {
|
|
575
|
+
content: "";
|
|
576
|
+
position: absolute;
|
|
577
|
+
z-index: -1;
|
|
578
|
+
top: -56px;
|
|
579
|
+
left: 50%;
|
|
580
|
+
width: min(440px, 100%);
|
|
581
|
+
height: 260px;
|
|
582
|
+
transform: translateX(-50%);
|
|
583
|
+
pointer-events: none;
|
|
584
|
+
background: radial-gradient(closest-side, var(--kh-halo), transparent);
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
588
|
+
${G} .EvIC1a_runningIcon::before { animation: kh-running 0.7s linear infinite; }
|
|
589
|
+
${G} .hHd-Xa_root:not(.hHd-Xa_collapsed) .hHd-Xa_newSession:active { transform: scale(.985); }
|
|
590
|
+
}
|
|
591
|
+
@keyframes kh-running { to { background-position: 5.5px 0; } }
|
|
592
|
+
|
|
593
|
+
/* Solid panes where transparency is turned down or glass isn't drawn */
|
|
594
|
+
@media (prefers-reduced-transparency: reduce) {
|
|
595
|
+
${G} body {
|
|
596
|
+
--kh-glass: var(--dsw-alias-bg-layer-1) !important;
|
|
597
|
+
--kh-glass-thick: var(--dsw-alias-bg-layer-2) !important;
|
|
598
|
+
--kh-blur: none !important;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
|
|
602
|
+
${G} body {
|
|
603
|
+
--kh-glass: var(--dsw-alias-bg-layer-1) !important;
|
|
604
|
+
--kh-glass-thick: var(--dsw-alias-bg-layer-2) !important;
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
@media (prefers-contrast: more) {
|
|
608
|
+
${G} body { --kh-edge: var(--dsw-alias-border-l4) !important; }
|
|
609
|
+
${panes("::before")} { box-shadow: inset 0 0 0 1px var(--dsw-alias-border-l4); }
|
|
610
|
+
}
|
|
611
|
+
`
|
|
612
|
+
|
|
613
|
+
/* ────────────────────────────── styles ───────────────────────────── */
|
|
614
|
+
|
|
615
|
+
const CSS = `
|
|
616
|
+
__KRIYA_FONT_FACES__
|
|
617
|
+
|
|
618
|
+
.kh-name {
|
|
619
|
+
font-family: var(--dsw-font-family-brand);
|
|
620
|
+
font-size: 16px;
|
|
621
|
+
font-weight: 560;
|
|
622
|
+
font-variation-settings: "opsz" 24, "SOFT" 50;
|
|
623
|
+
letter-spacing: -0.012em;
|
|
624
|
+
white-space: nowrap;
|
|
625
|
+
color: var(--dsw-alias-label-primary);
|
|
626
|
+
}
|
|
627
|
+
.kh-name-beta {
|
|
628
|
+
margin-left: 0.45em;
|
|
629
|
+
padding: 1px 6px 2px;
|
|
630
|
+
border-radius: 999px;
|
|
631
|
+
corner-shape: round;
|
|
632
|
+
font-family: var(--dsw-font-family);
|
|
633
|
+
font-size: 11px;
|
|
634
|
+
font-weight: 500;
|
|
635
|
+
letter-spacing: 0.01em;
|
|
636
|
+
vertical-align: 2px;
|
|
637
|
+
color: var(--dsw-alias-state-warn-label);
|
|
638
|
+
background: var(--dsw-alias-state-warn-tertiary);
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
/* The hero replaces DSH's headline and badge: they are the next sibling of
|
|
642
|
+
the span holding the mark slot (tests/brand.test.js pins that structure) */
|
|
643
|
+
span:has(.kh-hero) + span { display: none !important; }
|
|
644
|
+
/* DSH sizes the mark's box to its content and never shrinks it; the hero
|
|
645
|
+
must fit the column instead, down to phone width */
|
|
646
|
+
span:has(> div > .kh-hero) { flex: 1 1 auto; min-width: 0; max-width: 100%; }
|
|
647
|
+
.kh-hero {
|
|
648
|
+
position: relative;
|
|
649
|
+
isolation: isolate;
|
|
650
|
+
display: flex;
|
|
651
|
+
flex-direction: column;
|
|
652
|
+
align-items: center;
|
|
653
|
+
gap: 14px;
|
|
654
|
+
max-width: 100%;
|
|
655
|
+
text-align: center;
|
|
656
|
+
}
|
|
657
|
+
.kh-stitch {
|
|
658
|
+
width: 76px;
|
|
659
|
+
height: 76px;
|
|
660
|
+
overflow: visible;
|
|
661
|
+
}
|
|
662
|
+
.kh-cloth path { fill: var(--dsw-alias-label-primary); }
|
|
663
|
+
.kh-cloth .kh-leaf { fill: #E09A62; }
|
|
664
|
+
/* Drawn twice as wide as it shows: the clip keeps the inner half, so the
|
|
665
|
+
stitches sit just inside each edge */
|
|
666
|
+
.kh-thread path {
|
|
667
|
+
fill: none;
|
|
668
|
+
stroke: var(--kh-thread, #E7A46D);
|
|
669
|
+
stroke-width: 1.5;
|
|
670
|
+
stroke-linecap: round;
|
|
671
|
+
stroke-dasharray: 1.5 1.15;
|
|
672
|
+
}
|
|
673
|
+
.kh-thread-leaf path { stroke: #8A4A21; }
|
|
674
|
+
.kh-reveal {
|
|
675
|
+
fill: none;
|
|
676
|
+
stroke: #fff;
|
|
677
|
+
stroke-width: 4;
|
|
678
|
+
stroke-dasharray: 100;
|
|
679
|
+
stroke-dashoffset: 0;
|
|
680
|
+
}
|
|
681
|
+
.kh-hero-question {
|
|
682
|
+
font-family: var(--dsw-font-family-brand);
|
|
683
|
+
font-size: 34px;
|
|
684
|
+
line-height: 40px;
|
|
685
|
+
font-weight: 380;
|
|
686
|
+
font-variation-settings: "opsz" 96, "SOFT" 100;
|
|
687
|
+
letter-spacing: -0.018em;
|
|
688
|
+
color: var(--dsw-alias-label-primary);
|
|
689
|
+
text-wrap: balance;
|
|
690
|
+
}
|
|
691
|
+
.kh-hero-note {
|
|
692
|
+
max-width: min(46ch, 100%);
|
|
693
|
+
font-size: 13px;
|
|
694
|
+
line-height: 20px;
|
|
695
|
+
color: var(--dsw-alias-label-tertiary);
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
699
|
+
.kh-stitch-play .kh-reveal { animation: kh-sew 0.8s cubic-bezier(.55, .1, .35, 1) both; }
|
|
700
|
+
.kh-stitch-play .kh-cloth { animation: kh-dye 0.45s ease-out 0.75s both; }
|
|
701
|
+
.kh-stitch-play ~ .kh-hero-question { animation: kh-rise 0.45s ease-out 0.9s both; }
|
|
702
|
+
.kh-stitch-play ~ .kh-hero-note { animation: kh-rise 0.45s ease-out 1s both; }
|
|
703
|
+
}
|
|
704
|
+
@keyframes kh-sew { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
|
|
705
|
+
@keyframes kh-dye { from { opacity: 0; } to { opacity: 1; } }
|
|
706
|
+
@keyframes kh-rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
|
|
707
|
+
|
|
708
|
+
::selection { background: var(--dsw-alias-bg-document-selection); }
|
|
709
|
+
@media (max-width: 520px) {
|
|
710
|
+
.kh-hero-question { font-size: 28px; line-height: 34px; }
|
|
711
|
+
.kh-stitch { width: 64px; height: 64px; }
|
|
712
|
+
}
|
|
713
|
+
${GLASS_CSS}
|
|
714
|
+
`
|
|
715
|
+
|
|
716
|
+
function installStyles() {
|
|
717
|
+
const tag = document.createElement("style")
|
|
718
|
+
tag.dataset.plugin = PLUGIN
|
|
719
|
+
tag.textContent = CSS
|
|
720
|
+
document.head.appendChild(tag)
|
|
721
|
+
document.documentElement.dataset.khGlass = ""
|
|
722
|
+
return () => {
|
|
723
|
+
tag.remove()
|
|
724
|
+
delete document.documentElement.dataset.khGlass
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
/* ─────────────────────────── title and icon ──────────────────────── */
|
|
729
|
+
|
|
730
|
+
/** "<session> — DeepSeek Harness" → "<session> — Kriya Harness"; unchanged otherwise. */
|
|
731
|
+
function kriyaTitle(title) {
|
|
732
|
+
return title.endsWith(UPSTREAM) ? title.slice(0, -UPSTREAM.length) + PRODUCT : title
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
function keepTitleAndIcon() {
|
|
736
|
+
const icon = `data:image/svg+xml,${encodeURIComponent(tileSvg())}`
|
|
737
|
+
for (const link of document.querySelectorAll('link[rel~="icon"]')) link.href = icon
|
|
738
|
+
const fix = () => {
|
|
739
|
+
const next = kriyaTitle(document.title)
|
|
740
|
+
if (next !== document.title) document.title = next
|
|
741
|
+
}
|
|
742
|
+
fix()
|
|
743
|
+
// DSH's layout rewrites <title> per session
|
|
744
|
+
const observer = new MutationObserver(fix)
|
|
745
|
+
observer.observe(document.head, { subtree: true, childList: true, characterData: true })
|
|
746
|
+
return () => observer.disconnect()
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/* ──────────────────────────── the language ───────────────────────── */
|
|
750
|
+
|
|
751
|
+
// Kriya Harness speaks one language: Kriya's English for India, a
|
|
752
|
+
// language pack (DSH's documented seam) that falls back to DSH's English
|
|
753
|
+
// for every key, with Kriya's own words where DSH speaks of itself or of
|
|
754
|
+
// DeepSeek. It is the only language: DSH's 中文 can't be chosen (the
|
|
755
|
+
// Language row is hidden while there's one language) and a stored or
|
|
756
|
+
// browser-derived choice of another switches back.
|
|
757
|
+
const LOCALE = "en-IN"
|
|
758
|
+
const SESSION_IN_USE =
|
|
759
|
+
"This session is already open in another Kriya Harness window or process. Close the other one and try again."
|
|
760
|
+
const COPY = {
|
|
761
|
+
common: { "brand.localBuild": "Kriya Harness local build" },
|
|
762
|
+
"settings.agentPreset": {
|
|
763
|
+
sectionIntro: "Choose the agent’s tools and how it works. Standard mode suits everyday tasks.",
|
|
764
|
+
},
|
|
765
|
+
chat: {
|
|
766
|
+
"message.failure.accountSignedOut": "Stopped because this computer was signed out of Kriya.",
|
|
767
|
+
"message.failure.interrupted":
|
|
768
|
+
"Kriya Harness exited before this turn finished (for example, it was killed, crashed, or timed out while shutting down), so the turn was closed when it restarted. Unfinished tool calls have unknown outcomes.",
|
|
769
|
+
"message.failure.accountSignInRequired": "Sign this computer in to Kriya (kriya login) and try again.",
|
|
770
|
+
},
|
|
771
|
+
conversation: { "error.sessionInUse": SESSION_IN_USE },
|
|
772
|
+
model: { "error.sessionInUse": SESSION_IN_USE, "provider.account": "Kriya" },
|
|
773
|
+
"settings.models": {
|
|
774
|
+
deepSeekAccount: "Kriya",
|
|
775
|
+
onboardingDescription: "Sign this computer in to Kriya (kriya login) to start building.",
|
|
776
|
+
},
|
|
777
|
+
sidebarOffice: {
|
|
778
|
+
unavailable:
|
|
779
|
+
"Office previews are unavailable. Enable the document preview service on the computer running Kriya Harness.",
|
|
780
|
+
},
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
function speakKriya(locale) {
|
|
784
|
+
const disposers = [locale.addLanguage({ id: LOCALE, label: "English", fallback: "en" })]
|
|
785
|
+
for (const [ns, dict] of Object.entries(COPY)) disposers.push(locale.register(ns, LOCALE, dict))
|
|
786
|
+
const keep = () => {
|
|
787
|
+
if (locale.getSnapshot().active !== LOCALE) locale.setLocale(LOCALE)
|
|
788
|
+
}
|
|
789
|
+
keep()
|
|
790
|
+
// The Host's stored preference arrives after activation and replaces
|
|
791
|
+
// the active locale live
|
|
792
|
+
disposers.push(locale.subscribe(keep))
|
|
793
|
+
return () => {
|
|
794
|
+
for (const dispose of disposers.reverse()) dispose()
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/* ─────────────────────────────── apply ───────────────────────────── */
|
|
799
|
+
|
|
800
|
+
const inject = ["slots", "theme", "locale"]
|
|
801
|
+
|
|
802
|
+
function apply(ctx) {
|
|
803
|
+
if (typeof document !== "undefined") {
|
|
804
|
+
ctx.effect(installStyles, "kriya: styles and fonts")
|
|
805
|
+
ctx.effect(keepTitleAndIcon, "kriya: title and icon")
|
|
806
|
+
}
|
|
807
|
+
ctx.effect(() => ctx.theme.overrideTokens(PLUGIN, overrides()), "kriya: theme tokens")
|
|
808
|
+
ctx.effect(() => speakKriya(ctx.locale), "kriya: language")
|
|
809
|
+
// One declaration-aware set, as dsh-client-ui-brand-official registers its own
|
|
810
|
+
ctx.slots.inject("sidebar.brand.mark", () =>
|
|
811
|
+
ctx.slots.inject("sidebar.brand.name", function* () {
|
|
812
|
+
yield ctx.slots.register({ name: "sidebar.brand.mark" }, KriyaMark)
|
|
813
|
+
yield ctx.slots.register({ name: "sidebar.brand.name" }, KriyaName)
|
|
814
|
+
})
|
|
815
|
+
)
|
|
816
|
+
ctx.slots.inject("conversation.hero.brand.mark", function* () {
|
|
817
|
+
yield ctx.slots.register({ name: "conversation.hero.brand.mark" }, KriyaHero)
|
|
818
|
+
})
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
return { apply, inject, kriyaTitle, TOKENS, CSS, COPY, LOCALE }
|
|
822
|
+
},
|
|
823
|
+
})
|