@dialpad/dialtone-css 8.80.0-next.6 → 8.80.0-next.7

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.
Files changed (134) hide show
  1. package/lib/build/js/dialtone_migrate_border_radius/index.mjs +273 -0
  2. package/lib/build/js/dialtone_migrate_border_radius/test.mjs +422 -0
  3. package/lib/build/js/dialtone_migrate_typography/index.mjs +1628 -0
  4. package/lib/build/js/dialtone_migrate_typography/test.mjs +1020 -0
  5. package/lib/build/js/dialtone_migration_helper/configs/theme-to-mode.mjs +108 -0
  6. package/lib/build/js/dialtone_migration_helper/tests/theme-to-mode-test-examples.vue +24 -0
  7. package/lib/build/js/dialtone_migration_helper/tests/theme-to-mode.test.mjs +177 -0
  8. package/lib/build/less/components/button.less +2 -0
  9. package/lib/build/less/components/emoji-picker.less +10 -11
  10. package/lib/build/less/components/forms.less +22 -16
  11. package/lib/build/less/components/modal.less +8 -2
  12. package/lib/build/less/components/notice.less +4 -0
  13. package/lib/build/less/components/popover.less +1 -1
  14. package/lib/build/less/components/presence.less +23 -3
  15. package/lib/build/less/recipes/leftbar_row.less +1 -0
  16. package/lib/dist/dialtone-default-theme.css +67 -34
  17. package/lib/dist/dialtone-default-theme.min.css +1 -1
  18. package/lib/dist/dialtone-docs.json +1 -1
  19. package/lib/dist/dialtone.css +66 -34
  20. package/lib/dist/dialtone.min.css +1 -1
  21. package/lib/dist/js/dialtone_migrate_border_radius/index.mjs +273 -0
  22. package/lib/dist/js/dialtone_migrate_border_radius/test.mjs +422 -0
  23. package/lib/dist/js/dialtone_migrate_typography/index.mjs +1628 -0
  24. package/lib/dist/js/dialtone_migrate_typography/test.mjs +1020 -0
  25. package/lib/dist/js/dialtone_migration_helper/configs/theme-to-mode.mjs +108 -0
  26. package/lib/dist/js/dialtone_migration_helper/tests/theme-to-mode-test-examples.vue +24 -0
  27. package/lib/dist/js/dialtone_migration_helper/tests/theme-to-mode.test.mjs +177 -0
  28. package/lib/dist/tokens/tokens-101-dark.css +1 -0
  29. package/lib/dist/tokens/tokens-101-light.css +1 -0
  30. package/lib/dist/tokens/tokens-102-dark.css +1 -0
  31. package/lib/dist/tokens/tokens-102-light.css +1 -0
  32. package/lib/dist/tokens/tokens-103-dark.css +1 -0
  33. package/lib/dist/tokens/tokens-103-light.css +1 -0
  34. package/lib/dist/tokens/tokens-104-dark.css +1 -0
  35. package/lib/dist/tokens/tokens-104-light.css +1 -0
  36. package/lib/dist/tokens/tokens-105-dark.css +1 -0
  37. package/lib/dist/tokens/tokens-105-light.css +1 -0
  38. package/lib/dist/tokens/tokens-106-dark.css +1 -0
  39. package/lib/dist/tokens/tokens-106-light.css +1 -0
  40. package/lib/dist/tokens/tokens-107-dark.css +1 -0
  41. package/lib/dist/tokens/tokens-107-light.css +1 -0
  42. package/lib/dist/tokens/tokens-108-dark.css +1 -0
  43. package/lib/dist/tokens/tokens-108-light.css +1 -0
  44. package/lib/dist/tokens/tokens-109-dark.css +1 -0
  45. package/lib/dist/tokens/tokens-109-light.css +1 -0
  46. package/lib/dist/tokens/tokens-110-dark.css +1 -0
  47. package/lib/dist/tokens/tokens-110-light.css +1 -0
  48. package/lib/dist/tokens/tokens-111-dark.css +1 -0
  49. package/lib/dist/tokens/tokens-111-light.css +1 -0
  50. package/lib/dist/tokens/tokens-112-dark.css +1 -0
  51. package/lib/dist/tokens/tokens-112-light.css +1 -0
  52. package/lib/dist/tokens/tokens-113-dark.css +1 -0
  53. package/lib/dist/tokens/tokens-113-light.css +1 -0
  54. package/lib/dist/tokens/tokens-114-dark.css +1 -0
  55. package/lib/dist/tokens/tokens-114-light.css +1 -0
  56. package/lib/dist/tokens/tokens-115-dark.css +1 -0
  57. package/lib/dist/tokens/tokens-115-light.css +1 -0
  58. package/lib/dist/tokens/tokens-116-dark.css +1 -0
  59. package/lib/dist/tokens/tokens-116-light.css +1 -0
  60. package/lib/dist/tokens/tokens-117-dark.css +1 -0
  61. package/lib/dist/tokens/tokens-117-light.css +1 -0
  62. package/lib/dist/tokens/tokens-118-dark.css +1 -0
  63. package/lib/dist/tokens/tokens-118-light.css +1 -0
  64. package/lib/dist/tokens/tokens-119-dark.css +1 -0
  65. package/lib/dist/tokens/tokens-119-light.css +1 -0
  66. package/lib/dist/tokens/tokens-120-dark.css +1 -0
  67. package/lib/dist/tokens/tokens-120-light.css +1 -0
  68. package/lib/dist/tokens/tokens-121-dark.css +1 -0
  69. package/lib/dist/tokens/tokens-121-light.css +1 -0
  70. package/lib/dist/tokens/tokens-122-dark.css +1 -0
  71. package/lib/dist/tokens/tokens-122-light.css +1 -0
  72. package/lib/dist/tokens/tokens-123-dark.css +1 -0
  73. package/lib/dist/tokens/tokens-123-light.css +1 -0
  74. package/lib/dist/tokens/tokens-124-dark.css +1 -0
  75. package/lib/dist/tokens/tokens-124-light.css +1 -0
  76. package/lib/dist/tokens/tokens-125-dark.css +1 -0
  77. package/lib/dist/tokens/tokens-125-light.css +1 -0
  78. package/lib/dist/tokens/tokens-126-dark.css +1 -0
  79. package/lib/dist/tokens/tokens-126-light.css +1 -0
  80. package/lib/dist/tokens/tokens-127-dark.css +1 -0
  81. package/lib/dist/tokens/tokens-127-light.css +1 -0
  82. package/lib/dist/tokens/tokens-128-dark.css +1 -0
  83. package/lib/dist/tokens/tokens-128-light.css +1 -0
  84. package/lib/dist/tokens/tokens-129-dark.css +1 -0
  85. package/lib/dist/tokens/tokens-129-light.css +1 -0
  86. package/lib/dist/tokens/tokens-130-dark.css +1 -0
  87. package/lib/dist/tokens/tokens-130-light.css +1 -0
  88. package/lib/dist/tokens/tokens-131-dark.css +1 -0
  89. package/lib/dist/tokens/tokens-131-light.css +1 -0
  90. package/lib/dist/tokens/tokens-132-dark.css +1 -0
  91. package/lib/dist/tokens/tokens-132-light.css +1 -0
  92. package/lib/dist/tokens/tokens-133-dark.css +1 -0
  93. package/lib/dist/tokens/tokens-133-light.css +1 -0
  94. package/lib/dist/tokens/tokens-134-dark.css +1 -0
  95. package/lib/dist/tokens/tokens-134-light.css +1 -0
  96. package/lib/dist/tokens/tokens-135-dark.css +1 -0
  97. package/lib/dist/tokens/tokens-135-light.css +1 -0
  98. package/lib/dist/tokens/tokens-136-dark.css +1 -0
  99. package/lib/dist/tokens/tokens-136-light.css +1 -0
  100. package/lib/dist/tokens/tokens-137-dark.css +1 -0
  101. package/lib/dist/tokens/tokens-137-light.css +1 -0
  102. package/lib/dist/tokens/tokens-aegean-dark.css +1 -0
  103. package/lib/dist/tokens/tokens-aegean-light.css +1 -0
  104. package/lib/dist/tokens/tokens-botany-dark.css +1 -0
  105. package/lib/dist/tokens/tokens-botany-light.css +1 -0
  106. package/lib/dist/tokens/tokens-buttercream-dark.css +1 -0
  107. package/lib/dist/tokens/tokens-buttercream-light.css +1 -0
  108. package/lib/dist/tokens/tokens-ceruleo-dark.css +1 -0
  109. package/lib/dist/tokens/tokens-ceruleo-light.css +1 -0
  110. package/lib/dist/tokens/tokens-debug-dp.css +1 -0
  111. package/lib/dist/tokens/tokens-dp-dark.css +1 -0
  112. package/lib/dist/tokens/tokens-dp-light.css +1 -0
  113. package/lib/dist/tokens/tokens-expressive-dark.css +1 -0
  114. package/lib/dist/tokens/tokens-expressive-light.css +1 -0
  115. package/lib/dist/tokens/tokens-expressive-sm-dark.css +1 -0
  116. package/lib/dist/tokens/tokens-expressive-sm-light.css +1 -0
  117. package/lib/dist/tokens/tokens-high-desert-dark.css +1 -0
  118. package/lib/dist/tokens/tokens-high-desert-light.css +1 -0
  119. package/lib/dist/tokens/tokens-melon-dark.css +1 -0
  120. package/lib/dist/tokens/tokens-melon-light.css +1 -0
  121. package/lib/dist/tokens/tokens-plum-dark.css +1 -0
  122. package/lib/dist/tokens/tokens-plum-light.css +1 -0
  123. package/lib/dist/tokens/tokens-prota-deuter-dark.css +1 -0
  124. package/lib/dist/tokens/tokens-prota-deuter-light.css +1 -0
  125. package/lib/dist/tokens/tokens-sunflower-dark.css +1 -0
  126. package/lib/dist/tokens/tokens-sunflower-light.css +1 -0
  127. package/lib/dist/tokens/tokens-tmo-dark.css +1 -0
  128. package/lib/dist/tokens/tokens-tmo-light.css +1 -0
  129. package/lib/dist/tokens/tokens-trita-dark.css +1 -0
  130. package/lib/dist/tokens/tokens-trita-light.css +1 -0
  131. package/lib/dist/tokens/tokens-verdant-haze-dark.css +1 -0
  132. package/lib/dist/tokens/tokens-verdant-haze-light.css +1 -0
  133. package/lib/dist/tokens-docs.json +1 -1
  134. package/package.json +5 -3
