@miadi/stateloom-canvas 0.1.6 → 0.1.9
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/CompanionDock.d.ts +56 -5
- package/dist/CompanionDock.js +35 -11
- package/dist/MarkCards.d.ts +52 -7
- package/dist/MarkCards.js +59 -15
- package/dist/StageCaption.d.ts +22 -6
- package/dist/StageCaption.js +6 -3
- package/dist/StageOverlay.d.ts +17 -2
- package/dist/StageOverlay.js +43 -5
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +4 -0
- package/dist/index.d.ts +11 -6
- package/dist/index.js +17 -3
- package/dist/marksRead.d.ts +12 -0
- package/dist/marksRead.js +64 -0
- package/dist/names.d.ts +48 -0
- package/dist/names.js +90 -0
- package/dist/pins.d.ts +50 -0
- package/dist/pins.js +108 -0
- package/dist/styles.css +236 -22
- package/package.json +4 -2
package/dist/styles.css
CHANGED
|
@@ -633,7 +633,8 @@
|
|
|
633
633
|
|
|
634
634
|
.slc-stage,
|
|
635
635
|
.slc-stage-caption,
|
|
636
|
-
.slc-stage-card
|
|
636
|
+
.slc-stage-card,
|
|
637
|
+
.slc-stage-notice {
|
|
637
638
|
--slc-accent: #3b82f6;
|
|
638
639
|
--slc-accent-fill: #1e3a5f;
|
|
639
640
|
--slc-accent-ink: #93c5fd;
|
|
@@ -738,6 +739,21 @@
|
|
|
738
739
|
.slc-stage-pin--open { background: var(--slc-mark-open); }
|
|
739
740
|
.slc-stage-pin--selected { outline: 3px solid var(--slc-label); outline-offset: 1px; z-index: 2; }
|
|
740
741
|
|
|
742
|
+
/* An agent's word not yet opened: a quiet ring and a dot, over whichever colour the pin has. */
|
|
743
|
+
.slc-stage-pin--new { box-shadow: 0 0 0 3px rgb(255 255 255 / 0.22), 0 2px 6px rgb(0 0 0 / 0.45); }
|
|
744
|
+
.slc-stage-pin--new::after {
|
|
745
|
+
content: "";
|
|
746
|
+
position: absolute;
|
|
747
|
+
left: -4px;
|
|
748
|
+
top: -4px;
|
|
749
|
+
width: 9px;
|
|
750
|
+
height: 9px;
|
|
751
|
+
border-radius: 50%;
|
|
752
|
+
background: var(--slc-label);
|
|
753
|
+
border: 1.5px solid var(--slc-panel-bg, #111827);
|
|
754
|
+
}
|
|
755
|
+
.slc-stage-pin--inline.slc-stage-pin--new { position: relative; }
|
|
756
|
+
|
|
741
757
|
.slc-stage-pin--inline {
|
|
742
758
|
position: static;
|
|
743
759
|
transform: none;
|
|
@@ -787,7 +803,7 @@
|
|
|
787
803
|
|
|
788
804
|
.slc-stage-caption-head {
|
|
789
805
|
display: flex;
|
|
790
|
-
align-items:
|
|
806
|
+
align-items: flex-start;
|
|
791
807
|
gap: 8px;
|
|
792
808
|
min-width: 0;
|
|
793
809
|
font-size: 11px;
|
|
@@ -803,17 +819,49 @@
|
|
|
803
819
|
font-weight: 600;
|
|
804
820
|
}
|
|
805
821
|
|
|
822
|
+
/* The step's own title, then its place and the tour's name on the line under it. */
|
|
823
|
+
.slc-stage-caption-heading {
|
|
824
|
+
flex: 1;
|
|
825
|
+
min-width: 0;
|
|
826
|
+
display: flex;
|
|
827
|
+
flex-direction: column;
|
|
828
|
+
gap: 1px;
|
|
829
|
+
margin-top: 1px;
|
|
830
|
+
}
|
|
831
|
+
|
|
806
832
|
.slc-stage-caption-title {
|
|
833
|
+
color: var(--slc-label);
|
|
834
|
+
font-size: 13px;
|
|
835
|
+
font-weight: 600;
|
|
836
|
+
line-height: 1.3;
|
|
837
|
+
display: -webkit-box;
|
|
838
|
+
-webkit-line-clamp: 2;
|
|
839
|
+
-webkit-box-orient: vertical;
|
|
840
|
+
overflow: hidden;
|
|
841
|
+
overflow-wrap: anywhere;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
.slc-stage-caption-count {
|
|
807
845
|
min-width: 0;
|
|
808
|
-
flex: 1;
|
|
809
846
|
overflow: hidden;
|
|
810
847
|
text-overflow: ellipsis;
|
|
811
848
|
white-space: nowrap;
|
|
812
|
-
|
|
813
|
-
font-weight: 600;
|
|
849
|
+
font-variant-numeric: tabular-nums;
|
|
814
850
|
}
|
|
815
851
|
|
|
816
|
-
.slc-stage-caption-
|
|
852
|
+
.slc-stage-caption-origin { margin-top: 1px; }
|
|
853
|
+
|
|
854
|
+
/* The step is about a drawing that is not on the board. */
|
|
855
|
+
.slc-stage-caption-held {
|
|
856
|
+
margin: 0;
|
|
857
|
+
padding: 5px 8px;
|
|
858
|
+
border-radius: 8px;
|
|
859
|
+
background: rgb(255 255 255 / 0.05);
|
|
860
|
+
color: var(--slc-muted);
|
|
861
|
+
font-size: 12.5px;
|
|
862
|
+
line-height: 1.35;
|
|
863
|
+
}
|
|
864
|
+
.slc-stage-caption-held strong { color: var(--slc-label); font-weight: 600; }
|
|
817
865
|
|
|
818
866
|
.slc-stage-caption-speaking {
|
|
819
867
|
flex: none;
|
|
@@ -837,20 +885,39 @@
|
|
|
837
885
|
white-space: pre-wrap;
|
|
838
886
|
}
|
|
839
887
|
|
|
840
|
-
.slc-stage-dots { display: flex; flex-wrap: wrap; gap:
|
|
888
|
+
.slc-stage-dots { display: flex; flex-wrap: wrap; gap: 0; margin: 0 -3px; }
|
|
841
889
|
|
|
890
|
+
/* The button is the hit area; the dot is drawn inside it. */
|
|
842
891
|
.slc-stage-dot {
|
|
892
|
+
display: inline-flex;
|
|
893
|
+
align-items: center;
|
|
894
|
+
justify-content: center;
|
|
895
|
+
width: 15px;
|
|
896
|
+
height: 15px;
|
|
897
|
+
padding: 0;
|
|
898
|
+
border: 0;
|
|
899
|
+
background: transparent;
|
|
900
|
+
cursor: pointer;
|
|
901
|
+
}
|
|
902
|
+
.slc-stage-dot::before {
|
|
903
|
+
content: "";
|
|
904
|
+
box-sizing: border-box;
|
|
843
905
|
width: 9px;
|
|
844
906
|
height: 9px;
|
|
845
|
-
padding: 0;
|
|
846
907
|
border-radius: 50%;
|
|
847
908
|
border: 1px solid var(--slc-faint);
|
|
848
|
-
background: transparent;
|
|
849
|
-
cursor: pointer;
|
|
850
909
|
}
|
|
851
910
|
|
|
852
|
-
.slc-stage-dot--seen { background: var(--slc-faint); }
|
|
853
|
-
.slc-stage-dot--current { background: var(--slc-stage-light); border-color: var(--slc-stage-light); }
|
|
911
|
+
.slc-stage-dot--seen::before { background: var(--slc-faint); }
|
|
912
|
+
.slc-stage-dot--current::before { background: var(--slc-stage-light); border-color: var(--slc-stage-light); }
|
|
913
|
+
|
|
914
|
+
/* Under a finger each dot is a 44 px target; past seven steps the count and the arrows say where the tour stands. */
|
|
915
|
+
@media (pointer: coarse) {
|
|
916
|
+
.slc-stage-dots { margin: -6px -14px; }
|
|
917
|
+
.slc-stage-dot { width: 44px; height: 44px; }
|
|
918
|
+
.slc-stage-dot::before { width: 10px; height: 10px; }
|
|
919
|
+
.slc-stage-dots--many { display: none; }
|
|
920
|
+
}
|
|
854
921
|
|
|
855
922
|
.slc-stage-caption-controls,
|
|
856
923
|
.slc-stage-card-row {
|
|
@@ -891,7 +958,7 @@
|
|
|
891
958
|
.slc-stage-btn--answer { border-color: var(--slc-mark-open); color: var(--slc-mark-open); }
|
|
892
959
|
|
|
893
960
|
@media (pointer: coarse) {
|
|
894
|
-
.slc-stage-btn { min-height:
|
|
961
|
+
.slc-stage-btn { min-height: 44px; min-width: 44px; font-size: 15px; }
|
|
895
962
|
}
|
|
896
963
|
|
|
897
964
|
/* Cards: the composer, a thread, the list of marks. */
|
|
@@ -916,6 +983,72 @@
|
|
|
916
983
|
.slc-stage-card-label { color: var(--slc-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
|
|
917
984
|
.slc-stage-card-anchor { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
|
|
918
985
|
.slc-stage-card-error { color: var(--slc-danger); font-size: 12px; }
|
|
986
|
+
/* Who will answer the marks: the host's one line, quiet. */
|
|
987
|
+
.slc-stage-card-note { color: var(--slc-muted); font-size: 12px; line-height: 1.35; }
|
|
988
|
+
|
|
989
|
+
/* "new" beside a listed mark whose agent's word is not yet read. */
|
|
990
|
+
.slc-stage-new {
|
|
991
|
+
display: inline-block;
|
|
992
|
+
margin-right: 6px;
|
|
993
|
+
padding: 0 6px;
|
|
994
|
+
border-radius: 999px;
|
|
995
|
+
border: 1px solid var(--slc-mark-answered);
|
|
996
|
+
color: var(--slc-label);
|
|
997
|
+
font-size: 10px;
|
|
998
|
+
line-height: 15px;
|
|
999
|
+
text-transform: lowercase;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
/* One line when an agent answers: near the board's controls, never over the board. */
|
|
1003
|
+
.slc-stage-notice {
|
|
1004
|
+
display: inline-flex;
|
|
1005
|
+
align-items: center;
|
|
1006
|
+
max-width: 100%;
|
|
1007
|
+
min-width: 0;
|
|
1008
|
+
border-radius: 999px;
|
|
1009
|
+
border: 1px solid var(--slc-mark-answered);
|
|
1010
|
+
background: var(--slc-panel-bg);
|
|
1011
|
+
color: var(--slc-label);
|
|
1012
|
+
box-shadow: 0 6px 18px rgb(0 0 0 / 0.45);
|
|
1013
|
+
backdrop-filter: blur(6px);
|
|
1014
|
+
pointer-events: auto;
|
|
1015
|
+
}
|
|
1016
|
+
.slc-stage-notice-open {
|
|
1017
|
+
display: inline-flex;
|
|
1018
|
+
align-items: center;
|
|
1019
|
+
gap: 7px;
|
|
1020
|
+
min-width: 0;
|
|
1021
|
+
min-height: 34px;
|
|
1022
|
+
padding: 0 4px 0 12px;
|
|
1023
|
+
border: 0;
|
|
1024
|
+
background: transparent;
|
|
1025
|
+
color: inherit;
|
|
1026
|
+
font: 500 13px/1.2 ui-sans-serif, system-ui, sans-serif;
|
|
1027
|
+
cursor: pointer;
|
|
1028
|
+
}
|
|
1029
|
+
.slc-stage-notice-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1030
|
+
.slc-stage-notice-dot {
|
|
1031
|
+
flex: none;
|
|
1032
|
+
width: 8px;
|
|
1033
|
+
height: 8px;
|
|
1034
|
+
border-radius: 50%;
|
|
1035
|
+
background: var(--slc-mark-answered);
|
|
1036
|
+
}
|
|
1037
|
+
.slc-stage-notice-close {
|
|
1038
|
+
flex: none;
|
|
1039
|
+
display: inline-flex;
|
|
1040
|
+
align-items: center;
|
|
1041
|
+
justify-content: center;
|
|
1042
|
+
width: 30px;
|
|
1043
|
+
height: 30px;
|
|
1044
|
+
margin-right: 2px;
|
|
1045
|
+
border: 0;
|
|
1046
|
+
border-radius: 999px;
|
|
1047
|
+
background: transparent;
|
|
1048
|
+
color: var(--slc-muted);
|
|
1049
|
+
cursor: pointer;
|
|
1050
|
+
}
|
|
1051
|
+
.slc-stage-notice-close:hover { color: var(--slc-label); }
|
|
919
1052
|
|
|
920
1053
|
.slc-stage-chip {
|
|
921
1054
|
padding: 1px 7px;
|
|
@@ -944,6 +1077,11 @@
|
|
|
944
1077
|
|
|
945
1078
|
.slc-stage-thread-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
|
|
946
1079
|
|
|
1080
|
+
/* A thread scrolls its words and keeps the reply row in reach at the card's bottom. */
|
|
1081
|
+
.slc-stage-thread { overflow: hidden; }
|
|
1082
|
+
.slc-stage-thread > * { flex: none; }
|
|
1083
|
+
.slc-stage-thread > .slc-stage-thread-list { flex: 1 1 auto; min-height: 3.5em; overflow-y: auto; overscroll-behavior: contain; }
|
|
1084
|
+
|
|
947
1085
|
.slc-stage-said {
|
|
948
1086
|
display: flex;
|
|
949
1087
|
flex-direction: column;
|
|
@@ -1049,6 +1187,29 @@
|
|
|
1049
1187
|
|
|
1050
1188
|
.slc-talk-fab--speaking { border-color: var(--slc-stage-light); box-shadow: 0 0 0 3px rgb(251 191 36 / 0.25); }
|
|
1051
1189
|
|
|
1190
|
+
/* Closed, on a phone: the handle of the sheet at the bottom of the board, in words. */
|
|
1191
|
+
.slc-talk--bar { width: 100%; }
|
|
1192
|
+
.slc-talk-bar {
|
|
1193
|
+
display: flex;
|
|
1194
|
+
align-items: center;
|
|
1195
|
+
gap: 8px;
|
|
1196
|
+
width: 100%;
|
|
1197
|
+
min-height: 44px;
|
|
1198
|
+
padding: 0 12px;
|
|
1199
|
+
border-radius: 12px;
|
|
1200
|
+
border: 1px solid var(--slc-panel-border);
|
|
1201
|
+
background: var(--slc-panel-bg);
|
|
1202
|
+
color: var(--slc-label);
|
|
1203
|
+
font: 600 14px ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
1204
|
+
text-align: left;
|
|
1205
|
+
cursor: pointer;
|
|
1206
|
+
box-shadow: 0 8px 24px rgb(0 0 0 / 0.45);
|
|
1207
|
+
backdrop-filter: blur(6px);
|
|
1208
|
+
}
|
|
1209
|
+
.slc-talk-bar-title { flex: none; white-space: nowrap; }
|
|
1210
|
+
.slc-talk-bar--live { background: var(--slc-talk-live); border-color: var(--slc-talk-live); color: white; animation: slc-talk-ring 1.4s ease-in-out infinite; }
|
|
1211
|
+
.slc-talk-bar--speaking { border-color: var(--slc-stage-light); }
|
|
1212
|
+
|
|
1052
1213
|
.slc-talk-fab-clock { font: 700 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: white; }
|
|
1053
1214
|
|
|
1054
1215
|
.slc-talk-fab-badge {
|
|
@@ -1083,19 +1244,25 @@
|
|
|
1083
1244
|
.slc-talk-head { display: flex; align-items: center; gap: 8px; }
|
|
1084
1245
|
.slc-talk-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
|
|
1085
1246
|
|
|
1086
|
-
.
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1247
|
+
/* Who is in the room, in words: "listening", "answering take 12", "away". */
|
|
1248
|
+
.slc-talk-state {
|
|
1249
|
+
min-width: 0;
|
|
1250
|
+
overflow: hidden;
|
|
1251
|
+
text-overflow: ellipsis;
|
|
1252
|
+
white-space: nowrap;
|
|
1253
|
+
padding: 1px 8px;
|
|
1254
|
+
border-radius: 999px;
|
|
1255
|
+
border: 1px solid rgb(34 197 94 / 0.5);
|
|
1256
|
+
color: #86efac;
|
|
1257
|
+
font-size: 11.5px;
|
|
1258
|
+
font-weight: 500;
|
|
1092
1259
|
}
|
|
1093
|
-
|
|
1094
|
-
.slc-talk-presence--away { background: var(--slc-faint); box-shadow: none; }
|
|
1260
|
+
.slc-talk-state--away { border-color: var(--slc-panel-border); color: var(--slc-muted); }
|
|
1095
1261
|
|
|
1096
1262
|
.slc-talk-episode { width: 100%; }
|
|
1097
1263
|
.slc-talk-meta { color: var(--slc-muted); font-size: 12px; line-height: 1.4; }
|
|
1098
|
-
|
|
1264
|
+
/* Amber is kept for what waits on the companion; "nobody is listening" is said quietly. */
|
|
1265
|
+
.slc-talk-meta--away { color: var(--slc-muted); }
|
|
1099
1266
|
.slc-talk-meta--error { color: var(--slc-danger); }
|
|
1100
1267
|
|
|
1101
1268
|
.slc-talk-notice {
|
|
@@ -1155,6 +1322,52 @@
|
|
|
1155
1322
|
}
|
|
1156
1323
|
|
|
1157
1324
|
.slc-talk-entry--reply { border-left-color: var(--slc-mark-question); background: rgb(167 139 250 / 0.07); }
|
|
1325
|
+
|
|
1326
|
+
/* A mark on one of the episode's drawings: the whole entry opens that drawing at that mark. */
|
|
1327
|
+
.slc-talk-entry--mark { padding: 0; border-left-color: var(--slc-panel-border); }
|
|
1328
|
+
.slc-talk-entry--waits { border-left-color: var(--slc-mark-open); }
|
|
1329
|
+
.slc-talk-mark {
|
|
1330
|
+
display: flex;
|
|
1331
|
+
flex-direction: column;
|
|
1332
|
+
gap: 3px;
|
|
1333
|
+
width: 100%;
|
|
1334
|
+
padding: 7px 9px;
|
|
1335
|
+
border: 0;
|
|
1336
|
+
border-radius: 10px;
|
|
1337
|
+
background: transparent;
|
|
1338
|
+
color: var(--slc-label);
|
|
1339
|
+
font: inherit;
|
|
1340
|
+
text-align: left;
|
|
1341
|
+
cursor: pointer;
|
|
1342
|
+
}
|
|
1343
|
+
.slc-talk-mark:hover:not(:disabled) { background: rgb(255 255 255 / 0.04); }
|
|
1344
|
+
.slc-talk-mark:disabled { cursor: default; }
|
|
1345
|
+
.slc-talk-mark > span { display: flex; }
|
|
1346
|
+
.slc-talk-mark > .slc-talk-text { display: block; }
|
|
1347
|
+
.slc-talk-mark-head { flex: 1; min-width: 0; color: var(--slc-muted); overflow-wrap: anywhere; }
|
|
1348
|
+
.slc-talk-mark-head strong { color: var(--slc-label); }
|
|
1349
|
+
.slc-talk-mark-replies { flex-direction: column; gap: 6px; margin-top: 3px; padding-left: 9px; border-left: 2px solid var(--slc-panel-border); }
|
|
1350
|
+
.slc-talk-mark-reply { display: flex; flex-direction: column; gap: 1px; }
|
|
1351
|
+
.slc-talk-mark-by { font-size: 11px; font-weight: 600; color: var(--slc-muted); }
|
|
1352
|
+
.slc-talk-mark-reply--agent .slc-talk-mark-by { color: var(--slc-mark-question); }
|
|
1353
|
+
.slc-talk-mark-state { margin-top: 2px; font-size: 11.5px; color: var(--slc-muted); }
|
|
1354
|
+
.slc-talk-mark-state--waits { color: var(--slc-mark-open); }
|
|
1355
|
+
|
|
1356
|
+
/* A reply that answers a mark says which, and opens it. */
|
|
1357
|
+
.slc-talk-answers {
|
|
1358
|
+
display: inline-flex;
|
|
1359
|
+
align-items: center;
|
|
1360
|
+
gap: 5px;
|
|
1361
|
+
align-self: flex-start;
|
|
1362
|
+
padding: 0;
|
|
1363
|
+
border: 0;
|
|
1364
|
+
background: transparent;
|
|
1365
|
+
color: var(--slc-accent-ink);
|
|
1366
|
+
font: 11.5px ui-sans-serif, system-ui, sans-serif;
|
|
1367
|
+
text-align: left;
|
|
1368
|
+
cursor: pointer;
|
|
1369
|
+
}
|
|
1370
|
+
.slc-talk-answers:disabled { cursor: default; color: var(--slc-muted); }
|
|
1158
1371
|
.slc-talk-entry--new { box-shadow: inset 0 0 0 1px var(--slc-mark-question); }
|
|
1159
1372
|
|
|
1160
1373
|
.slc-talk-who { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--slc-muted); }
|
|
@@ -1238,6 +1451,7 @@
|
|
|
1238
1451
|
.slc-talk-step-say { line-height: 1.4; overflow-wrap: anywhere; }
|
|
1239
1452
|
|
|
1240
1453
|
@media (pointer: coarse) {
|
|
1454
|
+
.slc-talk-answers { min-height: 32px; }
|
|
1241
1455
|
.slc-talk-play { min-height: 34px; min-width: 40px; }
|
|
1242
1456
|
.slc-talk-thumb { min-width: 36px; min-height: 36px; }
|
|
1243
1457
|
.slc-talk-step { padding: 8px 6px; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miadi/stateloom-canvas",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "The reusable SMDF design surface: a pannable, zoomable, drillable React SVG canvas with routed edges, settled labels and a navigation HUD",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "tsc && node scripts/copy-styles.mjs",
|
|
28
|
+
"test": "node --test dist/tests/*.test.js",
|
|
28
29
|
"clean": "rm -rf dist"
|
|
29
30
|
},
|
|
30
31
|
"keywords": [
|
|
@@ -43,12 +44,13 @@
|
|
|
43
44
|
"node": ">=20"
|
|
44
45
|
},
|
|
45
46
|
"dependencies": {
|
|
46
|
-
"@miadi/stateloom-protocol": "^0.1.
|
|
47
|
+
"@miadi/stateloom-protocol": "^0.1.16"
|
|
47
48
|
},
|
|
48
49
|
"peerDependencies": {
|
|
49
50
|
"react": "^19"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
53
|
+
"@types/node": "^22",
|
|
52
54
|
"@types/react": "^19",
|
|
53
55
|
"react": "^19",
|
|
54
56
|
"typescript": "^5.7"
|