@things-factory/shell 10.1.258 → 10.1.260
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/client/themes/domain-theme-cherry-red.css +1 -8
- package/client/themes/domain-theme-forest-green.css +1 -8
- package/client/themes/domain-theme-ocean-blue.css +1 -8
- package/client/themes/domain-theme-royal-purple.css +1 -8
- package/client/themes/domain-theme-sunset-orange.css +1 -8
- package/package.json +2 -2
- package/tests/destructive-theme-colors.test.mjs +28 -0
- package/translations/en.json +7 -1
- package/translations/es.json +7 -1
- package/translations/ja.json +7 -1
- package/translations/ko.json +7 -1
- package/translations/ms.json +7 -1
- package/translations/zh.json +7 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* Destructive colors inherit the shared light/dark semantic palette, independently of the brand. */
|
|
1
2
|
.domain-theme-cherry-red {
|
|
2
3
|
--md-sys-color-primary: rgb(211 47 47);
|
|
3
4
|
--md-sys-color-surface-tint: rgb(211 47 47);
|
|
@@ -12,10 +13,6 @@
|
|
|
12
13
|
--md-sys-color-on-tertiary: rgb(255 255 255);
|
|
13
14
|
--md-sys-color-tertiary-container: rgb(252 228 236);
|
|
14
15
|
--md-sys-color-on-tertiary-container: rgb(136 14 79);
|
|
15
|
-
--md-sys-color-error: #fe594e;
|
|
16
|
-
--md-sys-color-on-error: rgb(255 255 255);
|
|
17
|
-
--md-sys-color-error-container: rgb(255 218 215);
|
|
18
|
-
--md-sys-color-on-error-container: #fe594e;
|
|
19
16
|
--md-sys-color-background: rgb(255 250 250);
|
|
20
17
|
--md-sys-color-on-background: rgb(35 25 25);
|
|
21
18
|
--md-sys-color-surface: rgb(255 250 250);
|
|
@@ -64,10 +61,6 @@
|
|
|
64
61
|
--md-sys-color-on-tertiary: rgb(136 14 79);
|
|
65
62
|
--md-sys-color-tertiary-container: rgb(173 20 87);
|
|
66
63
|
--md-sys-color-on-tertiary-container: rgb(252 228 236);
|
|
67
|
-
--md-sys-color-error: #fbafa9;
|
|
68
|
-
--md-sys-color-on-error: #fe594e;
|
|
69
|
-
--md-sys-color-error-container: #fe594e;
|
|
70
|
-
--md-sys-color-on-error-container: #fbafa9;
|
|
71
64
|
--md-sys-color-background: rgb(25 17 17);
|
|
72
65
|
--md-sys-color-on-background: rgb(238 226 226);
|
|
73
66
|
--md-sys-color-surface: rgb(25 17 17);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* Destructive colors inherit the shared light/dark semantic palette, independently of the brand. */
|
|
1
2
|
.domain-theme-forest-green {
|
|
2
3
|
--md-sys-color-primary: rgb(56 142 60);
|
|
3
4
|
--md-sys-color-surface-tint: rgb(56 142 60);
|
|
@@ -12,10 +13,6 @@
|
|
|
12
13
|
--md-sys-color-on-tertiary: rgb(255 255 255);
|
|
13
14
|
--md-sys-color-tertiary-container: rgb(178 223 219);
|
|
14
15
|
--md-sys-color-on-tertiary-container: rgb(0 77 64);
|
|
15
|
-
--md-sys-color-error: #fe594e;
|
|
16
|
-
--md-sys-color-on-error: rgb(255 255 255);
|
|
17
|
-
--md-sys-color-error-container: rgb(255 218 215);
|
|
18
|
-
--md-sys-color-on-error-container: #fe594e;
|
|
19
16
|
--md-sys-color-background: rgb(250 253 250);
|
|
20
17
|
--md-sys-color-on-background: rgb(25 32 25);
|
|
21
18
|
--md-sys-color-surface: rgb(250 253 250);
|
|
@@ -64,10 +61,6 @@
|
|
|
64
61
|
--md-sys-color-on-tertiary: rgb(0 77 64);
|
|
65
62
|
--md-sys-color-tertiary-container: rgb(0 105 92);
|
|
66
63
|
--md-sys-color-on-tertiary-container: rgb(178 223 219);
|
|
67
|
-
--md-sys-color-error: #fbafa9;
|
|
68
|
-
--md-sys-color-on-error: #fe594e;
|
|
69
|
-
--md-sys-color-error-container: #fe594e;
|
|
70
|
-
--md-sys-color-on-error-container: #fbafa9;
|
|
71
64
|
--md-sys-color-background: rgb(17 22 17);
|
|
72
65
|
--md-sys-color-on-background: rgb(226 235 226);
|
|
73
66
|
--md-sys-color-surface: rgb(17 22 17);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* Destructive colors inherit the shared light/dark semantic palette, independently of the brand. */
|
|
1
2
|
.domain-theme-ocean-blue {
|
|
2
3
|
--md-sys-color-primary: rgb(30 136 229);
|
|
3
4
|
--md-sys-color-surface-tint: rgb(30 136 229);
|
|
@@ -12,10 +13,6 @@
|
|
|
12
13
|
--md-sys-color-on-tertiary: rgb(255 255 255);
|
|
13
14
|
--md-sys-color-tertiary-container: rgb(178 235 242);
|
|
14
15
|
--md-sys-color-on-tertiary-container: rgb(0 96 100);
|
|
15
|
-
--md-sys-color-error: #fe594e;
|
|
16
|
-
--md-sys-color-on-error: rgb(255 255 255);
|
|
17
|
-
--md-sys-color-error-container: rgb(255 218 215);
|
|
18
|
-
--md-sys-color-on-error-container: #fe594e;
|
|
19
16
|
--md-sys-color-background: rgb(250 252 255);
|
|
20
17
|
--md-sys-color-on-background: rgb(23 29 35);
|
|
21
18
|
--md-sys-color-surface: rgb(250 252 255);
|
|
@@ -64,10 +61,6 @@
|
|
|
64
61
|
--md-sys-color-on-tertiary: rgb(0 96 100);
|
|
65
62
|
--md-sys-color-tertiary-container: rgb(0 131 143);
|
|
66
63
|
--md-sys-color-on-tertiary-container: rgb(178 235 242);
|
|
67
|
-
--md-sys-color-error: #fbafa9;
|
|
68
|
-
--md-sys-color-on-error: #fe594e;
|
|
69
|
-
--md-sys-color-error-container: #fe594e;
|
|
70
|
-
--md-sys-color-on-error-container: #fbafa9;
|
|
71
64
|
--md-sys-color-background: rgb(16 22 28);
|
|
72
65
|
--md-sys-color-on-background: rgb(226 234 242);
|
|
73
66
|
--md-sys-color-surface: rgb(16 22 28);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* Destructive colors inherit the shared light/dark semantic palette, independently of the brand. */
|
|
1
2
|
.domain-theme-royal-purple {
|
|
2
3
|
--md-sys-color-primary: rgb(123 31 162);
|
|
3
4
|
--md-sys-color-surface-tint: rgb(123 31 162);
|
|
@@ -12,10 +13,6 @@
|
|
|
12
13
|
--md-sys-color-on-tertiary: rgb(255 255 255);
|
|
13
14
|
--md-sys-color-tertiary-container: rgb(209 196 233);
|
|
14
15
|
--md-sys-color-on-tertiary-container: rgb(49 27 146);
|
|
15
|
-
--md-sys-color-error: #fe594e;
|
|
16
|
-
--md-sys-color-on-error: rgb(255 255 255);
|
|
17
|
-
--md-sys-color-error-container: rgb(255 218 215);
|
|
18
|
-
--md-sys-color-on-error-container: #fe594e;
|
|
19
16
|
--md-sys-color-background: rgb(253 250 255);
|
|
20
17
|
--md-sys-color-on-background: rgb(30 25 35);
|
|
21
18
|
--md-sys-color-surface: rgb(253 250 255);
|
|
@@ -64,10 +61,6 @@
|
|
|
64
61
|
--md-sys-color-on-tertiary: rgb(49 27 146);
|
|
65
62
|
--md-sys-color-tertiary-container: rgb(69 39 160);
|
|
66
63
|
--md-sys-color-on-tertiary-container: rgb(209 196 233);
|
|
67
|
-
--md-sys-color-error: #fbafa9;
|
|
68
|
-
--md-sys-color-on-error: #fe594e;
|
|
69
|
-
--md-sys-color-error-container: #fe594e;
|
|
70
|
-
--md-sys-color-on-error-container: #fbafa9;
|
|
71
64
|
--md-sys-color-background: rgb(20 16 25);
|
|
72
65
|
--md-sys-color-on-background: rgb(230 226 236);
|
|
73
66
|
--md-sys-color-surface: rgb(20 16 25);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* Destructive colors inherit the shared light/dark semantic palette, independently of the brand. */
|
|
1
2
|
.domain-theme-sunset-orange {
|
|
2
3
|
--md-sys-color-primary: rgb(245 124 0);
|
|
3
4
|
--md-sys-color-surface-tint: rgb(245 124 0);
|
|
@@ -12,10 +13,6 @@
|
|
|
12
13
|
--md-sys-color-on-tertiary: rgb(0 0 0);
|
|
13
14
|
--md-sys-color-tertiary-container: rgb(255 249 196);
|
|
14
15
|
--md-sys-color-on-tertiary-container: rgb(255 143 0);
|
|
15
|
-
--md-sys-color-error: #fe594e;
|
|
16
|
-
--md-sys-color-on-error: rgb(255 255 255);
|
|
17
|
-
--md-sys-color-error-container: rgb(255 218 215);
|
|
18
|
-
--md-sys-color-on-error-container: #fe594e;
|
|
19
16
|
--md-sys-color-background: rgb(255 252 248);
|
|
20
17
|
--md-sys-color-on-background: rgb(35 30 24);
|
|
21
18
|
--md-sys-color-surface: rgb(255 252 248);
|
|
@@ -64,10 +61,6 @@
|
|
|
64
61
|
--md-sys-color-on-tertiary: rgb(255 143 0);
|
|
65
62
|
--md-sys-color-tertiary-container: rgb(255 160 0);
|
|
66
63
|
--md-sys-color-on-tertiary-container: rgb(255 249 196);
|
|
67
|
-
--md-sys-color-error: #fbafa9;
|
|
68
|
-
--md-sys-color-on-error: #fe594e;
|
|
69
|
-
--md-sys-color-error-container: #fe594e;
|
|
70
|
-
--md-sys-color-on-error-container: #fbafa9;
|
|
71
64
|
--md-sys-color-background: rgb(24 20 14);
|
|
72
65
|
--md-sys-color-on-background: rgb(234 228 220);
|
|
73
66
|
--md-sys-color-surface: rgb(24 20 14);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/shell",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.260",
|
|
4
4
|
"description": "Core module for framework",
|
|
5
5
|
"bin": {
|
|
6
6
|
"things-factory": "bin/things-factory",
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"pg": "^8.7.3",
|
|
143
143
|
"sqlite3": "^5.0.8"
|
|
144
144
|
},
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "72de583ba0394dcf8195ef723b0ee4217507e0e5"
|
|
146
146
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { test } from 'node:test'
|
|
2
|
+
import assert from 'node:assert/strict'
|
|
3
|
+
import { readFileSync, readdirSync } from 'node:fs'
|
|
4
|
+
|
|
5
|
+
const directory = new URL('../client/themes/', import.meta.url)
|
|
6
|
+
const declarations = text => Object.fromEntries([...text.matchAll(/(--md-sys-color-(?:on-)?error(?:-container)?):\s*([^;]+);/g)].map(match => [match[1], match[2].trim()]))
|
|
7
|
+
function luminance(color) {
|
|
8
|
+
const channels = color.startsWith('#')
|
|
9
|
+
? color.slice(1).match(/../g).map(part => parseInt(part, 16))
|
|
10
|
+
: color.match(/[\d.]+/g).slice(0, 3).map(Number)
|
|
11
|
+
return channels.map(n => n / 255).map(n => n <= .04045 ? n / 12.92 : ((n + .055) / 1.055) ** 2.4).reduce((sum, n, i) => sum + n * [.2126, .7152, .0722][i], 0)
|
|
12
|
+
}
|
|
13
|
+
for (const mode of ['light', 'dark']) {
|
|
14
|
+
test(`${mode}: both destructive foreground/background pairs retain readable contrast`, () => {
|
|
15
|
+
const colors = declarations(readFileSync(new URL(`${mode}.css`, directory), 'utf8'))
|
|
16
|
+
for (const suffix of ['', '-container']) {
|
|
17
|
+
const a = luminance(colors[`--md-sys-color-error${suffix}`])
|
|
18
|
+
const b = luminance(colors[`--md-sys-color-on-error${suffix}`])
|
|
19
|
+
const contrast = (Math.max(a, b) + .05) / (Math.min(a, b) + .05)
|
|
20
|
+
assert.ok(contrast >= 4.5, `${mode}${suffix}: ${contrast.toFixed(2)}`)
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
|
+
}
|
|
24
|
+
for (const file of readdirSync(directory).filter(name => /^domain-theme-.*\.css$/.test(name))) {
|
|
25
|
+
test(`${file}: branding inherits destructive colors from the shared light/dark palette`, () => {
|
|
26
|
+
assert.deepEqual(declarations(readFileSync(new URL(file, directory), 'utf8')), {})
|
|
27
|
+
})
|
|
28
|
+
}
|
package/translations/en.json
CHANGED
|
@@ -218,5 +218,11 @@
|
|
|
218
218
|
"figure.label.data-bindings": "bindings",
|
|
219
219
|
"text.delete": "delete",
|
|
220
220
|
"text.copy": "copy",
|
|
221
|
-
"text.scenario": "scenario"
|
|
221
|
+
"text.scenario": "scenario",
|
|
222
|
+
"button.add-row": "Add row",
|
|
223
|
+
"text.select-rows-to-delete": "Select the rows to delete first.",
|
|
224
|
+
"text.nothing-to-save": "There are no changes to save.",
|
|
225
|
+
"text.select-rows-to-copy": "Select the rows to copy first.",
|
|
226
|
+
"text.more-actions": "More actions",
|
|
227
|
+
"label.all": "All"
|
|
222
228
|
}
|
package/translations/es.json
CHANGED
|
@@ -218,5 +218,11 @@
|
|
|
218
218
|
"figure.label.data-bindings": "vínculos",
|
|
219
219
|
"text.delete": "eliminar",
|
|
220
220
|
"text.copy": "copiar",
|
|
221
|
-
"text.scenario": "escenario"
|
|
221
|
+
"text.scenario": "escenario",
|
|
222
|
+
"button.add-row": "Agregar fila",
|
|
223
|
+
"text.select-rows-to-delete": "Seleccione primero las filas que desea eliminar.",
|
|
224
|
+
"text.nothing-to-save": "No hay cambios para guardar.",
|
|
225
|
+
"text.select-rows-to-copy": "Seleccione primero las filas que desea copiar.",
|
|
226
|
+
"text.more-actions": "Más acciones",
|
|
227
|
+
"label.all": "Todos"
|
|
222
228
|
}
|
package/translations/ja.json
CHANGED
|
@@ -218,5 +218,11 @@
|
|
|
218
218
|
"figure.label.data-bindings": "連結",
|
|
219
219
|
"text.delete": "削除",
|
|
220
220
|
"text.copy": "コピー",
|
|
221
|
-
"text.scenario": "シナリオ"
|
|
221
|
+
"text.scenario": "シナリオ",
|
|
222
|
+
"button.add-row": "行を追加",
|
|
223
|
+
"text.select-rows-to-delete": "削除する行を先に選択してください。",
|
|
224
|
+
"text.nothing-to-save": "保存する変更はありません。",
|
|
225
|
+
"text.select-rows-to-copy": "コピーする行を先に選択してください。",
|
|
226
|
+
"text.more-actions": "その他の操作",
|
|
227
|
+
"label.all": "すべて"
|
|
222
228
|
}
|
package/translations/ko.json
CHANGED
|
@@ -218,5 +218,11 @@
|
|
|
218
218
|
"figure.label.data-bindings": "연결",
|
|
219
219
|
"text.delete": "삭제",
|
|
220
220
|
"text.copy": "복사",
|
|
221
|
-
"text.scenario": "시나리오"
|
|
221
|
+
"text.scenario": "시나리오",
|
|
222
|
+
"button.add-row": "행 추가",
|
|
223
|
+
"text.select-rows-to-delete": "삭제할 행을 먼저 선택하세요.",
|
|
224
|
+
"text.nothing-to-save": "저장할 변경 내용이 없습니다.",
|
|
225
|
+
"text.select-rows-to-copy": "복사할 행을 먼저 선택하세요.",
|
|
226
|
+
"text.more-actions": "추가 작업",
|
|
227
|
+
"label.all": "전체"
|
|
222
228
|
}
|
package/translations/ms.json
CHANGED
|
@@ -218,5 +218,11 @@
|
|
|
218
218
|
"figure.label.data-bindings": "ikatan",
|
|
219
219
|
"text.delete": "padam",
|
|
220
220
|
"text.copy": "salin",
|
|
221
|
-
"text.scenario": "senario"
|
|
221
|
+
"text.scenario": "senario",
|
|
222
|
+
"button.add-row": "Tambah baris",
|
|
223
|
+
"text.select-rows-to-delete": "Pilih baris yang hendak dipadam dahulu.",
|
|
224
|
+
"text.nothing-to-save": "Tiada perubahan untuk disimpan.",
|
|
225
|
+
"text.select-rows-to-copy": "Pilih baris yang hendak disalin dahulu.",
|
|
226
|
+
"text.more-actions": "Lagi tindakan",
|
|
227
|
+
"label.all": "Semua"
|
|
222
228
|
}
|
package/translations/zh.json
CHANGED
|
@@ -218,5 +218,11 @@
|
|
|
218
218
|
"figure.label.data-bindings": "绑定",
|
|
219
219
|
"text.delete": "删除",
|
|
220
220
|
"text.copy": "复制",
|
|
221
|
-
"text.scenario": "方案"
|
|
221
|
+
"text.scenario": "方案",
|
|
222
|
+
"button.add-row": "添加行",
|
|
223
|
+
"text.select-rows-to-delete": "请先选择要删除的行。",
|
|
224
|
+
"text.nothing-to-save": "没有需要保存的更改。",
|
|
225
|
+
"text.select-rows-to-copy": "请先选择要复制的行。",
|
|
226
|
+
"text.more-actions": "更多操作",
|
|
227
|
+
"label.all": "全部"
|
|
222
228
|
}
|