@monimesl/dot-cli 0.1.0-alpha.29 → 0.1.0-alpha.30
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { logger } from '@monimesl/dot-runtime';
|
|
2
2
|
|
|
3
|
-
import { swatchColors } from './palette';
|
|
3
|
+
import { swatchColors } from './pages/basics/colors/palette';
|
|
4
4
|
|
|
5
5
|
export default defineDot({
|
|
6
6
|
// Folders under pages/, as the home page lists them. The first opens when the dot starts.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HexColor, PageColors, SchemeColor } from '@monimesl/dot-runtime';
|
|
2
2
|
|
|
3
|
-
import type { Swatch } from '
|
|
4
|
-
import { BACKGROUNDS, BAR_COLORS, OWN_SURFACES, PRIMARIES } from '
|
|
3
|
+
import type { Swatch } from './palette';
|
|
4
|
+
import { BACKGROUNDS, BAR_COLORS, OWN_SURFACES, PRIMARIES } from './palette';
|
|
5
5
|
import state from './state';
|
|
6
6
|
|
|
7
7
|
const HEX_COLOR = /^#[0-9a-fA-F]{6}$/;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { HexColor, SchemeColor } from '@monimesl/dot-runtime';
|
|
2
|
+
|
|
3
|
+
// Colours the Page colours page offers, each for light and dark. dot.ts names them in the theme too,
|
|
4
|
+
// so the page can show a swatch of each.
|
|
5
|
+
export interface Swatch {
|
|
6
|
+
name: string;
|
|
7
|
+
label: string;
|
|
8
|
+
light: HexColor;
|
|
9
|
+
dark: HexColor;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const BACKGROUNDS: Swatch[] = [
|
|
13
|
+
{ name: 'sky', label: 'Freetown sky', light: '#E3F2FD', dark: '#0B1A2E' },
|
|
14
|
+
{ name: 'sand', label: 'Lumley Beach', light: '#FBF1DC', dark: '#2A2416' },
|
|
15
|
+
{ name: 'palm', label: 'Tacugama', light: '#E6F4EA', dark: '#0F2417' },
|
|
16
|
+
{ name: 'sunset', label: 'Bureh sunset', light: '#FFF3E0', dark: '#2B1A0E' },
|
|
17
|
+
{ name: 'lagoon', label: 'Tokeh lagoon', light: '#DDF3F2', dark: '#0B2426' },
|
|
18
|
+
{ name: 'kola', label: 'Kola nut', light: '#F6E3E1', dark: '#2A1312' },
|
|
19
|
+
// Strong colours, where Dash turns the text and bars light.
|
|
20
|
+
{ name: 'flagGreen', label: 'Flag green', light: '#1EB53A', dark: '#12832A' },
|
|
21
|
+
{ name: 'atlantic', label: 'Atlantic', light: '#0072C6', dark: '#0A3D66' },
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
export const PRIMARIES: Swatch[] = [
|
|
25
|
+
{ name: 'flagBlue', label: 'Flag blue', light: '#0072C6', dark: '#4DA3E8' },
|
|
26
|
+
{ name: 'kolaRed', label: 'Kola red', light: '#B23A2B', dark: '#E0705F' },
|
|
27
|
+
{ name: 'palmGreen', label: 'Palm green', light: '#1E7A3A', dark: '#5CC27A' },
|
|
28
|
+
{ name: 'diamond', label: 'Diamond gold', light: '#9A6B00', dark: '#F5C542' },
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
// Bars take one colour, for light and dark alike.
|
|
32
|
+
export const BAR_COLORS: Swatch[] = [
|
|
33
|
+
{ name: 'flagGreen', label: 'Flag green', light: '#1EB53A', dark: '#1EB53A' },
|
|
34
|
+
{ name: 'atlantic', label: 'Atlantic', light: '#0072C6', dark: '#0072C6' },
|
|
35
|
+
{ name: 'ink', label: 'Ink', light: '#1C1C1E', dark: '#1C1C1E' },
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
// What a page might set for its cards, quiet fills and lines, in place of what Dash works out.
|
|
39
|
+
export const OWN_SURFACES: Record<'surface' | 'muted' | 'border', SchemeColor> = {
|
|
40
|
+
surface: { light: '#FFFFFF', dark: '#16181B' },
|
|
41
|
+
muted: { light: '#EEF1F4', dark: '#25282C' },
|
|
42
|
+
border: { light: '#C9D1D9', dark: '#3A3F45' },
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// The theme's custom colours for the swatches, by name.
|
|
46
|
+
export function swatchColors(): Record<string, SchemeColor> {
|
|
47
|
+
const colors: Record<string, SchemeColor> = {};
|
|
48
|
+
for (const swatch of [...BACKGROUNDS, ...PRIMARIES]) {
|
|
49
|
+
colors[swatch.name] = { light: swatch.light, dark: swatch.dark };
|
|
50
|
+
}
|
|
51
|
+
return colors;
|
|
52
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monimesl/dot-cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.30",
|
|
4
4
|
"description": "The dotctl command: build mini apps and run them in the simulator",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"typescript": "^5.9.3",
|
|
26
26
|
"uqr": "^0.1.3",
|
|
27
|
-
"@monimesl/dot-compiler": "0.1.0-alpha.
|
|
28
|
-
"@monimesl/dot-
|
|
29
|
-
"@monimesl/dot-
|
|
30
|
-
"@monimesl/dot-script-parser": "0.1.0-alpha.
|
|
31
|
-
"@monimesl/dot-simulator": "0.1.0-alpha.
|
|
27
|
+
"@monimesl/dot-compiler": "0.1.0-alpha.30",
|
|
28
|
+
"@monimesl/dot-core": "0.1.0-alpha.30",
|
|
29
|
+
"@monimesl/dot-dml-parser": "0.1.0-alpha.30",
|
|
30
|
+
"@monimesl/dot-script-parser": "0.1.0-alpha.30",
|
|
31
|
+
"@monimesl/dot-simulator": "0.1.0-alpha.30"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^22.20.4",
|