@objectifthunes/whiteboard 0.2.6 → 0.3.0
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/LICENSE +21 -0
- package/README.md +31 -1228
- package/dist/index.d.ts +36 -34
- package/dist/index.js +723 -743
- package/dist/whiteboard.css +55 -203
- package/package.json +7 -8
package/dist/whiteboard.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* ── CSS Custom Properties (light defaults) ──────────── */
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
|
-
--wb-font-body: 'Segoe UI', sans-serif;
|
|
4
|
+
--wb-font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
5
5
|
--wb-fs-2xs: 0.64rem;
|
|
6
6
|
--wb-fs-xs: 0.68rem;
|
|
7
7
|
--wb-fs-sm: 0.72rem;
|
|
@@ -514,77 +514,48 @@ select:focus {
|
|
|
514
514
|
to { transform: rotate(360deg); }
|
|
515
515
|
}
|
|
516
516
|
|
|
517
|
-
/* ── Button
|
|
517
|
+
/* ── Button extras ──────────────────────────────────── */
|
|
518
518
|
|
|
519
|
-
.
|
|
520
|
-
align-self: flex-start;
|
|
521
|
-
color: var(--wb-text-secondary);
|
|
522
|
-
border-color: var(--wb-border);
|
|
523
|
-
background: var(--wb-white);
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
.panel-close-btn:hover:not(:disabled) {
|
|
527
|
-
background: var(--wb-bg-hover);
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
.secondary-btn {
|
|
531
|
-
color: var(--wb-text-secondary);
|
|
532
|
-
border-color: var(--wb-border);
|
|
533
|
-
background: var(--wb-white);
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
.secondary-btn:hover:not(:disabled) {
|
|
537
|
-
background: var(--wb-bg-hover);
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
.danger-btn {
|
|
541
|
-
background: var(--wb-primary);
|
|
542
|
-
}
|
|
543
|
-
|
|
544
|
-
.danger-btn:hover:not(:disabled) {
|
|
545
|
-
background: var(--wb-primary-pressed);
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
.full-width-btn {
|
|
519
|
+
.wb-btn--full-width {
|
|
549
520
|
width: 100%;
|
|
550
521
|
}
|
|
551
522
|
|
|
552
|
-
.
|
|
553
|
-
|
|
554
|
-
min-height: 1.64rem;
|
|
555
|
-
padding: 0.2rem;
|
|
523
|
+
.panel-close-btn {
|
|
524
|
+
align-self: flex-start;
|
|
556
525
|
}
|
|
557
526
|
|
|
558
527
|
/* ── Alert ──────────────────────────────────────────── */
|
|
559
528
|
|
|
560
|
-
.
|
|
561
|
-
border: 1px solid #fecaca;
|
|
562
|
-
border-radius: var(--wb-radius-sm);
|
|
563
|
-
padding: 0.42rem 0.54rem;
|
|
564
|
-
font-size: var(--wb-fs-md);
|
|
565
|
-
color: #991b1b;
|
|
566
|
-
background: #fef2f2;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
.ui-alert {
|
|
570
|
-
border: 1px solid var(--wb-border);
|
|
571
|
-
border-radius: var(--wb-radius-sm);
|
|
572
|
-
padding: 0.42rem 0.54rem;
|
|
573
|
-
font-size: var(--wb-fs-md);
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
.ui-alert--info {
|
|
529
|
+
.wb-alert--info {
|
|
577
530
|
color: #1e3a8a;
|
|
578
531
|
background: #eff6ff;
|
|
579
532
|
border-color: #bfdbfe;
|
|
580
533
|
}
|
|
581
534
|
|
|
582
|
-
.
|
|
535
|
+
[data-theme="dark"] .wb-alert--info {
|
|
536
|
+
color: #bfdbfe;
|
|
537
|
+
background: #1e3a8a;
|
|
538
|
+
border-color: #1e40af;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
.wb-alert--success {
|
|
583
542
|
color: #166534;
|
|
584
543
|
background: #ecfdf5;
|
|
585
544
|
border-color: #bbf7d0;
|
|
586
545
|
}
|
|
587
546
|
|
|
547
|
+
[data-theme="dark"] .wb-alert--success {
|
|
548
|
+
color: #bbf7d0;
|
|
549
|
+
background: #14532d;
|
|
550
|
+
border-color: #15803d;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.wb-alert--muted {
|
|
554
|
+
color: var(--wb-text-muted);
|
|
555
|
+
background: var(--wb-surface-muted);
|
|
556
|
+
border-color: var(--wb-border);
|
|
557
|
+
}
|
|
558
|
+
|
|
588
559
|
/* ── Field ──────────────────────────────────────────── */
|
|
589
560
|
|
|
590
561
|
.field-error {
|
|
@@ -608,13 +579,13 @@ select:focus {
|
|
|
608
579
|
}
|
|
609
580
|
|
|
610
581
|
.pill.success {
|
|
611
|
-
color: #
|
|
612
|
-
background: #
|
|
582
|
+
color: #166534;
|
|
583
|
+
background: #ecfdf5;
|
|
613
584
|
}
|
|
614
585
|
|
|
615
586
|
.pill.warning {
|
|
616
|
-
color:
|
|
617
|
-
background:
|
|
587
|
+
color: #92400e;
|
|
588
|
+
background: #fffbeb;
|
|
618
589
|
}
|
|
619
590
|
|
|
620
591
|
.pill.danger {
|
|
@@ -622,6 +593,21 @@ select:focus {
|
|
|
622
593
|
background: #fef2f2;
|
|
623
594
|
}
|
|
624
595
|
|
|
596
|
+
[data-theme="dark"] .pill.success {
|
|
597
|
+
color: #bbf7d0;
|
|
598
|
+
background: #14532d;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
[data-theme="dark"] .pill.warning {
|
|
602
|
+
color: #fde68a;
|
|
603
|
+
background: #78350f;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
[data-theme="dark"] .pill.danger {
|
|
607
|
+
color: #fca5a5;
|
|
608
|
+
background: #7f1d1d;
|
|
609
|
+
}
|
|
610
|
+
|
|
625
611
|
/* ── Chip ───────────────────────────────────────────── */
|
|
626
612
|
|
|
627
613
|
.chip {
|
|
@@ -642,13 +628,6 @@ button.chip:hover {
|
|
|
642
628
|
background: var(--wb-bg-hover);
|
|
643
629
|
}
|
|
644
630
|
|
|
645
|
-
.chip--active {
|
|
646
|
-
border-color: #94a3b8;
|
|
647
|
-
background: var(--wb-surface-muted);
|
|
648
|
-
color: #1e293b;
|
|
649
|
-
font-weight: 600;
|
|
650
|
-
}
|
|
651
|
-
|
|
652
631
|
/* ── GeneratingOverlay ──────────────────────────────── */
|
|
653
632
|
|
|
654
633
|
.generating-overlay-wrap {
|
|
@@ -707,10 +686,6 @@ button.chip:hover {
|
|
|
707
686
|
gap: 0.38rem;
|
|
708
687
|
}
|
|
709
688
|
|
|
710
|
-
.panel-scroll {
|
|
711
|
-
display: block;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
689
|
.inline-row {
|
|
715
690
|
display: flex;
|
|
716
691
|
align-items: center;
|
|
@@ -864,15 +839,15 @@ button.chip:hover {
|
|
|
864
839
|
align-items: start;
|
|
865
840
|
}
|
|
866
841
|
|
|
867
|
-
.split-layout--
|
|
842
|
+
.split-layout--media-content {
|
|
868
843
|
grid-template-columns: 84px minmax(0, 1fr);
|
|
869
844
|
}
|
|
870
845
|
|
|
871
|
-
.split-layout--
|
|
846
|
+
.split-layout--single {
|
|
872
847
|
grid-template-columns: minmax(0, 1fr);
|
|
873
848
|
}
|
|
874
849
|
|
|
875
|
-
.split-layout--
|
|
850
|
+
.split-layout--media-content-actions {
|
|
876
851
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
877
852
|
align-items: center;
|
|
878
853
|
gap: var(--wb-gap-lg);
|
|
@@ -939,13 +914,6 @@ button.chip:hover {
|
|
|
939
914
|
|
|
940
915
|
/* ── Typography ─────────────────────────────────────── */
|
|
941
916
|
|
|
942
|
-
.text-truncate {
|
|
943
|
-
overflow: hidden;
|
|
944
|
-
text-overflow: ellipsis;
|
|
945
|
-
white-space: nowrap;
|
|
946
|
-
min-width: 0;
|
|
947
|
-
}
|
|
948
|
-
|
|
949
917
|
.text-muted {
|
|
950
918
|
color: var(--wb-text-muted);
|
|
951
919
|
}
|
|
@@ -958,13 +926,13 @@ button.chip:hover {
|
|
|
958
926
|
font-size: var(--wb-fs-sm);
|
|
959
927
|
}
|
|
960
928
|
|
|
961
|
-
.
|
|
929
|
+
.card-title {
|
|
962
930
|
font-size: var(--wb-fs-sm);
|
|
963
931
|
font-weight: 600;
|
|
964
932
|
word-break: break-word;
|
|
965
933
|
}
|
|
966
934
|
|
|
967
|
-
.
|
|
935
|
+
.card-title--clamp {
|
|
968
936
|
display: -webkit-box;
|
|
969
937
|
overflow: hidden;
|
|
970
938
|
-webkit-line-clamp: 2;
|
|
@@ -972,10 +940,6 @@ button.chip:hover {
|
|
|
972
940
|
min-height: 2.1em;
|
|
973
941
|
}
|
|
974
942
|
|
|
975
|
-
.story-title {
|
|
976
|
-
font-size: 0.88rem;
|
|
977
|
-
}
|
|
978
|
-
|
|
979
943
|
.page-title {
|
|
980
944
|
font-size: 1.1rem;
|
|
981
945
|
font-weight: 600;
|
|
@@ -1038,28 +1002,11 @@ button.chip:hover {
|
|
|
1038
1002
|
|
|
1039
1003
|
/* ── PickerGrid / PickerCard ────────────────────────── */
|
|
1040
1004
|
|
|
1041
|
-
.picker-search {
|
|
1042
|
-
display: grid;
|
|
1043
|
-
gap: var(--wb-gap-lg);
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
1005
|
.picker-grid {
|
|
1047
1006
|
display: grid;
|
|
1048
1007
|
gap: 0.4rem;
|
|
1049
1008
|
}
|
|
1050
1009
|
|
|
1051
|
-
.picker-grid--elements {
|
|
1052
|
-
grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
.picker-grid--characters {
|
|
1056
|
-
grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
.picker-grid--library {
|
|
1060
|
-
grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
1010
|
.picker-card {
|
|
1064
1011
|
width: 100%;
|
|
1065
1012
|
border: 1px solid var(--wb-border);
|
|
@@ -1079,16 +1026,6 @@ button.chip:hover {
|
|
|
1079
1026
|
cursor: default;
|
|
1080
1027
|
}
|
|
1081
1028
|
|
|
1082
|
-
.picker-card-content {
|
|
1083
|
-
min-width: 0;
|
|
1084
|
-
align-content: start;
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
.picker-card-thumb {
|
|
1088
|
-
width: 100%;
|
|
1089
|
-
aspect-ratio: 1 / 1;
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
1029
|
/* ── Skeleton ───────────────────────────────────────── */
|
|
1093
1030
|
|
|
1094
1031
|
.skeleton {
|
|
@@ -1131,33 +1068,6 @@ button.chip:hover {
|
|
|
1131
1068
|
border-radius: var(--wb-radius-sm);
|
|
1132
1069
|
}
|
|
1133
1070
|
|
|
1134
|
-
.skeleton-btn--short {
|
|
1135
|
-
width: 42%;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
.skeleton-btn--back {
|
|
1139
|
-
width: 36%;
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
.skeleton-btn--header-back {
|
|
1143
|
-
width: 100%;
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
.skeleton-btn--tiny {
|
|
1147
|
-
width: 78px;
|
|
1148
|
-
height: 22px;
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
.skeleton-btn--story-action {
|
|
1152
|
-
width: 82px;
|
|
1153
|
-
height: 24px;
|
|
1154
|
-
flex: 0 0 auto;
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
.skeleton-choice {
|
|
1158
|
-
height: 36px;
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
1071
|
.skeleton-chip {
|
|
1162
1072
|
width: 58px;
|
|
1163
1073
|
height: 16px;
|
|
@@ -1178,14 +1088,6 @@ button.chip:hover {
|
|
|
1178
1088
|
margin-inline: auto;
|
|
1179
1089
|
}
|
|
1180
1090
|
|
|
1181
|
-
.skeleton-header-title {
|
|
1182
|
-
width: 86%;
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
.skeleton-header-title--short {
|
|
1186
|
-
width: 58%;
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
1091
|
.skeleton-line {
|
|
1190
1092
|
width: 100%;
|
|
1191
1093
|
height: 10px;
|
|
@@ -1216,51 +1118,12 @@ button.chip:hover {
|
|
|
1216
1118
|
height: 1.9rem;
|
|
1217
1119
|
}
|
|
1218
1120
|
|
|
1219
|
-
.skeleton-style-preview {
|
|
1220
|
-
width: 100%;
|
|
1221
|
-
max-width: none;
|
|
1222
|
-
aspect-ratio: 1 / 1;
|
|
1223
|
-
}
|
|
1224
|
-
|
|
1225
1121
|
.skeleton-canvas {
|
|
1226
1122
|
width: 100%;
|
|
1227
1123
|
height: 100%;
|
|
1228
1124
|
border-radius: 0;
|
|
1229
1125
|
}
|
|
1230
1126
|
|
|
1231
|
-
.skeleton-field {
|
|
1232
|
-
height: 32px;
|
|
1233
|
-
}
|
|
1234
|
-
|
|
1235
|
-
.skeleton-coord {
|
|
1236
|
-
height: 26px;
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
.skeleton-meta-line {
|
|
1240
|
-
width: 92%;
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
.skeleton-meta-item {
|
|
1244
|
-
width: 62px;
|
|
1245
|
-
height: 10px;
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
|
-
.skeleton-meta-dot {
|
|
1249
|
-
width: 6px;
|
|
1250
|
-
height: 6px;
|
|
1251
|
-
border-radius: var(--wb-radius-pill);
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
.skeleton-meta-item--short {
|
|
1255
|
-
width: 38px;
|
|
1256
|
-
height: 10px;
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
.skeleton-page-tab-line {
|
|
1260
|
-
width: 74%;
|
|
1261
|
-
margin-inline: auto;
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
1127
|
@keyframes skeleton-shimmer {
|
|
1265
1128
|
100% {
|
|
1266
1129
|
transform: translateX(100%);
|
|
@@ -1387,17 +1250,17 @@ button.chip:hover {
|
|
|
1387
1250
|
min-width: 1.72rem;
|
|
1388
1251
|
min-height: 1.72rem;
|
|
1389
1252
|
padding: 0;
|
|
1390
|
-
border: 1px solid
|
|
1253
|
+
border: 1px solid var(--wb-border);
|
|
1391
1254
|
border-radius: var(--wb-radius-pill);
|
|
1392
1255
|
color: var(--wb-text-primary);
|
|
1393
|
-
background: color-mix(in srgb,
|
|
1394
|
-
box-shadow:
|
|
1256
|
+
background: color-mix(in srgb, var(--wb-surface) 88%, var(--wb-surface-muted));
|
|
1257
|
+
box-shadow: var(--wb-shadow-soft);
|
|
1395
1258
|
backdrop-filter: blur(5px);
|
|
1396
1259
|
cursor: pointer;
|
|
1397
1260
|
}
|
|
1398
1261
|
|
|
1399
1262
|
.overlay-icon-btn:hover:not(:disabled) {
|
|
1400
|
-
background: color-mix(in srgb,
|
|
1263
|
+
background: color-mix(in srgb, var(--wb-surface) 82%, var(--wb-surface-muted));
|
|
1401
1264
|
transform: none;
|
|
1402
1265
|
}
|
|
1403
1266
|
|
|
@@ -1405,17 +1268,6 @@ button.chip:hover {
|
|
|
1405
1268
|
opacity: 0.55;
|
|
1406
1269
|
}
|
|
1407
1270
|
|
|
1408
|
-
[data-theme="dark"] .overlay-icon-btn {
|
|
1409
|
-
color: var(--wb-text-primary);
|
|
1410
|
-
background: color-mix(in srgb, var(--wb-surface) 90%, var(--wb-surface-soft));
|
|
1411
|
-
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
|
1412
|
-
border-color: var(--wb-border);
|
|
1413
|
-
}
|
|
1414
|
-
|
|
1415
|
-
[data-theme="dark"] .overlay-icon-btn:hover:not(:disabled) {
|
|
1416
|
-
background: color-mix(in srgb, var(--wb-surface-soft) 80%, var(--wb-surface));
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
1271
|
.overlay-icon-btn--top-right {
|
|
1420
1272
|
top: 0.5rem;
|
|
1421
1273
|
right: 0.5rem;
|
|
@@ -1451,8 +1303,8 @@ button.chip:hover {
|
|
|
1451
1303
|
bottom: 4.9rem;
|
|
1452
1304
|
}
|
|
1453
1305
|
|
|
1454
|
-
.split-layout--
|
|
1455
|
-
.split-layout--
|
|
1306
|
+
.split-layout--media-content,
|
|
1307
|
+
.split-layout--media-content-actions {
|
|
1456
1308
|
grid-template-columns: 1fr;
|
|
1457
1309
|
}
|
|
1458
1310
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@objectifthunes/whiteboard",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Pan/zoom whiteboard canvas with draggable panels, minimap, snap-to-grid, and zoom controls",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,12 +20,6 @@
|
|
|
20
20
|
"sideEffects": [
|
|
21
21
|
"*.css"
|
|
22
22
|
],
|
|
23
|
-
"scripts": {
|
|
24
|
-
"build": "vite build",
|
|
25
|
-
"dev": "vite build --watch",
|
|
26
|
-
"typecheck": "tsc --noEmit",
|
|
27
|
-
"prepack": "pnpm run build"
|
|
28
|
-
},
|
|
29
23
|
"peerDependencies": {
|
|
30
24
|
"react": ">=18",
|
|
31
25
|
"react-dom": ">=18",
|
|
@@ -40,5 +34,10 @@
|
|
|
40
34
|
"vite": "^6.0.0",
|
|
41
35
|
"vite-plugin-dts": "^4.0.0",
|
|
42
36
|
"zustand": "^4.5.0"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "vite build",
|
|
40
|
+
"dev": "vite build --watch",
|
|
41
|
+
"typecheck": "tsc --noEmit"
|
|
43
42
|
}
|
|
44
|
-
}
|
|
43
|
+
}
|