accomadesc 0.2.35 → 0.2.37
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/dist/occuplan/state.svelte.js +17 -11
- package/package.json +3 -3
|
@@ -314,12 +314,12 @@ export class OccupationState {
|
|
|
314
314
|
occupationStyle = (d, highlightWeekend = false, maxDate) => {
|
|
315
315
|
const valid = validDay(d);
|
|
316
316
|
if (!valid) {
|
|
317
|
-
return 'background-color: var(--occuplan-invalid-days-bg-color);';
|
|
317
|
+
return 'background-color: var(--occuplan-invalid-days-bg-color); color: var(--occuplan-invalid-days-font-color);';
|
|
318
318
|
}
|
|
319
319
|
const day = luxon.utc(d.year, d.month, d.day);
|
|
320
320
|
const outOfScope = day >= maxDate;
|
|
321
321
|
if (outOfScope) {
|
|
322
|
-
return 'background-color: var(--occuplan-invalid-days-bg-color);';
|
|
322
|
+
return 'background-color: var(--occuplan-invalid-days-bg-color); color: var(--occuplan-invalid-days-font-color);';
|
|
323
323
|
}
|
|
324
324
|
const o = this.fullOccupation(day);
|
|
325
325
|
const oStarts = this.startingOccupation(day);
|
|
@@ -330,10 +330,12 @@ export class OccupationState {
|
|
|
330
330
|
if (highlightWeekend && isWeekend) {
|
|
331
331
|
return `
|
|
332
332
|
background: radial-gradient(var(--occuplan-weekend-bg-color), ${f.bgColor}, ${f.bgColor});
|
|
333
|
+
color: ${f.fontColor};
|
|
333
334
|
`;
|
|
334
335
|
}
|
|
335
336
|
return `
|
|
336
337
|
background-color: ${f.bgColor};
|
|
338
|
+
color: ${f.fontColor};
|
|
337
339
|
`;
|
|
338
340
|
}
|
|
339
341
|
if (oEnds && oStarts) {
|
|
@@ -341,25 +343,27 @@ export class OccupationState {
|
|
|
341
343
|
const ef = occupationTypeFormattingByOccupation(oEnds);
|
|
342
344
|
if (isWeekend && highlightWeekend) {
|
|
343
345
|
return `
|
|
344
|
-
|
|
345
|
-
|
|
346
|
+
color: ${ef.fontColor};
|
|
347
|
+
background: radial-gradient(var(--occuplan-weekend-bg-color), transparent, transparent), linear-gradient(90deg, ${ef.bgColor}, ${sf.bgColor});
|
|
346
348
|
`;
|
|
347
349
|
}
|
|
348
350
|
return `
|
|
349
351
|
background: linear-gradient(90deg, ${ef.bgColor}, ${sf.bgColor});
|
|
352
|
+
color: ${ef.fontColor};
|
|
350
353
|
`;
|
|
351
354
|
}
|
|
352
355
|
if (oStarts) {
|
|
353
356
|
const sf = occupationTypeFormattingByOccupation(oStarts);
|
|
354
357
|
if (isWeekend && highlightWeekend) {
|
|
355
358
|
return `
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
359
|
+
color: var(--occuplan-main-font-color);
|
|
360
|
+
background:
|
|
361
|
+
radial-gradient(var(--occuplan-weekend-bg-color), transparent, transparent), linear-gradient(90deg, var(--occuplan-main-bg-color), ${sf.bgColor});
|
|
362
|
+
`;
|
|
360
363
|
}
|
|
361
364
|
return `
|
|
362
365
|
background: linear-gradient(90deg, var(--occuplan-main-bg-color), ${sf.bgColor});
|
|
366
|
+
color: var(--occuplan-main-font-color);
|
|
363
367
|
`;
|
|
364
368
|
}
|
|
365
369
|
if (oEnds) {
|
|
@@ -367,22 +371,24 @@ export class OccupationState {
|
|
|
367
371
|
if (isWeekend && highlightWeekend) {
|
|
368
372
|
return `
|
|
369
373
|
background:
|
|
370
|
-
radial-gradient(
|
|
371
|
-
|
|
372
|
-
linear-gradient(90deg, ${ef.bgColor}, var(--occuplan-main-bg-color));
|
|
374
|
+
radial-gradient(var(--occuplan-weekend-bg-color), transparent, transparent), linear-gradient(90deg, ${ef.bgColor}, var(--occuplan-main-bg-color));
|
|
375
|
+
color: ${ef.fontColor};
|
|
373
376
|
`;
|
|
374
377
|
}
|
|
375
378
|
return `
|
|
376
379
|
background: linear-gradient(90deg, ${ef.bgColor}, var(--occuplan-main-bg-color));
|
|
380
|
+
color: ${ef.fontColor};
|
|
377
381
|
`;
|
|
378
382
|
}
|
|
379
383
|
if (isWeekend && highlightWeekend) {
|
|
380
384
|
return `
|
|
381
385
|
background: radial-gradient(var(--occuplan-weekend-bg-color), var(--occuplan-main-bg-color), var(--occuplan-main-bg-color));
|
|
386
|
+
color: var(--occuplan-main-font-color);
|
|
382
387
|
`;
|
|
383
388
|
}
|
|
384
389
|
return `
|
|
385
390
|
background-color: var(--occuplan-main-bg-color);
|
|
391
|
+
color: var(--occuplan-main-font-color);
|
|
386
392
|
`;
|
|
387
393
|
};
|
|
388
394
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "accomadesc",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.37",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "vite build && npm run package",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@sveltejs/adapter-auto": "^3.3.1",
|
|
43
|
-
"@sveltejs/kit": "^2.20.
|
|
43
|
+
"@sveltejs/kit": "^2.20.5",
|
|
44
44
|
"@sveltejs/package": "^2.3.10",
|
|
45
45
|
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
|
46
46
|
"@types/luxon": "^3.6.2",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"prettier": "^3.5.3",
|
|
49
49
|
"prettier-plugin-svelte": "^3.3.3",
|
|
50
50
|
"publint": "^0.3.10",
|
|
51
|
-
"svelte": "^5.25.
|
|
51
|
+
"svelte": "^5.25.10",
|
|
52
52
|
"svelte-check": "^4.1.5",
|
|
53
53
|
"typescript": "^5.8.3",
|
|
54
54
|
"vite": "^6.2.5"
|