@pie-players/pie-tool-theme 0.3.2 → 0.3.4
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/index-CGEKDUBQ.js +228 -0
- package/dist/index-DF-Dk87f.js +192 -0
- package/dist/tool-color-scheme.js +2422 -1784
- package/package.json +10 -14
- package/tool-color-scheme.svelte +14 -62
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-players/pie-tool-theme",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Theme tool for PIE assessment player - provides accessible themes and color schemes",
|
|
6
6
|
"repository": {
|
|
@@ -36,18 +36,14 @@
|
|
|
36
36
|
"index.ts",
|
|
37
37
|
"package.json"
|
|
38
38
|
],
|
|
39
|
-
"peerDependencies": {
|
|
40
|
-
"svelte": "^5.51.0"
|
|
41
|
-
},
|
|
42
39
|
"license": "MIT",
|
|
43
40
|
"unpkg": "./dist/tool-color-scheme.js",
|
|
44
41
|
"jsdelivr": "./dist/tool-color-scheme.js",
|
|
45
42
|
"dependencies": {
|
|
46
|
-
"@pie-players/pie-assessment-toolkit": "0.3.
|
|
47
|
-
"@pie-players/pie-context": "0.3.
|
|
48
|
-
"@pie-players/pie-players-shared": "0.3.
|
|
49
|
-
"@pie-players/pie-theme": "0.3.
|
|
50
|
-
"daisyui": "^5.5.18"
|
|
43
|
+
"@pie-players/pie-assessment-toolkit": "0.3.4",
|
|
44
|
+
"@pie-players/pie-context": "0.3.4",
|
|
45
|
+
"@pie-players/pie-players-shared": "0.3.4",
|
|
46
|
+
"@pie-players/pie-theme": "0.3.4"
|
|
51
47
|
},
|
|
52
48
|
"types": "./dist/index.d.ts",
|
|
53
49
|
"scripts": {
|
|
@@ -58,11 +54,11 @@
|
|
|
58
54
|
},
|
|
59
55
|
"devDependencies": {
|
|
60
56
|
"@biomejs/biome": "^2.3.10",
|
|
61
|
-
"@sveltejs/vite-plugin-svelte": "^6.
|
|
62
|
-
"svelte": "^5.
|
|
63
|
-
"typescript": "^5.
|
|
64
|
-
"vite": "^7.
|
|
65
|
-
"vite-plugin-dts": "^4.5.
|
|
57
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
58
|
+
"svelte": "^5.53.7",
|
|
59
|
+
"typescript": "^5.9.3",
|
|
60
|
+
"vite": "^7.3.1",
|
|
61
|
+
"vite-plugin-dts": "^4.5.4"
|
|
66
62
|
},
|
|
67
63
|
"homepage": "https://github.com/pie-framework/pie-players/tree/master/packages/tool-color-scheme#readme",
|
|
68
64
|
"bugs": {
|
package/tool-color-scheme.svelte
CHANGED
|
@@ -305,20 +305,12 @@
|
|
|
305
305
|
}
|
|
306
306
|
});
|
|
307
307
|
|
|
308
|
-
function handleClose() {
|
|
309
|
-
dropdownOpen = false;
|
|
310
|
-
coordinator?.hideTool(toolId);
|
|
311
|
-
}
|
|
312
|
-
|
|
313
308
|
// Handle escape key
|
|
314
309
|
function handleKeyDown(e: KeyboardEvent) {
|
|
315
310
|
if (e.key === 'Escape') {
|
|
316
311
|
if (dropdownOpen) {
|
|
317
312
|
// Close dropdown first
|
|
318
313
|
dropdownOpen = false;
|
|
319
|
-
} else {
|
|
320
|
-
// Close the entire tool
|
|
321
|
-
handleClose();
|
|
322
314
|
}
|
|
323
315
|
} else if (dropdownOpen && (e.key === 'ArrowDown' || e.key === 'ArrowUp')) {
|
|
324
316
|
// Handle arrow key navigation in dropdown
|
|
@@ -399,19 +391,14 @@
|
|
|
399
391
|
</script>
|
|
400
392
|
|
|
401
393
|
{#if visible}
|
|
402
|
-
<div
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
>
|
|
411
|
-
×
|
|
412
|
-
</button>
|
|
413
|
-
</div>
|
|
414
|
-
|
|
394
|
+
<div
|
|
395
|
+
bind:this={containerEl}
|
|
396
|
+
class="pie-tool-color-scheme"
|
|
397
|
+
role="dialog"
|
|
398
|
+
tabindex="-1"
|
|
399
|
+
aria-label="Theme selector"
|
|
400
|
+
onkeydown={handleKeyDown}
|
|
401
|
+
>
|
|
415
402
|
<div class="pie-tool-color-scheme__content">
|
|
416
403
|
<p class="pie-tool-color-scheme__description">
|
|
417
404
|
Select a theme to improve readability and reduce eye strain.
|
|
@@ -478,57 +465,23 @@
|
|
|
478
465
|
|
|
479
466
|
<style>
|
|
480
467
|
.pie-tool-color-scheme {
|
|
481
|
-
position:
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
width: 90%;
|
|
486
|
-
max-width: 32rem;
|
|
468
|
+
position: relative;
|
|
469
|
+
width: 100%;
|
|
470
|
+
height: 100%;
|
|
471
|
+
min-height: 0;
|
|
487
472
|
background-color: var(--pie-background, white);
|
|
488
|
-
border: 2px solid var(--pie-border, #ccc);
|
|
489
|
-
border-radius: 0.5rem;
|
|
490
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
491
473
|
display: flex;
|
|
492
474
|
flex-direction: column;
|
|
493
475
|
}
|
|
494
476
|
|
|
495
|
-
.pie-tool-color-scheme__header {
|
|
496
|
-
display: flex;
|
|
497
|
-
justify-content: space-between;
|
|
498
|
-
align-items: center;
|
|
499
|
-
padding: 1rem;
|
|
500
|
-
border-bottom: 2px solid var(--pie-border, #ccc);
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
.pie-tool-color-scheme__title {
|
|
504
|
-
font-size: 1.25rem;
|
|
505
|
-
font-weight: 700;
|
|
506
|
-
color: var(--pie-text, black);
|
|
507
|
-
margin: 0;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
.pie-tool-color-scheme__close {
|
|
511
|
-
width: 2rem;
|
|
512
|
-
height: 2rem;
|
|
513
|
-
border: none;
|
|
514
|
-
background: transparent;
|
|
515
|
-
color: var(--pie-text, black);
|
|
516
|
-
font-size: 1.5rem;
|
|
517
|
-
line-height: 1;
|
|
518
|
-
cursor: pointer;
|
|
519
|
-
border-radius: 0.25rem;
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
.pie-tool-color-scheme__close:hover {
|
|
523
|
-
background-color: var(--pie-secondary-background, #f0f0f0);
|
|
524
|
-
}
|
|
525
|
-
|
|
526
477
|
.pie-tool-color-scheme__content {
|
|
527
478
|
padding: 1rem;
|
|
528
479
|
position: relative;
|
|
529
480
|
display: flex;
|
|
530
481
|
flex-direction: column;
|
|
531
482
|
gap: 1rem;
|
|
483
|
+
min-height: 0;
|
|
484
|
+
overflow: auto;
|
|
532
485
|
}
|
|
533
486
|
|
|
534
487
|
.pie-tool-color-scheme__description {
|
|
@@ -674,7 +627,6 @@
|
|
|
674
627
|
}
|
|
675
628
|
|
|
676
629
|
/* Keyboard focus styling */
|
|
677
|
-
.pie-tool-color-scheme__close:focus-visible,
|
|
678
630
|
.pie-tool-color-scheme__dropdown-trigger:focus-visible,
|
|
679
631
|
.pie-tool-color-scheme__option:focus-visible {
|
|
680
632
|
outline: 2px solid var(--pie-primary, #3f51b5);
|