@ash-qw/dsh-theme-prts 0.1.91 → 0.1.93
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/CHANGELOG.md +31 -0
- package/README.en.md +23 -35
- package/README.md +23 -37
- package/lib/client.js +1018 -50
- package/package.json +15 -3
- package/src/client/conversation-scale-adapter.js +77 -0
- package/src/client/index.js +18 -3
- package/src/client/operations-shell-v2.js +214 -16
- package/src/client/particle-field-adapter.js +89 -9
- package/src/client/preferences.js +24 -5
- package/src/client/theme-controller-v2.js +609 -16
- package/src/client/theme-settings-workbench.js +69 -2
- package/src/styles/prts.css +362 -5
- package/src/styles/theme-settings-workbench.css +17 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CONVERSATION_SCALE_FOCUS_CONTRAST_DEFAULT, CONVERSATION_SCALE_FOCUS_CONTRAST_MAX, CONVERSATION_SCALE_FOCUS_CONTRAST_MIN, CONVERSATION_SCALE_FOCUS_CONTRAST_STEP, resolveParticleDetail } from './preferences.js'
|
|
1
|
+
import { CONVERSATION_SCALE_FOCUS_CONTRAST_DEFAULT, CONVERSATION_SCALE_FOCUS_CONTRAST_MAX, CONVERSATION_SCALE_FOCUS_CONTRAST_MIN, CONVERSATION_SCALE_FOCUS_CONTRAST_STEP, PARTICLE_TRAVERSAL_SPEED_DEFAULT, PARTICLE_TRAVERSAL_SPEED_MAX, PARTICLE_TRAVERSAL_SPEED_MIN, PARTICLE_TRAVERSAL_SPEED_STEP, resolveParticleDetail } from './preferences.js'
|
|
2
2
|
import { resolveConversationScaleLengths } from './conversation-scale-adapter.js'
|
|
3
3
|
|
|
4
4
|
const SETTINGS_FOCUSABLE = [
|
|
@@ -16,6 +16,7 @@ const PRESET_OPTIONS = [
|
|
|
16
16
|
]
|
|
17
17
|
|
|
18
18
|
const COMMON_CONTROLS = [
|
|
19
|
+
['railDefaultHidden', '默认隐藏导航栏', [['false', '关闭'], ['true', '开启']]],
|
|
19
20
|
['texture', '环境底纹', [['off', '关闭'], ['restrained', '克制'], ['full', '完整']]],
|
|
20
21
|
['glass', '玻璃材质', [['off', '关闭'], ['soft', '柔和'], ['standard', '标准'], ['clear', '清晰']]],
|
|
21
22
|
['motion', '动态效果', [['system', '跟随系统'], ['reduced', '减少']]],
|
|
@@ -32,6 +33,8 @@ function settingButtons(key, label, options) {
|
|
|
32
33
|
? '<small data-prts-setting-note data-prts-transparency-status hidden>系统当前要求降低透明度</small>'
|
|
33
34
|
: key === 'motion'
|
|
34
35
|
? '<small data-prts-setting-note data-prts-effective-motion hidden>系统当前要求减少动态</small>'
|
|
36
|
+
: key === 'railDefaultHidden'
|
|
37
|
+
? '<small data-prts-setting-note>在任意窗口宽度下默认收起 P.R.T.S. 导航,可从左侧按钮临时展开</small>'
|
|
35
38
|
: ''
|
|
36
39
|
const sample = value => key === 'texture' || key === 'glass'
|
|
37
40
|
? `<i data-prts-option-sample="${key}" data-prts-option-sample-value="${value}" aria-hidden="true"></i>`
|
|
@@ -102,6 +105,10 @@ export function themeSettingsMarkup() {
|
|
|
102
105
|
<section data-prts-particle-detail>
|
|
103
106
|
<header><strong>粒子精度</strong><span>同时调整会话与新会话徽记</span></header>
|
|
104
107
|
<div role="radiogroup" aria-label="粒子精度">${particleMarkup()}</div>
|
|
108
|
+
<label data-prts-setting-row="particleTraversalSpeed" data-prts-setting-range-row data-prts-particle-traversal>
|
|
109
|
+
<span><strong>跟随移动速度</strong><small>控制普通会话徽记移动及破碎重组的滚动距离</small></span>
|
|
110
|
+
<div><input type="range" min="0" max="2" step="0.25" value="1" data-prts-setting-range data-prts-setting-key="particleTraversalSpeed" aria-label="粒子徽记跟随移动速度"><output data-prts-particle-traversal-output>1× · 每 1 个视口重组</output></div>
|
|
111
|
+
</label>
|
|
105
112
|
<span data-prts-particle-error role="alert" hidden>粒子资源加载异常,主题已使用静态后备效果</span>
|
|
106
113
|
</section>
|
|
107
114
|
<section data-prts-scale-adjustment>
|
|
@@ -150,6 +157,7 @@ export function createThemeSettingsOverlay({
|
|
|
150
157
|
backdrop,
|
|
151
158
|
onOpen = () => {},
|
|
152
159
|
onPreferenceChange = () => {},
|
|
160
|
+
onPreferencePreview = () => {},
|
|
153
161
|
onResetVisual = () => {},
|
|
154
162
|
onRetrySave = () => {},
|
|
155
163
|
getConversationScalePreview = () => ({ visible: false, reason: 'unmeasured', mode: 'hidden' }),
|
|
@@ -167,6 +175,8 @@ export function createThemeSettingsOverlay({
|
|
|
167
175
|
let scaleDistanceDirty = false
|
|
168
176
|
let scaleFocusContrastDraft
|
|
169
177
|
let scaleFocusContrastDirty = false
|
|
178
|
+
let particleTraversalSpeedDraft
|
|
179
|
+
let particleTraversalSpeedDirty = false
|
|
170
180
|
let calibrationResizeObserver
|
|
171
181
|
let calibrationSettleTimer
|
|
172
182
|
let calibrationFrame
|
|
@@ -222,6 +232,7 @@ export function createThemeSettingsOverlay({
|
|
|
222
232
|
if (!value) {
|
|
223
233
|
commitScaleDistance()
|
|
224
234
|
commitScaleFocusContrast()
|
|
235
|
+
commitParticleTraversalSpeed()
|
|
225
236
|
}
|
|
226
237
|
isOpen = value
|
|
227
238
|
trigger.setAttribute('aria-expanded', String(isOpen))
|
|
@@ -264,6 +275,37 @@ export function createThemeSettingsOverlay({
|
|
|
264
275
|
return normalizeScaleFocusContrast(scaleFocusContrastDirty ? scaleFocusContrastDraft : currentPreferences?.conversationScaleFocusContrast)
|
|
265
276
|
}
|
|
266
277
|
|
|
278
|
+
function normalizeParticleTraversalSpeed(value) {
|
|
279
|
+
const numeric = Number(value)
|
|
280
|
+
if (!Number.isFinite(numeric)) return PARTICLE_TRAVERSAL_SPEED_DEFAULT
|
|
281
|
+
const clamped = Math.min(PARTICLE_TRAVERSAL_SPEED_MAX, Math.max(PARTICLE_TRAVERSAL_SPEED_MIN, numeric))
|
|
282
|
+
return Math.round(clamped / PARTICLE_TRAVERSAL_SPEED_STEP) * PARTICLE_TRAVERSAL_SPEED_STEP
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
function currentParticleTraversalSpeed() {
|
|
286
|
+
return normalizeParticleTraversalSpeed(
|
|
287
|
+
particleTraversalSpeedDirty ? particleTraversalSpeedDraft : currentPreferences?.particleTraversalSpeed,
|
|
288
|
+
)
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
function conciseNumber(value) {
|
|
292
|
+
return String(Number(Number(value).toFixed(2)))
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
function particleTraversalLabel(value) {
|
|
296
|
+
const speed = normalizeParticleTraversalSpeed(value)
|
|
297
|
+
if (speed === 0) return '0× · 静止 / 不重组'
|
|
298
|
+
return `${conciseNumber(speed)}× · 每 ${conciseNumber(1 / speed)} 个视口重组`
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
function renderParticleTraversal() {
|
|
302
|
+
if (!panel || !currentPreferences) return
|
|
303
|
+
const value = currentParticleTraversalSpeed()
|
|
304
|
+
const range = panel.querySelector('input[data-prts-setting-range][data-prts-setting-key="particleTraversalSpeed"]')
|
|
305
|
+
if (range && range.value !== String(value)) range.value = String(value)
|
|
306
|
+
setText(panel.querySelector('[data-prts-particle-traversal-output]'), particleTraversalLabel(value))
|
|
307
|
+
}
|
|
308
|
+
|
|
267
309
|
function calibrationStatus(state, value) {
|
|
268
310
|
if (state?.mode === 'configured') return `当前视图:使用配置上限 / ${Math.round(Number(state.left) || value)} px`
|
|
269
311
|
if (state?.simulated) return `模拟布局:使用配置上限 / ${value} px`
|
|
@@ -371,7 +413,7 @@ export function createThemeSettingsOverlay({
|
|
|
371
413
|
const detail = resolveParticleDetail(currentPreferences)
|
|
372
414
|
const detailLabels = { compact: '精简', standard: '标准', precise: '精细' }
|
|
373
415
|
const advanced = panel.querySelector('[data-prts-advanced-summary]')
|
|
374
|
-
setText(advanced, `${detailLabels[detail]} / 区分度 ${contrast} / ${value} px`)
|
|
416
|
+
setText(advanced, `${detailLabels[detail]} / ${conciseNumber(currentParticleTraversalSpeed())}× / 区分度 ${contrast} / ${value} px`)
|
|
375
417
|
if (!calibration) return
|
|
376
418
|
const distance = `${value}px`
|
|
377
419
|
if (calibration.style.getPropertyValue('--prts-calibration-distance') !== distance) {
|
|
@@ -400,6 +442,19 @@ export function createThemeSettingsOverlay({
|
|
|
400
442
|
return true
|
|
401
443
|
}
|
|
402
444
|
|
|
445
|
+
function commitParticleTraversalSpeed() {
|
|
446
|
+
if (!particleTraversalSpeedDirty || !currentPreferences) return false
|
|
447
|
+
const value = currentParticleTraversalSpeed()
|
|
448
|
+
particleTraversalSpeedDirty = false
|
|
449
|
+
particleTraversalSpeedDraft = value
|
|
450
|
+
if (value !== normalizeParticleTraversalSpeed(currentPreferences.particleTraversalSpeed)) {
|
|
451
|
+
onPreferenceChange('particleTraversalSpeed', value)
|
|
452
|
+
} else {
|
|
453
|
+
renderParticleTraversal()
|
|
454
|
+
}
|
|
455
|
+
return true
|
|
456
|
+
}
|
|
457
|
+
|
|
403
458
|
function renderPersistence() {
|
|
404
459
|
const status = panel?.querySelector?.('[data-prts-persistence-status]')
|
|
405
460
|
const error = panel?.querySelector?.('[data-prts-persistence-error]')
|
|
@@ -442,6 +497,8 @@ export function createThemeSettingsOverlay({
|
|
|
442
497
|
if (particleError) particleError.hidden = currentStatus?.particle?.phase !== 'error'
|
|
443
498
|
if (!scaleDistanceDirty) scaleDistanceDraft = normalizeScaleDistance(currentPreferences.conversationScaleMaxDistance)
|
|
444
499
|
if (!scaleFocusContrastDirty) scaleFocusContrastDraft = normalizeScaleFocusContrast(currentPreferences.conversationScaleFocusContrast)
|
|
500
|
+
if (!particleTraversalSpeedDirty) particleTraversalSpeedDraft = normalizeParticleTraversalSpeed(currentPreferences.particleTraversalSpeed)
|
|
501
|
+
renderParticleTraversal()
|
|
445
502
|
renderScaleCalibration()
|
|
446
503
|
renderPersistence()
|
|
447
504
|
}
|
|
@@ -478,6 +535,8 @@ export function createThemeSettingsOverlay({
|
|
|
478
535
|
scaleDistanceDraft = undefined
|
|
479
536
|
scaleFocusContrastDirty = false
|
|
480
537
|
scaleFocusContrastDraft = undefined
|
|
538
|
+
particleTraversalSpeedDirty = false
|
|
539
|
+
particleTraversalSpeedDraft = undefined
|
|
481
540
|
setResetConfirmation(false)
|
|
482
541
|
onResetVisual()
|
|
483
542
|
}
|
|
@@ -494,6 +553,12 @@ export function createThemeSettingsOverlay({
|
|
|
494
553
|
} else if (target.dataset.prtsSettingKey === 'conversationScaleFocusContrast') {
|
|
495
554
|
scaleFocusContrastDraft = value
|
|
496
555
|
scaleFocusContrastDirty = true
|
|
556
|
+
} else if (target.dataset.prtsSettingKey === 'particleTraversalSpeed') {
|
|
557
|
+
particleTraversalSpeedDraft = normalizeParticleTraversalSpeed(value)
|
|
558
|
+
particleTraversalSpeedDirty = true
|
|
559
|
+
renderParticleTraversal()
|
|
560
|
+
onPreferencePreview('particleTraversalSpeed', particleTraversalSpeedDraft)
|
|
561
|
+
return
|
|
497
562
|
} else {
|
|
498
563
|
return
|
|
499
564
|
}
|
|
@@ -521,6 +586,7 @@ export function createThemeSettingsOverlay({
|
|
|
521
586
|
if (!target?.matches?.('input[data-prts-setting-range]')) return
|
|
522
587
|
if (target.dataset.prtsSettingKey === 'conversationScaleMaxDistance') commitScaleDistance()
|
|
523
588
|
if (target.dataset.prtsSettingKey === 'conversationScaleFocusContrast') commitScaleFocusContrast()
|
|
589
|
+
if (target.dataset.prtsSettingKey === 'particleTraversalSpeed') commitParticleTraversalSpeed()
|
|
524
590
|
}
|
|
525
591
|
|
|
526
592
|
trigger?.addEventListener('click', toggle)
|
|
@@ -547,6 +613,7 @@ export function createThemeSettingsOverlay({
|
|
|
547
613
|
currentPersistence = persistenceState ?? { phase: 'idle', revision: 0 }
|
|
548
614
|
if (!scaleDistanceDirty) scaleDistanceDraft = normalizeScaleDistance(preferences?.conversationScaleMaxDistance)
|
|
549
615
|
if (!scaleFocusContrastDirty) scaleFocusContrastDraft = normalizeScaleFocusContrast(preferences?.conversationScaleFocusContrast)
|
|
616
|
+
if (!particleTraversalSpeedDirty) particleTraversalSpeedDraft = normalizeParticleTraversalSpeed(preferences?.particleTraversalSpeed)
|
|
550
617
|
renderState()
|
|
551
618
|
},
|
|
552
619
|
refreshScalePreview: renderScaleCalibration,
|
package/src/styles/prts.css
CHANGED
|
@@ -169,15 +169,14 @@ html[data-dsh-prts] a {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
/* Keep the host application's control metrics intact. Only controls owned by
|
|
172
|
-
the P.R.T.S. shell and settings overlay inherit
|
|
172
|
+
the P.R.T.S. shell and settings overlay inherit theme typography and color. */
|
|
173
173
|
html[data-dsh-prts] [data-prts-shell] :is(button, input, textarea, select),
|
|
174
174
|
html[data-dsh-prts] [data-prts-theme-settings] :is(button, input, textarea, select) {
|
|
175
175
|
font: inherit;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
html[data-dsh-prts] button:not([data-slot="sidebar.settings"] button) {
|
|
178
|
+
html[data-dsh-prts] [data-prts-shell] button,
|
|
179
|
+
html[data-dsh-prts] [data-prts-theme-settings] button {
|
|
181
180
|
color: inherit;
|
|
182
181
|
}
|
|
183
182
|
|
|
@@ -419,6 +418,360 @@ html[data-dsh-prts] [data-prts-scheme-toggle] svg {
|
|
|
419
418
|
stroke-width: 1.7;
|
|
420
419
|
}
|
|
421
420
|
|
|
421
|
+
html[data-dsh-prts] [data-prts-scheme-toggle] {
|
|
422
|
+
touch-action: none;
|
|
423
|
+
user-select: none;
|
|
424
|
+
}
|
|
425
|
+
html[data-dsh-prts][data-prts-scheme-transition-interactive] [data-prts-scheme-toggle] {
|
|
426
|
+
cursor: ew-resize;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
html[data-dsh-prts] [data-prts-scheme-toggle][data-prts-scheme-press] {
|
|
430
|
+
animation: prts-scheme-toggle-press 100ms var(--prts-ease-snap) both;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
@keyframes prts-scheme-toggle-press {
|
|
434
|
+
0%, 100% { transform: translateY(0) scale(1); }
|
|
435
|
+
50% { transform: translateY(0) scale(.96); }
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-group(root) {
|
|
439
|
+
animation: prts-scheme-view-hold var(--prts-scheme-duration, 520ms) linear both;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-old(root),
|
|
443
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-new(root) {
|
|
444
|
+
animation: none;
|
|
445
|
+
mix-blend-mode: normal;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-old(root) {
|
|
449
|
+
z-index: 1;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-new(root) {
|
|
453
|
+
z-index: 2;
|
|
454
|
+
clip-path: inset(0 max(0px, calc(100vw - var(--prts-scheme-reveal-x))) 0 0);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-group(prts-scheme-grid),
|
|
458
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-group(prts-scheme-edge),
|
|
459
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-group(prts-scheme-node),
|
|
460
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-group(prts-scheme-mark) {
|
|
461
|
+
animation: none;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-group(prts-scheme-grid) {
|
|
465
|
+
z-index: 3;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-group(prts-scheme-edge) {
|
|
469
|
+
z-index: 4;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-group(prts-scheme-node),
|
|
473
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-group(prts-scheme-mark) {
|
|
474
|
+
z-index: 5;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-old(prts-scheme-grid),
|
|
478
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-old(prts-scheme-edge),
|
|
479
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-old(prts-scheme-node),
|
|
480
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-old(prts-scheme-mark) {
|
|
481
|
+
opacity: 0;
|
|
482
|
+
animation: none;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-new(prts-scheme-grid),
|
|
486
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-new(prts-scheme-edge),
|
|
487
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-new(prts-scheme-node),
|
|
488
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-new(prts-scheme-mark) {
|
|
489
|
+
opacity: 1;
|
|
490
|
+
animation: none;
|
|
491
|
+
mix-blend-mode: normal;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
@keyframes prts-scheme-view-hold {
|
|
495
|
+
from, to { opacity: 1; }
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"] {
|
|
499
|
+
--prts-scheme-grid-cell: 20px;
|
|
500
|
+
--prts-scheme-grid-diagonal-cell: 40px;
|
|
501
|
+
--prts-scheme-grid-axis: rgba(132, 158, 166, .14);
|
|
502
|
+
--prts-scheme-grid-node: rgba(150, 180, 188, .22);
|
|
503
|
+
--prts-scheme-grid-diagonal-opacity: .16;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
html[data-dsh-prts][data-prts-scheme-transition="light"] {
|
|
507
|
+
--prts-scheme-grid-axis: rgba(28, 36, 41, .12);
|
|
508
|
+
--prts-scheme-grid-node: rgba(24, 31, 35, .2);
|
|
509
|
+
--prts-scheme-grid-diagonal-opacity: .14;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
html[data-dsh-prts] [data-prts-scheme-reveal] {
|
|
513
|
+
box-sizing: border-box;
|
|
514
|
+
position: fixed;
|
|
515
|
+
z-index: 2147483647;
|
|
516
|
+
inset: 0;
|
|
517
|
+
width: 100vw;
|
|
518
|
+
max-width: none;
|
|
519
|
+
height: 100dvh;
|
|
520
|
+
max-height: none;
|
|
521
|
+
margin: 0;
|
|
522
|
+
padding: 0;
|
|
523
|
+
overflow: hidden;
|
|
524
|
+
border: 0;
|
|
525
|
+
background: transparent;
|
|
526
|
+
color: #ffd400;
|
|
527
|
+
--prts-scheme-grid-cell: 20px;
|
|
528
|
+
--prts-scheme-grid-diagonal-cell: 40px;
|
|
529
|
+
--prts-scheme-grid-axis: rgba(132, 158, 166, .08);
|
|
530
|
+
--prts-scheme-grid-node: rgba(150, 180, 188, .13);
|
|
531
|
+
--prts-scheme-grid-diagonal-opacity: .075;
|
|
532
|
+
pointer-events: none;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
html[data-dsh-prts] [data-prts-scheme-reveal="light"] {
|
|
536
|
+
--prts-scheme-grid-axis: rgba(28, 36, 41, .065);
|
|
537
|
+
--prts-scheme-grid-node: rgba(24, 31, 35, .105);
|
|
538
|
+
--prts-scheme-grid-diagonal-opacity: .06;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
html[data-dsh-prts] [data-prts-scheme-reveal-edge] {
|
|
542
|
+
isolation: isolate;
|
|
543
|
+
position: absolute;
|
|
544
|
+
top: 0;
|
|
545
|
+
left: 0;
|
|
546
|
+
width: 29px;
|
|
547
|
+
height: 100vh;
|
|
548
|
+
background:
|
|
549
|
+
linear-gradient(90deg,
|
|
550
|
+
transparent 13px,
|
|
551
|
+
rgba(244, 247, 247, .96) 13px 14px,
|
|
552
|
+
rgba(255, 212, 0, .22) 14px 15px,
|
|
553
|
+
transparent 15px);
|
|
554
|
+
transform: translate3d(-14px, 0, 0);
|
|
555
|
+
transform-origin: 50% 50%;
|
|
556
|
+
view-transition-name: prts-scheme-edge;
|
|
557
|
+
will-change: transform;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
html[data-dsh-prts] [data-prts-scheme-reveal-grid] {
|
|
561
|
+
position: absolute;
|
|
562
|
+
z-index: -2;
|
|
563
|
+
inset: 0 auto 0 -206px;
|
|
564
|
+
display: block;
|
|
565
|
+
width: 220px;
|
|
566
|
+
height: 100vh;
|
|
567
|
+
view-transition-name: prts-scheme-grid;
|
|
568
|
+
pointer-events: none;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-new(prts-scheme-grid) {
|
|
572
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%2396b4bc' stroke-width='.55'%3E%3Cpath d='M0 0H40M0 20H40M0 40H40M0 0V40M20 0V40M40 0V40' stroke-opacity='.22'/%3E%3Cpath d='M0 0L20 20L0 40M20 0L40 20L20 40' stroke-opacity='.46'/%3E%3Cpath d='M20 0L0 20L20 40M40 0L20 20L40 40' stroke-opacity='.22'/%3E%3C/g%3E%3Cg fill='%2396b4bc' fill-opacity='.36'%3E%3Ccircle cx='0' cy='0' r='1'/%3E%3Ccircle cx='20' cy='0' r='1'/%3E%3Ccircle cx='40' cy='0' r='1'/%3E%3Ccircle cx='0' cy='20' r='1'/%3E%3Ccircle cx='20' cy='20' r='1'/%3E%3Ccircle cx='40' cy='20' r='1'/%3E%3Ccircle cx='0' cy='40' r='1'/%3E%3Ccircle cx='20' cy='40' r='1'/%3E%3Ccircle cx='40' cy='40' r='1'/%3E%3C/g%3E%3C/svg%3E");
|
|
573
|
+
background-repeat: repeat;
|
|
574
|
+
background-position: calc(220px - var(--prts-scheme-reveal-x)) 0;
|
|
575
|
+
background-size: var(--prts-scheme-grid-diagonal-cell) var(--prts-scheme-grid-diagonal-cell);
|
|
576
|
+
-webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .12) 16%, rgba(0, 0, 0, .48) 56%, #000 100%);
|
|
577
|
+
mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .12) 16%, rgba(0, 0, 0, .48) 56%, #000 100%);
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
html[data-dsh-prts][data-prts-scheme-transition="light"]::view-transition-new(prts-scheme-grid) {
|
|
581
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%231c2429' stroke-width='.55'%3E%3Cpath d='M0 0H40M0 20H40M0 40H40M0 0V40M20 0V40M40 0V40' stroke-opacity='.2'/%3E%3Cpath d='M0 0L20 20L0 40M20 0L40 20L20 40' stroke-opacity='.42'/%3E%3Cpath d='M20 0L0 20L20 40M40 0L20 20L40 40' stroke-opacity='.2'/%3E%3C/g%3E%3Cg fill='%231c2429' fill-opacity='.32'%3E%3Ccircle cx='0' cy='0' r='1'/%3E%3Ccircle cx='20' cy='0' r='1'/%3E%3Ccircle cx='40' cy='0' r='1'/%3E%3Ccircle cx='0' cy='20' r='1'/%3E%3Ccircle cx='20' cy='20' r='1'/%3E%3Ccircle cx='40' cy='20' r='1'/%3E%3Ccircle cx='0' cy='40' r='1'/%3E%3Ccircle cx='20' cy='40' r='1'/%3E%3Ccircle cx='40' cy='40' r='1'/%3E%3C/g%3E%3C/svg%3E");
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
html[data-dsh-prts] [data-prts-scheme-reveal-blend] {
|
|
585
|
+
position: absolute;
|
|
586
|
+
z-index: -1;
|
|
587
|
+
inset: 0;
|
|
588
|
+
width: 29px;
|
|
589
|
+
background: linear-gradient(90deg, transparent, rgba(255, 212, 0, .025) 43%, rgba(235, 244, 245, .11) 50%, rgba(255, 212, 0, .018) 58%, transparent);
|
|
590
|
+
-webkit-backdrop-filter: blur(2px);
|
|
591
|
+
backdrop-filter: blur(2px);
|
|
592
|
+
opacity: .54;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
html[data-dsh-prts] [data-prts-scheme-reveal="light"] [data-prts-scheme-reveal-blend] {
|
|
596
|
+
background: linear-gradient(90deg, transparent, rgba(28, 36, 41, .04) 42%, rgba(255, 255, 255, .2) 50%, rgba(255, 212, 0, .018) 58%, transparent);
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
html[data-dsh-prts] [data-prts-scheme-reveal="dark"] [data-prts-scheme-reveal-blend] {
|
|
600
|
+
background: linear-gradient(90deg, transparent, rgba(132, 158, 166, .035) 42%, rgba(235, 244, 245, .12) 50%, rgba(255, 212, 0, .018) 58%, transparent);
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
html[data-dsh-prts] [data-prts-scheme-reveal-edge]::before {
|
|
604
|
+
content: "";
|
|
605
|
+
position: absolute;
|
|
606
|
+
top: 18%;
|
|
607
|
+
left: 7px;
|
|
608
|
+
width: 15px;
|
|
609
|
+
height: 28px;
|
|
610
|
+
border-top: 1px solid rgba(235, 244, 245, .58);
|
|
611
|
+
border-bottom: 1px solid rgba(235, 244, 245, .58);
|
|
612
|
+
background: linear-gradient(rgba(255, 212, 0, .72), rgba(255, 212, 0, .72)) 50% 50% / 100% 1px no-repeat;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
html[data-dsh-prts] [data-prts-scheme-reveal-edge]::after {
|
|
616
|
+
content: "";
|
|
617
|
+
position: absolute;
|
|
618
|
+
top: calc(18% + 12px);
|
|
619
|
+
left: 12px;
|
|
620
|
+
width: 5px;
|
|
621
|
+
height: 5px;
|
|
622
|
+
border: 1px solid rgba(255, 212, 0, .78);
|
|
623
|
+
background: rgba(8, 12, 14, .68);
|
|
624
|
+
transform: rotate(45deg);
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
html[data-dsh-prts] [data-prts-scheme-reveal-node] {
|
|
628
|
+
position: absolute;
|
|
629
|
+
z-index: 2;
|
|
630
|
+
bottom: clamp(88px, 18vh, 176px);
|
|
631
|
+
left: 14px;
|
|
632
|
+
display: block;
|
|
633
|
+
box-sizing: border-box;
|
|
634
|
+
width: 46px;
|
|
635
|
+
height: 62px;
|
|
636
|
+
color: #ffd400;
|
|
637
|
+
font-style: normal;
|
|
638
|
+
transform: translateX(10px);
|
|
639
|
+
view-transition-name: prts-scheme-node;
|
|
640
|
+
transition: transform 120ms var(--prts-ease-snap);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
html[data-dsh-prts] [data-prts-scheme-reveal-edge][data-prts-scheme-reveal-side="left"] [data-prts-scheme-reveal-node] {
|
|
644
|
+
transform: translateX(calc(-100% - 10px));
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
html[data-dsh-prts] [data-prts-scheme-reveal-node]::before {
|
|
648
|
+
content: "";
|
|
649
|
+
position: absolute;
|
|
650
|
+
top: 30px;
|
|
651
|
+
left: -10px;
|
|
652
|
+
width: 10px;
|
|
653
|
+
border-top: 1px solid rgba(255, 212, 0, .76);
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
html[data-dsh-prts] [data-prts-scheme-reveal-edge][data-prts-scheme-reveal-side="left"] [data-prts-scheme-reveal-node]::before {
|
|
657
|
+
right: -10px;
|
|
658
|
+
left: auto;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
html[data-dsh-prts] [data-prts-scheme-reveal-mark] {
|
|
662
|
+
position: absolute;
|
|
663
|
+
top: 20px;
|
|
664
|
+
left: 20px;
|
|
665
|
+
display: block;
|
|
666
|
+
width: 6px;
|
|
667
|
+
height: 6px;
|
|
668
|
+
border-top: 1px solid currentColor;
|
|
669
|
+
border-right: 1px solid currentColor;
|
|
670
|
+
view-transition-name: prts-scheme-mark;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
html[data-dsh-prts] [data-prts-scheme-reveal-meter] {
|
|
674
|
+
position: absolute;
|
|
675
|
+
top: 6px;
|
|
676
|
+
left: 0;
|
|
677
|
+
display: block;
|
|
678
|
+
box-sizing: border-box;
|
|
679
|
+
width: 6px;
|
|
680
|
+
height: 50px;
|
|
681
|
+
border: 1px solid rgba(255, 212, 0, .34);
|
|
682
|
+
background: rgba(8, 12, 14, .32);
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
html[data-dsh-prts] [data-prts-scheme-reveal-meter]::after {
|
|
686
|
+
content: "";
|
|
687
|
+
position: absolute;
|
|
688
|
+
top: -1px;
|
|
689
|
+
left: 6px;
|
|
690
|
+
width: 3px;
|
|
691
|
+
border-top: 1px solid rgba(255, 212, 0, .64);
|
|
692
|
+
box-shadow:
|
|
693
|
+
0 24px rgba(255, 212, 0, .42),
|
|
694
|
+
0 49px rgba(255, 212, 0, .64);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
html[data-dsh-prts] [data-prts-scheme-reveal-meter-fill] {
|
|
698
|
+
position: absolute;
|
|
699
|
+
inset: 1px;
|
|
700
|
+
display: block;
|
|
701
|
+
background: currentColor;
|
|
702
|
+
box-shadow: 0 0 5px rgba(255, 212, 0, .28);
|
|
703
|
+
opacity: 0;
|
|
704
|
+
transform-origin: 50% 100%;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
html[data-dsh-prts] [data-prts-scheme-reveal-label],
|
|
708
|
+
html[data-dsh-prts] [data-prts-scheme-reveal-value] {
|
|
709
|
+
position: absolute;
|
|
710
|
+
left: 12px;
|
|
711
|
+
display: block;
|
|
712
|
+
color: currentColor;
|
|
713
|
+
font-family: var(--prts-mono);
|
|
714
|
+
font-style: normal;
|
|
715
|
+
line-height: 1;
|
|
716
|
+
white-space: nowrap;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
html[data-dsh-prts] [data-prts-scheme-reveal-label] {
|
|
720
|
+
top: 7px;
|
|
721
|
+
font-size: 7px;
|
|
722
|
+
font-weight: 600;
|
|
723
|
+
letter-spacing: .16em;
|
|
724
|
+
opacity: .72;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
html[data-dsh-prts] [data-prts-scheme-reveal-value] {
|
|
728
|
+
bottom: 7px;
|
|
729
|
+
width: 24px;
|
|
730
|
+
height: 11px;
|
|
731
|
+
font-size: 11px;
|
|
732
|
+
font-weight: 700;
|
|
733
|
+
letter-spacing: .08em;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
html[data-dsh-prts][data-prts-scheme-transition-mode="view"]::view-transition-new(prts-scheme-node) {
|
|
737
|
+
background-image: linear-gradient(#ffd400, #ffd400);
|
|
738
|
+
background-position: left 1px bottom 7px;
|
|
739
|
+
background-repeat: no-repeat;
|
|
740
|
+
background-size: 2px var(--prts-scheme-control-meter-height, 0);
|
|
741
|
+
object-fit: none;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
html[data-dsh-prts][data-prts-scheme-transition-interactive]::view-transition-new(prts-scheme-node) {
|
|
745
|
+
background-image:
|
|
746
|
+
var(--prts-scheme-control-value-image),
|
|
747
|
+
linear-gradient(#ffd400, #ffd400);
|
|
748
|
+
background-position:
|
|
749
|
+
left 12px bottom 7px,
|
|
750
|
+
left 1px bottom 7px;
|
|
751
|
+
background-size:
|
|
752
|
+
24px 11px,
|
|
753
|
+
2px var(--prts-scheme-control-meter-height, 0);
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
html[data-dsh-prts][data-prts-scheme-transition-complete]::view-transition-group(prts-scheme-grid),
|
|
757
|
+
html[data-dsh-prts][data-prts-scheme-transition-complete]::view-transition-group(prts-scheme-edge),
|
|
758
|
+
html[data-dsh-prts][data-prts-scheme-transition-complete]::view-transition-group(prts-scheme-node),
|
|
759
|
+
html[data-dsh-prts][data-prts-scheme-transition-complete]::view-transition-group(prts-scheme-mark) {
|
|
760
|
+
animation: prts-scheme-hud-release 100ms ease-out both;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
@keyframes prts-scheme-hud-release {
|
|
764
|
+
0%, 35% { opacity: 1; }
|
|
765
|
+
100% { opacity: 0; }
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
@media (max-width: 640px) {
|
|
769
|
+
html[data-dsh-prts] [data-prts-scheme-reveal] {
|
|
770
|
+
--prts-scheme-grid-cell: 16px;
|
|
771
|
+
--prts-scheme-grid-diagonal-cell: 32px;
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
|
|
422
775
|
html[data-dsh-prts] [data-prts-scheme-current="dark"] [data-prts-scheme-icon="light"],
|
|
423
776
|
html[data-dsh-prts] [data-prts-scheme-current="light"] [data-prts-scheme-icon="dark"] {
|
|
424
777
|
display: none;
|
|
@@ -992,7 +1345,11 @@ html[data-dsh-prts] [data-prts-floating-input] {
|
|
|
992
1345
|
color: var(--prts-ink) !important;
|
|
993
1346
|
}
|
|
994
1347
|
|
|
995
|
-
html[data-dsh-prts]
|
|
1348
|
+
html[data-dsh-prts] :is(
|
|
1349
|
+
[data-prts-floating-glass="menu"],
|
|
1350
|
+
[data-prts-floating-glass="listbox"],
|
|
1351
|
+
[data-prts-floating-glass="popover"]
|
|
1352
|
+
) [data-prts-floating-danger] {
|
|
996
1353
|
color: var(--prts-red) !important;
|
|
997
1354
|
}
|
|
998
1355
|
|
|
@@ -439,6 +439,23 @@ html[data-dsh-prts] [data-prts-particle-detail-preview] {
|
|
|
439
439
|
border: 1px solid color-mix(in srgb, currentColor 44%, transparent);
|
|
440
440
|
}
|
|
441
441
|
html[data-dsh-prts] [data-prts-particle-detail-preview] b { width: 2px; height: 2px; background: currentColor; }
|
|
442
|
+
html[data-dsh-prts] [data-prts-particle-traversal] {
|
|
443
|
+
margin-top: 9px;
|
|
444
|
+
padding-top: 9px;
|
|
445
|
+
border-top: 1px solid var(--prts-line);
|
|
446
|
+
}
|
|
447
|
+
html[data-dsh-prts] [data-prts-particle-traversal] > span { display: grid; gap: 3px; }
|
|
448
|
+
html[data-dsh-prts] [data-prts-particle-traversal] > span strong { font-size: 9px; }
|
|
449
|
+
html[data-dsh-prts] [data-prts-particle-traversal] > span small {
|
|
450
|
+
color: var(--prts-muted);
|
|
451
|
+
font: 600 8px/1.35 var(--prts-mono);
|
|
452
|
+
}
|
|
453
|
+
html[data-dsh-prts] [data-prts-particle-traversal-output] {
|
|
454
|
+
min-width: 132px;
|
|
455
|
+
color: var(--prts-cyan);
|
|
456
|
+
font: 800 8px/1.2 var(--prts-mono);
|
|
457
|
+
text-align: right;
|
|
458
|
+
}
|
|
442
459
|
html[data-dsh-prts] [data-prts-particle-error] { margin: 8px 0 0; color: var(--prts-yellow); font: 700 8px/1.4 var(--prts-mono); }
|
|
443
460
|
|
|
444
461
|
html[data-dsh-prts] [data-prts-scale-calibration] {
|