@@ -0,0 +1,108 @@
1
+ // Migration: deprecated `setTheme()` and `data-dt-theme` attribute → layered API.
2
+ //
3
+ // - Startup call: setTheme(KnownTheme) → initDialtoneTheme(KnownTheme, 'mode')
4
+ // - Dynamic calls: setTheme(expr) → flagged with TODO comment
5
+ // - HTML attributes: data-dt-theme= → data-dt-mode=
6
+ // - JS attribute methods: setAttribute/getAttribute('data-dt-theme') → 'data-dt-mode'
7
+ // - CSS selectors: [data-dt-theme...] → [data-dt-mode...]
8
+ // - Invert regions (data-dt-theme="invert") are flagged with a TODO comment
9
+ // rather than auto-rewritten — the v-dt-mode directive uses a live
10
+ // MutationObserver that cannot be replicated with a static replacement.
11
+
12
+ // Identifiers and their mode extracted from the known legacy theme names.
13
+ const KNOWN_LIGHT = ['DpLight', 'TmoLight', 'ExpressiveLight', 'ExpressiveSmLight'];
14
+ const KNOWN_DARK = ['DpDark', 'TmoDark', 'ExpressiveDark', 'ExpressiveSmDark'];
15
+ const ALL_KNOWN = [...KNOWN_LIGHT, ...KNOWN_DARK];
16
+ const KNOWN_PATTERN = ALL_KNOWN.join('|');
17
+
18
+ export default {
19
+ description:
20
+ 'Migrates from the deprecated setTheme() / data-dt-theme API to the layered theming API.\n' +
21
+ '- setTheme(DpLight) → initDialtoneTheme(DpLight, \'light\')\n' +
22
+ '- setTheme(DpDark) → initDialtoneTheme(DpDark, \'dark\')\n' +
23
+ '- Same for TmoLight, TmoDark, ExpressiveLight, ExpressiveDark, ExpressiveSmLight, ExpressiveSmDark\n' +
24
+ '- setTheme(dynamicExpr) → preserved + TODO comment\n' +
25
+ '- data-dt-theme= → data-dt-mode= (HTML attributes, JS attr methods, CSS selectors)\n' +
26
+ '- data-dt-theme="invert" → preserved + TODO comment (review for v-dt-mode directive)\n',
27
+
28
+ patterns: ['**/*.{vue,html,js,ts,jsx,tsx,css,less,scss,mjs}'],
29
+
30
+ globbyConfig: {
31
+ ignore: [
32
+ '**/dialtone_migration_helper/tests/**',
33
+ '**/guides/migration/theme-to-mode/**',
34
+ '**/guides/theme-and-mode/index.md',
35
+ '**/whats-new/posts/2024-8-1.md',
36
+ ],
37
+ },
38
+
39
+ expressions: [
40
+ // 1. setTheme() call rewrites for known light identifiers.
41
+ // Must run BEFORE the unknown-call flag expression (3) so these are
42
+ // fully consumed before the fallthrough regex fires.
43
+ {
44
+ from: new RegExp(
45
+ `(?<!\\.)setTheme\\(\\s*(${KNOWN_LIGHT.join('|')})\\s*\\)`,
46
+ 'g',
47
+ ),
48
+ to: (_match, identifier) => `initDialtoneTheme(${identifier}, 'light')`,
49
+ },
50
+
51
+ // 2. setTheme() call rewrites for known dark identifiers.
52
+ {
53
+ from: new RegExp(
54
+ `(?<!\\.)setTheme\\(\\s*(${KNOWN_DARK.join('|')})\\s*\\)`,
55
+ 'g',
56
+ ),
57
+ to: (_match, identifier) => `initDialtoneTheme(${identifier}, 'dark')`,
58
+ },
59
+
60
+ // 3. setTheme() calls with unknown / dynamic arguments → TODO comment.
61
+ // Negative-lookahead skips the eight known identifiers already rewritten above.
62
+ // Negative-lookbehind on '.' prevents matching unrelated .setTheme() methods.
63
+ {
64
+ from: new RegExp(
65
+ `(?<!\\.)setTheme\\(\\s*(?!(${KNOWN_PATTERN})\\s*\\))([^)]*)\\)`,
66
+ 'g',
67
+ ),
68
+ to: (match) =>
69
+ `// TODO: review for layered API migration — see /guides/migration/theme-to-mode/\n${match}`,
70
+ },
71
+
72
+ // 4. Attribute rename: data-dt-theme → data-dt-mode
73
+ // Covers HTML/Vue/JSX attributes, JS string literals, and CSS selectors.
74
+ // Negative lookahead (?!-) prevents matching data-dt-theme-x (longer names).
75
+ // Works correctly with applyConfig's inner match.replace() since the inner
76
+ // call operates on just the matched text "data-dt-theme" where (?!-) passes
77
+ // at end-of-string (no "-" follows).
78
+ {
79
+ from: /\bdata-dt-theme(?!-)/g,
80
+ to: () => 'data-dt-mode',
81
+ },
82
+
83
+ // 5. CSS selector invert — add TODO comment before the renamed selector.
84
+ // Expression 5 already renamed [data-dt-theme=...] → [data-dt-mode=...],
85
+ // so we match on the result. HTML attribute invert is handled by
86
+ // expression 5 (just renamed, no comment — inserting HTML comments inside
87
+ // tags produces invalid markup; consumers grep for data-dt-mode="invert"
88
+ // to find regions needing v-dt-mode review).
89
+ {
90
+ from: /\[data-dt-mode="invert"\]|\[data-dt-mode=invert\]/g,
91
+ to: (match) =>
92
+ `/* TODO: review for v-dt-mode adoption — see /guides/migration/theme-to-mode/ */\n${match}`,
93
+ },
94
+
95
+ // 6. JS attribute methods: setAttribute/getAttribute/etc. on 'data-dt-theme'
96
+ {
97
+ from: /(\.(?:set|get|toggle|remove|has)Attribute\(\s*['"])data-dt-theme(['"])/g,
98
+ to: (_match, prefix, suffix) => `${prefix}data-dt-mode${suffix}`,
99
+ },
100
+
101
+ // 7. CSS attribute selectors: [data-dt-theme...] → [data-dt-mode...]
102
+ // Runs after the invert-flagging expressions to avoid double-processing.
103
+ {
104
+ from: /\[data-dt-theme(\]|=[^\]]*\])/g,
105
+ to: (_match, rest) => `[data-dt-mode${rest}`,
106
+ },
107
+ ],
108
+ };
@@ -0,0 +1,24 @@
1
+ <template>
2
+ <!-- Module path example (should be rewritten by codemod) -->
3
+ <section data-dt-theme="light">
4
+ Light mode section
5
+ </section>
6
+
7
+ <!-- CSS selector example (for stylesheet tests) -->
8
+ <div class="themed-container">
9
+ Theme-aware container
10
+ </div>
11
+ </template>
12
+
13
+ <script>
14
+ // Legacy imports — these paths and calls are transformed by the codemod
15
+ import DpLight from '@dialpad/dialtone/themes/dp-light';
16
+ import DpDark from '@dialpad/dialtone/themes/dp-dark';
17
+ import { setTheme } from '@dialpad/dialtone/themes/config';
18
+
19
+ // Startup initialization
20
+ setTheme(DpLight);
21
+
22
+ // Mode switching (runtime)
23
+ setTheme(DpDark);
24
+ </script>
@@ -0,0 +1,177 @@
1
+ import { describe, it } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import config from '../configs/theme-to-mode.mjs';
4
+ import { applyConfig } from './helpers.mjs';
5
+
6
+ const apply = (input) => applyConfig(config, input);
7
+
8
+ describe('theme-to-mode config', () => {
9
+ // ─── setTheme call rewrites ───────────────────────────────────────────────
10
+
11
+ describe('setTheme() → initDialtoneTheme() for known identifiers', () => {
12
+ it('rewrites setTheme(DpLight) → initDialtoneTheme(DpLight, \'light\')', () => {
13
+ const input = `setTheme(DpLight);`;
14
+ const expected = `initDialtoneTheme(DpLight, 'light');`;
15
+ assert.equal(apply(input), expected);
16
+ });
17
+
18
+ it('rewrites setTheme(DpDark) → initDialtoneTheme(DpDark, \'dark\')', () => {
19
+ const input = `setTheme(DpDark);`;
20
+ const expected = `initDialtoneTheme(DpDark, 'dark');`;
21
+ assert.equal(apply(input), expected);
22
+ });
23
+
24
+ it('rewrites setTheme(TmoLight) → initDialtoneTheme(TmoLight, \'light\')', () => {
25
+ const input = `setTheme(TmoLight);`;
26
+ const expected = `initDialtoneTheme(TmoLight, 'light');`;
27
+ assert.equal(apply(input), expected);
28
+ });
29
+
30
+ it('rewrites setTheme(TmoDark) → initDialtoneTheme(TmoDark, \'dark\')', () => {
31
+ const input = `setTheme(TmoDark);`;
32
+ const expected = `initDialtoneTheme(TmoDark, 'dark');`;
33
+ assert.equal(apply(input), expected);
34
+ });
35
+
36
+ it('rewrites setTheme(ExpressiveLight) → initDialtoneTheme(ExpressiveLight, \'light\')', () => {
37
+ const input = `setTheme(ExpressiveLight);`;
38
+ const expected = `initDialtoneTheme(ExpressiveLight, 'light');`;
39
+ assert.equal(apply(input), expected);
40
+ });
41
+
42
+ it('rewrites setTheme(ExpressiveDark) → initDialtoneTheme(ExpressiveDark, \'dark\')', () => {
43
+ const input = `setTheme(ExpressiveDark);`;
44
+ const expected = `initDialtoneTheme(ExpressiveDark, 'dark');`;
45
+ assert.equal(apply(input), expected);
46
+ });
47
+
48
+ it('handles whitespace inside setTheme call', () => {
49
+ const input = `setTheme( DpLight );`;
50
+ const expected = `initDialtoneTheme(DpLight, 'light');`;
51
+ assert.equal(apply(input), expected);
52
+ });
53
+
54
+ it('rewrites setTheme(DpLight) as part of onMounted setup', () => {
55
+ const input = `onMounted(() => { setTheme(DpLight); });`;
56
+ const expected = `onMounted(() => { initDialtoneTheme(DpLight, 'light'); });`;
57
+ assert.equal(apply(input), expected);
58
+ });
59
+
60
+ it('does NOT rewrite setTheme() with a dynamic variable — emits TODO comment', () => {
61
+ const input = `setTheme(myDynamicTheme);`;
62
+ const result = apply(input);
63
+ assert.ok(result.includes('setTheme(myDynamicTheme)'), 'original call preserved');
64
+ assert.ok(result.includes('TODO: review for layered API migration'), 'TODO comment inserted');
65
+ });
66
+
67
+ it('does NOT rewrite setTheme() with an expression — emits TODO comment', () => {
68
+ const input = `setTheme(isDark ? DpDark : DpLight);`;
69
+ const result = apply(input);
70
+ assert.ok(result.includes('setTheme(isDark ? DpDark : DpLight)'), 'original call preserved');
71
+ assert.ok(result.includes('TODO: review for layered API migration'), 'TODO comment inserted');
72
+ });
73
+
74
+ it('does NOT rewrite myObj.setTheme() — unrelated method', () => {
75
+ const input = `myThemeManager.setTheme(DpLight);`;
76
+ assert.equal(apply(input), input);
77
+ });
78
+ });
79
+
80
+ // ─── Attribute renames ────────────────────────────────────────────────────
81
+
82
+ describe('data-dt-theme → data-dt-mode in HTML attributes', () => {
83
+ it('rewrites data-dt-theme= in HTML attribute', () => {
84
+ const input = `<html data-dt-theme="dp-light">`;
85
+ const expected = `<html data-dt-mode="dp-light">`;
86
+ assert.equal(apply(input), expected);
87
+ });
88
+
89
+ it('rewrites data-dt-theme= with single quotes', () => {
90
+ const input = `<section data-dt-theme='dark'>content</section>`;
91
+ const expected = `<section data-dt-mode='dark'>content</section>`;
92
+ assert.equal(apply(input), expected);
93
+ });
94
+
95
+ it('does NOT rewrite data-dt-theme-x (longer attribute with same prefix)', () => {
96
+ const input = `<div data-dt-theme-custom="foo">`;
97
+ assert.equal(apply(input), input);
98
+ });
99
+
100
+ it('rewrites data-dt-theme= in Vue template binding (static)', () => {
101
+ const input = `<div data-dt-theme="light">`;
102
+ const expected = `<div data-dt-mode="light">`;
103
+ assert.equal(apply(input), expected);
104
+ });
105
+ });
106
+
107
+ describe('data-dt-theme in JS setAttribute/getAttribute', () => {
108
+ it('rewrites setAttribute first argument', () => {
109
+ const input = `el.setAttribute('data-dt-theme', 'dark');`;
110
+ const expected = `el.setAttribute('data-dt-mode', 'dark');`;
111
+ assert.equal(apply(input), expected);
112
+ });
113
+
114
+ it('rewrites getAttribute first argument', () => {
115
+ const input = `const mode = el.getAttribute('data-dt-theme');`;
116
+ const expected = `const mode = el.getAttribute('data-dt-mode');`;
117
+ assert.equal(apply(input), expected);
118
+ });
119
+
120
+ it('rewrites removeAttribute first argument', () => {
121
+ const input = `el.removeAttribute('data-dt-theme');`;
122
+ const expected = `el.removeAttribute('data-dt-mode');`;
123
+ assert.equal(apply(input), expected);
124
+ });
125
+
126
+ it('rewrites hasAttribute first argument', () => {
127
+ const input = `if (el.hasAttribute('data-dt-theme')) {`;
128
+ const expected = `if (el.hasAttribute('data-dt-mode')) {`;
129
+ assert.equal(apply(input), expected);
130
+ });
131
+ });
132
+
133
+ describe('data-dt-theme in CSS attribute selectors', () => {
134
+ it('rewrites [data-dt-theme] bare selector', () => {
135
+ const input = `[data-dt-theme] { color: red; }`;
136
+ const expected = `[data-dt-mode] { color: red; }`;
137
+ assert.equal(apply(input), expected);
138
+ });
139
+
140
+ it('rewrites [data-dt-theme="value"] selector', () => {
141
+ const input = `[data-dt-theme="dp-light"] { background: white; }`;
142
+ const expected = `[data-dt-mode="dp-light"] { background: white; }`;
143
+ assert.equal(apply(input), expected);
144
+ });
145
+
146
+ it('rewrites [data-dt-theme=value] selector (unquoted)', () => {
147
+ const input = `[data-dt-theme=light] .d-banner { border: 1px; }`;
148
+ const expected = `[data-dt-mode=light] .d-banner { border: 1px; }`;
149
+ assert.equal(apply(input), expected);
150
+ });
151
+ });
152
+
153
+ // ─── Invert handling ──────────────────────────────────────────────────────
154
+
155
+ describe('data-dt-theme="invert" handling', () => {
156
+ it('renames data-dt-theme="invert" to data-dt-mode="invert" (grep to find for v-dt-mode review)', () => {
157
+ const input = `<section data-dt-theme="invert">content</section>`;
158
+ const result = apply(input);
159
+ assert.ok(result.includes('data-dt-mode="invert"'), 'attribute renamed');
160
+ assert.ok(!result.includes('data-dt-theme="invert"'), 'old attribute removed');
161
+ });
162
+
163
+ it('adds TODO comment before [data-dt-theme="invert"] CSS selector', () => {
164
+ const input = `[data-dt-theme="invert"] .d-card { box-shadow: none; }`;
165
+ const result = apply(input);
166
+ assert.ok(result.includes('[data-dt-mode="invert"]'), 'selector renamed');
167
+ assert.ok(result.includes('TODO: review for v-dt-mode adoption'), 'TODO inserted');
168
+ });
169
+
170
+ it('adds TODO comment before [data-dt-theme=invert] unquoted CSS selector', () => {
171
+ const input = `[data-dt-theme=invert] { background: red; }`;
172
+ const result = apply(input);
173
+ assert.ok(result.includes('[data-dt-mode=invert]'), 'selector renamed');
174
+ assert.ok(result.includes('TODO: review for v-dt-mode adoption'), 'TODO inserted');
175
+ });
176
+ });
177
+ });
@@ -787,6 +787,7 @@
787
787
  --dt-color-surface-moderate: var(--dt-color-black-250);
788
788
  --dt-color-surface-secondary: var(--dt-color-black-150);
789
789
  --dt-color-surface-primary: var(--dt-color-black-100);
790
+ --dt-color-surface-overlay: var(--dt-color-black-200);
790
791
  --dt-color-link-mention-inverted-background-hover: oklch(0.3 0.15 283 / 0.2);
791
792
  --dt-color-link-mention-inverted-background: oklch(0.3 0.15 283 / 0.3);
792
793
  --dt-color-link-mention-background-hover: oklch(0.3 0.15 283 / 0.25);
@@ -770,6 +770,7 @@
770
770
  --dt-color-surface-moderate: var(--dt-color-black-200); /* A tertiary surface level, prominent without being too overpowering. */
771
771
  --dt-color-surface-secondary: var(--dt-color-black-100); /* For adjacent or complementary regions. */
772
772
  --dt-color-surface-primary: var(--dt-color-black-50); /* Default surface color for the majority of surfaces. */
773
+ --dt-color-surface-overlay: var(--dt-color-black-50); /* For overlay surfaces like modals, popovers, and dialogs. */
773
774
  --dt-color-link-mention-inverted-background-hover: oklch(0.85 0.09 301 / 0.2);
774
775
  --dt-color-link-mention-inverted-background: oklch(0.85 0.09 301 / 0.3);
775
776
  --dt-color-link-mention-background-hover: oklch(0.85 0.09 301 / 0.15);
@@ -787,6 +787,7 @@
787
787
  --dt-color-surface-moderate: var(--dt-color-black-250);
788
788
  --dt-color-surface-secondary: var(--dt-color-black-150);
789
789
  --dt-color-surface-primary: var(--dt-color-black-100);
790
+ --dt-color-surface-overlay: var(--dt-color-black-200);
790
791
  --dt-color-link-mention-inverted-background-hover: oklch(0.3 0.15 283 / 0.2);
791
792
  --dt-color-link-mention-inverted-background: oklch(0.3 0.15 283 / 0.3);
792
793
  --dt-color-link-mention-background-hover: oklch(0.3 0.15 283 / 0.25);
@@ -770,6 +770,7 @@
770
770
  --dt-color-surface-moderate: var(--dt-color-black-200); /* A tertiary surface level, prominent without being too overpowering. */
771
771
  --dt-color-surface-secondary: var(--dt-color-black-100); /* For adjacent or complementary regions. */
772
772
  --dt-color-surface-primary: var(--dt-color-black-50); /* Default surface color for the majority of surfaces. */
773
+ --dt-color-surface-overlay: var(--dt-color-black-50); /* For overlay surfaces like modals, popovers, and dialogs. */
773
774
  --dt-color-link-mention-inverted-background-hover: oklch(0.85 0.09 301 / 0.2);
774
775
  --dt-color-link-mention-inverted-background: oklch(0.85 0.09 301 / 0.3);
775
776
  --dt-color-link-mention-background-hover: oklch(0.85 0.09 301 / 0.15);
@@ -787,6 +787,7 @@
787
787
  --dt-color-surface-moderate: var(--dt-color-black-250);
788
788
  --dt-color-surface-secondary: var(--dt-color-black-150);
789
789
  --dt-color-surface-primary: var(--dt-color-black-100);
790
+ --dt-color-surface-overlay: var(--dt-color-black-200);
790
791
  --dt-color-link-mention-inverted-background-hover: oklch(0.3 0.15 283 / 0.2);
791
792
  --dt-color-link-mention-inverted-background: oklch(0.3 0.15 283 / 0.3);
792
793
  --dt-color-link-mention-background-hover: oklch(0.3 0.15 283 / 0.25);
@@ -770,6 +770,7 @@
770
770
  --dt-color-surface-moderate: var(--dt-color-black-200); /* A tertiary surface level, prominent without being too overpowering. */
771
771
  --dt-color-surface-secondary: var(--dt-color-black-100); /* For adjacent or complementary regions. */
772
772
  --dt-color-surface-primary: var(--dt-color-black-50); /* Default surface color for the majority of surfaces. */
773
+ --dt-color-surface-overlay: var(--dt-color-black-50); /* For overlay surfaces like modals, popovers, and dialogs. */
773
774
  --dt-color-link-mention-inverted-background-hover: oklch(0.85 0.09 301 / 0.2);
774
775
  --dt-color-link-mention-inverted-background: oklch(0.85 0.09 301 / 0.3);
775
776
  --dt-color-link-mention-background-hover: oklch(0.85 0.09 301 / 0.15);
@@ -787,6 +787,7 @@
787
787
  --dt-color-surface-moderate: var(--dt-color-black-250);
788
788
  --dt-color-surface-secondary: var(--dt-color-black-150);
789
789
  --dt-color-surface-primary: var(--dt-color-black-100);
790
+ --dt-color-surface-overlay: var(--dt-color-black-200);
790
791
  --dt-color-link-mention-inverted-background-hover: oklch(0.3 0.15 283 / 0.2);
791
792
  --dt-color-link-mention-inverted-background: oklch(0.3 0.15 283 / 0.3);
792
793
  --dt-color-link-mention-background-hover: oklch(0.3 0.15 283 / 0.25);
@@ -770,6 +770,7 @@
770
770
  --dt-color-surface-moderate: var(--dt-color-black-200); /* A tertiary surface level, prominent without being too overpowering. */
771
771
  --dt-color-surface-secondary: var(--dt-color-black-100); /* For adjacent or complementary regions. */
772
772
  --dt-color-surface-primary: var(--dt-color-black-50); /* Default surface color for the majority of surfaces. */
773
+ --dt-color-surface-overlay: var(--dt-color-black-50); /* For overlay surfaces like modals, popovers, and dialogs. */
773
774
  --dt-color-link-mention-inverted-background-hover: oklch(0.85 0.09 301 / 0.2);
774
775
  --dt-color-link-mention-inverted-background: oklch(0.85 0.09 301 / 0.3);
775
776
  --dt-color-link-mention-background-hover: oklch(0.85 0.09 301 / 0.15);
@@ -787,6 +787,7 @@
787
787
  --dt-color-surface-moderate: var(--dt-color-black-250);
788
788
  --dt-color-surface-secondary: var(--dt-color-black-150);
789
789
  --dt-color-surface-primary: var(--dt-color-black-100);
790
+ --dt-color-surface-overlay: var(--dt-color-black-200);
790
791
  --dt-color-link-mention-inverted-background-hover: oklch(0.3 0.15 283 / 0.2);
791
792
  --dt-color-link-mention-inverted-background: oklch(0.3 0.15 283 / 0.3);
792
793
  --dt-color-link-mention-background-hover: oklch(0.3 0.15 283 / 0.25);
@@ -770,6 +770,7 @@
770
770
  --dt-color-surface-moderate: var(--dt-color-black-200); /* A tertiary surface level, prominent without being too overpowering. */
771
771
  --dt-color-surface-secondary: var(--dt-color-black-100); /* For adjacent or complementary regions. */
772
772
  --dt-color-surface-primary: var(--dt-color-black-50); /* Default surface color for the majority of surfaces. */
773
+ --dt-color-surface-overlay: var(--dt-color-black-50); /* For overlay surfaces like modals, popovers, and dialogs. */
773
774
  --dt-color-link-mention-inverted-background-hover: oklch(0.85 0.09 301 / 0.2);
774
775
  --dt-color-link-mention-inverted-background: oklch(0.85 0.09 301 / 0.3);
775
776
  --dt-color-link-mention-background-hover: oklch(0.85 0.09 301 / 0.15);
@@ -787,6 +787,7 @@
787
787
  --dt-color-surface-moderate: var(--dt-color-black-250);
788
788
  --dt-color-surface-secondary: var(--dt-color-black-150);
789
789
  --dt-color-surface-primary: var(--dt-color-black-100);
790
+ --dt-color-surface-overlay: var(--dt-color-black-200);
790
791
  --dt-color-link-mention-inverted-background-hover: oklch(0.3 0.15 283 / 0.2);
791
792
  --dt-color-link-mention-inverted-background: oklch(0.3 0.15 283 / 0.3);
792
793
  --dt-color-link-mention-background-hover: oklch(0.3 0.15 283 / 0.25);
@@ -770,6 +770,7 @@
770
770
  --dt-color-surface-moderate: var(--dt-color-black-200); /* A tertiary surface level, prominent without being too overpowering. */
771
771
  --dt-color-surface-secondary: var(--dt-color-black-100); /* For adjacent or complementary regions. */
772
772
  --dt-color-surface-primary: var(--dt-color-black-50); /* Default surface color for the majority of surfaces. */
773
+ --dt-color-surface-overlay: var(--dt-color-black-50); /* For overlay surfaces like modals, popovers, and dialogs. */
773
774
  --dt-color-link-mention-inverted-background-hover: oklch(0.85 0.09 301 / 0.2);
774
775
  --dt-color-link-mention-inverted-background: oklch(0.85 0.09 301 / 0.3);
775
776
  --dt-color-link-mention-background-hover: oklch(0.85 0.09 301 / 0.15);
@@ -787,6 +787,7 @@
787
787
  --dt-color-surface-moderate: var(--dt-color-black-250);
788
788
  --dt-color-surface-secondary: var(--dt-color-black-150);
789
789
  --dt-color-surface-primary: var(--dt-color-black-100);
790
+ --dt-color-surface-overlay: var(--dt-color-black-200);
790
791
  --dt-color-link-mention-inverted-background-hover: oklch(0.3 0.15 283 / 0.2);
791
792
  --dt-color-link-mention-inverted-background: oklch(0.3 0.15 283 / 0.3);
792
793
  --dt-color-link-mention-background-hover: oklch(0.3 0.15 283 / 0.25);
@@ -770,6 +770,7 @@
770
770
  --dt-color-surface-moderate: var(--dt-color-black-200); /* A tertiary surface level, prominent without being too overpowering. */
771
771
  --dt-color-surface-secondary: var(--dt-color-black-100); /* For adjacent or complementary regions. */
772
772
  --dt-color-surface-primary: var(--dt-color-black-50); /* Default surface color for the majority of surfaces. */
773
+ --dt-color-surface-overlay: var(--dt-color-black-50); /* For overlay surfaces like modals, popovers, and dialogs. */
773
774
  --dt-color-link-mention-inverted-background-hover: oklch(0.85 0.09 301 / 0.2);
774
775
  --dt-color-link-mention-inverted-background: oklch(0.85 0.09 301 / 0.3);
775
776
  --dt-color-link-mention-background-hover: oklch(0.85 0.09 301 / 0.15);
@@ -787,6 +787,7 @@
787
787
  --dt-color-surface-moderate: var(--dt-color-black-250);
788
788
  --dt-color-surface-secondary: var(--dt-color-black-150);
789
789
  --dt-color-surface-primary: var(--dt-color-black-100);
790
+ --dt-color-surface-overlay: var(--dt-color-black-200);
790
791
  --dt-color-link-mention-inverted-background-hover: oklch(0.3 0.15 283 / 0.2);
791
792
  --dt-color-link-mention-inverted-background: oklch(0.3 0.15 283 / 0.3);
792
793
  --dt-color-link-mention-background-hover: oklch(0.3 0.15 283 / 0.25);
@@ -770,6 +770,7 @@
770
770
  --dt-color-surface-moderate: var(--dt-color-black-200); /* A tertiary surface level, prominent without being too overpowering. */
771
771
  --dt-color-surface-secondary: var(--dt-color-black-100); /* For adjacent or complementary regions. */
772
772
  --dt-color-surface-primary: var(--dt-color-black-50); /* Default surface color for the majority of surfaces. */
773
+ --dt-color-surface-overlay: var(--dt-color-black-50); /* For overlay surfaces like modals, popovers, and dialogs. */
773
774
  --dt-color-link-mention-inverted-background-hover: oklch(0.85 0.09 301 / 0.2);
774
775
  --dt-color-link-mention-inverted-background: oklch(0.85 0.09 301 / 0.3);
775
776
  --dt-color-link-mention-background-hover: oklch(0.85 0.09 301 / 0.15);
@@ -787,6 +787,7 @@
787
787
  --dt-color-surface-moderate: var(--dt-color-black-250);
788
788
  --dt-color-surface-secondary: var(--dt-color-black-150);
789
789
  --dt-color-surface-primary: var(--dt-color-black-100);
790
+ --dt-color-surface-overlay: var(--dt-color-black-200);
790
791
  --dt-color-link-mention-inverted-background-hover: oklch(0.3 0.15 283 / 0.2);
791
792
  --dt-color-link-mention-inverted-background: oklch(0.3 0.15 283 / 0.3);
792
793
  --dt-color-link-mention-background-hover: oklch(0.3 0.15 283 / 0.25);
@@ -770,6 +770,7 @@
770
770
  --dt-color-surface-moderate: var(--dt-color-black-200); /* A tertiary surface level, prominent without being too overpowering. */
771
771
  --dt-color-surface-secondary: var(--dt-color-black-100); /* For adjacent or complementary regions. */
772
772
  --dt-color-surface-primary: var(--dt-color-black-50); /* Default surface color for the majority of surfaces. */
773
+ --dt-color-surface-overlay: var(--dt-color-black-50); /* For overlay surfaces like modals, popovers, and dialogs. */
773
774
  --dt-color-link-mention-inverted-background-hover: oklch(0.85 0.09 301 / 0.2);
774
775
  --dt-color-link-mention-inverted-background: oklch(0.85 0.09 301 / 0.3);
775
776
  --dt-color-link-mention-background-hover: oklch(0.85 0.09 301 / 0.15);
@@ -787,6 +787,7 @@
787
787
  --dt-color-surface-moderate: var(--dt-color-black-250);
788
788
  --dt-color-surface-secondary: var(--dt-color-black-150);
789
789
  --dt-color-surface-primary: var(--dt-color-black-100);
790
+ --dt-color-surface-overlay: var(--dt-color-black-200);
790
791
  --dt-color-link-mention-inverted-background-hover: oklch(0.3 0.15 283 / 0.2);
791
792
  --dt-color-link-mention-inverted-background: oklch(0.3 0.15 283 / 0.3);
792
793
  --dt-color-link-mention-background-hover: oklch(0.3 0.15 283 / 0.25);
@@ -770,6 +770,7 @@
770
770
  --dt-color-surface-moderate: var(--dt-color-black-200); /* A tertiary surface level, prominent without being too overpowering. */
771
771
  --dt-color-surface-secondary: var(--dt-color-black-100); /* For adjacent or complementary regions. */
772
772
  --dt-color-surface-primary: var(--dt-color-black-50); /* Default surface color for the majority of surfaces. */
773
+ --dt-color-surface-overlay: var(--dt-color-black-50); /* For overlay surfaces like modals, popovers, and dialogs. */
773
774
  --dt-color-link-mention-inverted-background-hover: oklch(0.85 0.09 301 / 0.2);
774
775
  --dt-color-link-mention-inverted-background: oklch(0.85 0.09 301 / 0.3);
775
776
  --dt-color-link-mention-background-hover: oklch(0.85 0.09 301 / 0.15);
@@ -787,6 +787,7 @@
787
787
  --dt-color-surface-moderate: var(--dt-color-black-250);
788
788
  --dt-color-surface-secondary: var(--dt-color-black-150);
789
789
  --dt-color-surface-primary: var(--dt-color-black-100);
790
+ --dt-color-surface-overlay: var(--dt-color-black-200);
790
791
  --dt-color-link-mention-inverted-background-hover: oklch(0.3 0.15 283 / 0.2);
791
792
  --dt-color-link-mention-inverted-background: oklch(0.3 0.15 283 / 0.3);
792
793
  --dt-color-link-mention-background-hover: oklch(0.3 0.15 283 / 0.25);
@@ -770,6 +770,7 @@
770
770
  --dt-color-surface-moderate: var(--dt-color-black-200); /* A tertiary surface level, prominent without being too overpowering. */
771
771
  --dt-color-surface-secondary: var(--dt-color-black-100); /* For adjacent or complementary regions. */
772
772
  --dt-color-surface-primary: var(--dt-color-black-50); /* Default surface color for the majority of surfaces. */
773
+ --dt-color-surface-overlay: var(--dt-color-black-50); /* For overlay surfaces like modals, popovers, and dialogs. */
773
774
  --dt-color-link-mention-inverted-background-hover: oklch(0.85 0.09 301 / 0.2);
774
775
  --dt-color-link-mention-inverted-background: oklch(0.85 0.09 301 / 0.3);
775
776
  --dt-color-link-mention-background-hover: oklch(0.85 0.09 301 / 0.15);
@@ -787,6 +787,7 @@
787
787
  --dt-color-surface-moderate: var(--dt-color-black-250);
788
788
  --dt-color-surface-secondary: var(--dt-color-black-150);
789
789
  --dt-color-surface-primary: var(--dt-color-black-100);
790
+ --dt-color-surface-overlay: var(--dt-color-black-200);
790
791
  --dt-color-link-mention-inverted-background-hover: oklch(0.3 0.15 283 / 0.2);
791
792
  --dt-color-link-mention-inverted-background: oklch(0.3 0.15 283 / 0.3);
792
793
  --dt-color-link-mention-background-hover: oklch(0.3 0.15 283 / 0.25);
@@ -770,6 +770,7 @@
770
770
  --dt-color-surface-moderate: var(--dt-color-black-200); /* A tertiary surface level, prominent without being too overpowering. */
771
771
  --dt-color-surface-secondary: var(--dt-color-black-100); /* For adjacent or complementary regions. */
772
772
  --dt-color-surface-primary: var(--dt-color-black-50); /* Default surface color for the majority of surfaces. */
773
+ --dt-color-surface-overlay: var(--dt-color-black-50); /* For overlay surfaces like modals, popovers, and dialogs. */
773
774
  --dt-color-link-mention-inverted-background-hover: oklch(0.85 0.09 301 / 0.2);
774
775
  --dt-color-link-mention-inverted-background: oklch(0.85 0.09 301 / 0.3);
775
776
  --dt-color-link-mention-background-hover: oklch(0.85 0.09 301 / 0.15);
@@ -787,6 +787,7 @@
787
787
  --dt-color-surface-moderate: var(--dt-color-black-250);
788
788
  --dt-color-surface-secondary: var(--dt-color-black-150);
789
789
  --dt-color-surface-primary: var(--dt-color-black-100);
790
+ --dt-color-surface-overlay: var(--dt-color-black-200);
790
791
  --dt-color-link-mention-inverted-background-hover: oklch(0.3 0.15 283 / 0.2);
791
792
  --dt-color-link-mention-inverted-background: oklch(0.3 0.15 283 / 0.3);
792
793
  --dt-color-link-mention-background-hover: oklch(0.3 0.15 283 / 0.25);
@@ -770,6 +770,7 @@
770
770
  --dt-color-surface-moderate: var(--dt-color-black-200); /* A tertiary surface level, prominent without being too overpowering. */
771
771
  --dt-color-surface-secondary: var(--dt-color-black-100); /* For adjacent or complementary regions. */
772
772
  --dt-color-surface-primary: var(--dt-color-black-50); /* Default surface color for the majority of surfaces. */
773
+ --dt-color-surface-overlay: var(--dt-color-black-50); /* For overlay surfaces like modals, popovers, and dialogs. */
773
774
  --dt-color-link-mention-inverted-background-hover: oklch(0.85 0.09 301 / 0.2);
774
775
  --dt-color-link-mention-inverted-background: oklch(0.85 0.09 301 / 0.3);
775
776
  --dt-color-link-mention-background-hover: oklch(0.85 0.09 301 / 0.15);
@@ -787,6 +787,7 @@
787
787
  --dt-color-surface-moderate: var(--dt-color-black-250);
788
788
  --dt-color-surface-secondary: var(--dt-color-black-150);
789
789
  --dt-color-surface-primary: var(--dt-color-black-100);
790
+ --dt-color-surface-overlay: var(--dt-color-black-200);
790
791
  --dt-color-link-mention-inverted-background-hover: oklch(0.3 0.15 283 / 0.2);
791
792
  --dt-color-link-mention-inverted-background: oklch(0.3 0.15 283 / 0.3);
792
793
  --dt-color-link-mention-background-hover: oklch(0.3 0.15 283 / 0.25);
@@ -770,6 +770,7 @@
770
770
  --dt-color-surface-moderate: var(--dt-color-black-200); /* A tertiary surface level, prominent without being too overpowering. */
771
771
  --dt-color-surface-secondary: var(--dt-color-black-100); /* For adjacent or complementary regions. */
772
772
  --dt-color-surface-primary: var(--dt-color-black-50); /* Default surface color for the majority of surfaces. */
773
+ --dt-color-surface-overlay: var(--dt-color-black-50); /* For overlay surfaces like modals, popovers, and dialogs. */
773
774
  --dt-color-link-mention-inverted-background-hover: oklch(0.85 0.09 301 / 0.2);
774
775
  --dt-color-link-mention-inverted-background: oklch(0.85 0.09 301 / 0.3);
775
776
  --dt-color-link-mention-background-hover: oklch(0.85 0.09 301 / 0.15);
@@ -787,6 +787,7 @@
787
787
  --dt-color-surface-moderate: var(--dt-color-black-250);
788
788
  --dt-color-surface-secondary: var(--dt-color-black-150);
789
789
  --dt-color-surface-primary: var(--dt-color-black-100);
790
+ --dt-color-surface-overlay: var(--dt-color-black-200);
790
791
  --dt-color-link-mention-inverted-background-hover: oklch(0.3 0.15 283 / 0.2);
791
792
  --dt-color-link-mention-inverted-background: oklch(0.3 0.15 283 / 0.3);
792
793
  --dt-color-link-mention-background-hover: oklch(0.3 0.15 283 / 0.25);
@@ -770,6 +770,7 @@
770
770
  --dt-color-surface-moderate: var(--dt-color-black-200); /* A tertiary surface level, prominent without being too overpowering. */
771
771
  --dt-color-surface-secondary: var(--dt-color-black-100); /* For adjacent or complementary regions. */
772
772
  --dt-color-surface-primary: var(--dt-color-black-50); /* Default surface color for the majority of surfaces. */
773
+ --dt-color-surface-overlay: var(--dt-color-black-50); /* For overlay surfaces like modals, popovers, and dialogs. */
773
774
  --dt-color-link-mention-inverted-background-hover: oklch(0.85 0.09 301 / 0.2);
774
775
  --dt-color-link-mention-inverted-background: oklch(0.85 0.09 301 / 0.3);
775
776
  --dt-color-link-mention-background-hover: oklch(0.85 0.09 301 / 0.15);
@@ -787,6 +787,7 @@
787
787
  --dt-color-surface-moderate: var(--dt-color-black-250);
788
788
  --dt-color-surface-secondary: var(--dt-color-black-150);
789
789
  --dt-color-surface-primary: var(--dt-color-black-100);
790
+ --dt-color-surface-overlay: var(--dt-color-black-200);
790
791
  --dt-color-link-mention-inverted-background-hover: oklch(0.3 0.15 283 / 0.2);
791
792
  --dt-color-link-mention-inverted-background: oklch(0.3 0.15 283 / 0.3);
792
793
  --dt-color-link-mention-background-hover: oklch(0.3 0.15 283 / 0.25);
@@ -770,6 +770,7 @@
770
770
  --dt-color-surface-moderate: var(--dt-color-black-200); /* A tertiary surface level, prominent without being too overpowering. */
771
771
  --dt-color-surface-secondary: var(--dt-color-black-100); /* For adjacent or complementary regions. */
772
772
  --dt-color-surface-primary: var(--dt-color-black-50); /* Default surface color for the majority of surfaces. */
773
+ --dt-color-surface-overlay: var(--dt-color-black-50); /* For overlay surfaces like modals, popovers, and dialogs. */
773
774
  --dt-color-link-mention-inverted-background-hover: oklch(0.85 0.09 301 / 0.2);
774
775
  --dt-color-link-mention-inverted-background: oklch(0.85 0.09 301 / 0.3);
775
776
  --dt-color-link-mention-background-hover: oklch(0.85 0.09 301 / 0.15);
@@ -787,6 +787,7 @@
787
787
  --dt-color-surface-moderate: var(--dt-color-black-250);
788
788
  --dt-color-surface-secondary: var(--dt-color-black-150);
789
789
  --dt-color-surface-primary: var(--dt-color-black-100);
790
+ --dt-color-surface-overlay: var(--dt-color-black-200);
790
791
  --dt-color-link-mention-inverted-background-hover: oklch(0.3 0.15 283 / 0.2);
791
792
  --dt-color-link-mention-inverted-background: oklch(0.3 0.15 283 / 0.3);
792
793
  --dt-color-link-mention-background-hover: oklch(0.3 0.15 283 / 0.25);
@@ -770,6 +770,7 @@
770
770
  --dt-color-surface-moderate: var(--dt-color-black-200); /* A tertiary surface level, prominent without being too overpowering. */
771
771
  --dt-color-surface-secondary: var(--dt-color-black-100); /* For adjacent or complementary regions. */
772
772
  --dt-color-surface-primary: var(--dt-color-black-50); /* Default surface color for the majority of surfaces. */
773
+ --dt-color-surface-overlay: var(--dt-color-black-50); /* For overlay surfaces like modals, popovers, and dialogs. */
773
774
  --dt-color-link-mention-inverted-background-hover: oklch(0.85 0.09 301 / 0.2);
774
775
  --dt-color-link-mention-inverted-background: oklch(0.85 0.09 301 / 0.3);
775
776
  --dt-color-link-mention-background-hover: oklch(0.85 0.09 301 / 0.15);