@lumen-stack/react 0.3.0 → 0.4.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/dist/styles.css CHANGED
@@ -143,12 +143,34 @@
143
143
  .lumen-btn-primary {
144
144
  background: var(--lumen-accent);
145
145
  color: var(--lumen-accent-fg);
146
+ box-shadow: var(--lumen-shadow-sm);
146
147
  }
147
148
  .lumen-btn-primary:hover:not(:disabled) {
148
149
  transform: translateY(-0.5px);
150
+ box-shadow:
151
+ var(--lumen-shadow-sm),
152
+ 0 4px 12px -4px rgb(0 0 0 / 0.35);
149
153
  }
150
154
  .lumen-btn-primary:active:not(:disabled) {
151
155
  transform: translateY(0.5px);
156
+ box-shadow: var(--lumen-shadow-sm);
157
+ }
158
+
159
+ /* Consistent keyboard focus ring across all interactive controls.
160
+ outline (not box-shadow) so it composes with the pressed/elevated
161
+ shadows the swatches and segmented controls already use. */
162
+ .lumen-btn:focus-visible,
163
+ .lumen-btn-primary:focus-visible,
164
+ .lumen-btn-ghost:focus-visible,
165
+ .lumen-btn-outline:focus-visible,
166
+ .lumen-icon-btn:focus-visible,
167
+ .lumen-tool:focus-visible,
168
+ .lumen-category-opt:focus-visible,
169
+ .lumen-swatch:focus-visible,
170
+ .lumen-stroke-size:focus-visible,
171
+ .lumen-notch:focus-visible {
172
+ outline: 2px solid var(--lumen-focus-ring);
173
+ outline-offset: 2px;
152
174
  }
153
175
  .lumen-btn-ghost,
154
176
  .lumen-btn-outline {
@@ -562,25 +584,21 @@
562
584
  }
563
585
  .lumen-annotate-frame {
564
586
  position: relative;
587
+ display: inline-block;
565
588
  max-width: 100%;
566
589
  max-height: 46dvh;
567
590
  border-radius: var(--lumen-r-md);
568
591
  overflow: hidden;
569
592
  box-shadow: var(--lumen-shadow-sm), 0 0 0 1px var(--lumen-border);
570
- display: grid;
571
- /* Both canvases share grid cell 1/1 and inherit our max constraints. */
572
- grid-template-columns: minmax(0, max-content);
573
- grid-template-rows: minmax(0, max-content);
574
- justify-content: center;
593
+ line-height: 0;
575
594
  }
576
595
  @media (min-width: 640px) {
577
596
  .lumen-annotate-frame { max-height: 56dvh; }
578
597
  }
579
598
  .lumen-annotate-frame canvas {
580
- grid-area: 1 / 1;
581
599
  display: block;
582
- /* Constrain by both axes so tall screenshots scale down preserving
583
- * aspect ratio without nested scroll. */
600
+ /* Base canvas dictates the rendered box; constrain by both axes so
601
+ * tall screenshots scale down preserving aspect without nested scroll. */
584
602
  max-width: 100%;
585
603
  max-height: 46dvh;
586
604
  width: auto;
@@ -591,6 +609,16 @@
591
609
  .lumen-annotate-frame canvas { max-height: 56dvh; }
592
610
  }
593
611
  .lumen-annotate-overlay {
612
+ /* Absolute over the base canvas instead of CSS-grid stacking. iOS
613
+ * Safari historically dropped touch hit-testing on the upper sibling
614
+ * in grid-stacked canvases, leaving the overlay tappable on desktop
615
+ * but inert on phones. */
616
+ position: absolute;
617
+ inset: 0;
618
+ width: 100%;
619
+ height: 100%;
620
+ max-width: none;
621
+ max-height: none;
594
622
  touch-action: none;
595
623
  cursor: crosshair;
596
624
  }
@@ -677,6 +705,10 @@ textarea.lumen-input { resize: vertical; min-height: 76px; }
677
705
  display: inline-flex;
678
706
  align-items: center;
679
707
  gap: 8px;
708
+ padding: 5px 12px 5px 10px;
709
+ background: var(--lumen-bg-elev);
710
+ border: 1px solid var(--lumen-border);
711
+ border-radius: 999px;
680
712
  font-size: var(--lumen-fs-13);
681
713
  color: var(--lumen-fg);
682
714
  font-variant-numeric: tabular-nums;
@@ -698,6 +730,31 @@ textarea.lumen-input { resize: vertical; min-height: 76px; }
698
730
  .lumen-audio-meta {
699
731
  font-size: var(--lumen-fs-13);
700
732
  color: var(--lumen-fg-muted);
733
+ font-variant-numeric: tabular-nums;
734
+ }
735
+
736
+ .lumen-rec-time {
737
+ font-variant-numeric: tabular-nums;
738
+ }
739
+
740
+ .lumen-waveform {
741
+ display: block;
742
+ width: 88px;
743
+ height: 22px;
744
+ }
745
+
746
+ .lumen-audio-preview {
747
+ display: inline-flex;
748
+ align-items: center;
749
+ gap: 8px;
750
+ flex: 1 1 auto;
751
+ min-width: 0;
752
+ }
753
+ .lumen-audio-el {
754
+ flex: 1 1 auto;
755
+ min-width: 0;
756
+ height: 36px;
757
+ max-width: 320px;
701
758
  }
702
759
 
703
760
  /* ─── Footer ─────────────────────────────────────────────────────── */
@@ -785,3 +842,220 @@ textarea.lumen-input { resize: vertical; min-height: 76px; }
785
842
  clip: rect(0 0 0 0);
786
843
  white-space: nowrap;
787
844
  }
845
+
846
+ /* ─── Wizard: stepper ────────────────────────────────────────────────── */
847
+ .lumen-pane { display: block; }
848
+ .lumen-stepper {
849
+ display: flex;
850
+ align-items: center;
851
+ gap: 8px;
852
+ padding: 10px 16px 12px;
853
+ border-bottom: 1px solid var(--lumen-border);
854
+ flex-shrink: 0;
855
+ }
856
+ .lumen-step { display: flex; align-items: center; gap: 8px; flex: 1; }
857
+ .lumen-step:last-child { flex: 0; }
858
+ .lumen-step-num {
859
+ width: 22px;
860
+ height: 22px;
861
+ border-radius: 999px;
862
+ display: grid;
863
+ place-items: center;
864
+ font-size: 12px;
865
+ font-weight: 600;
866
+ border: 1px solid var(--lumen-border-strong);
867
+ color: var(--lumen-fg-muted);
868
+ background: var(--lumen-bg-elev);
869
+ flex-shrink: 0;
870
+ transition: all var(--lumen-dur) var(--lumen-ease);
871
+ }
872
+ .lumen-step-lbl {
873
+ font-size: var(--lumen-fs-13);
874
+ color: var(--lumen-fg-subtle);
875
+ white-space: nowrap;
876
+ transition: color var(--lumen-dur) var(--lumen-ease);
877
+ }
878
+ .lumen-step-bar {
879
+ flex: 1;
880
+ height: 2px;
881
+ border-radius: 2px;
882
+ background: var(--lumen-border);
883
+ position: relative;
884
+ overflow: hidden;
885
+ }
886
+ .lumen-step-bar::after {
887
+ content: "";
888
+ position: absolute;
889
+ inset: 0;
890
+ width: 0;
891
+ background: var(--lumen-fg);
892
+ transition: width var(--lumen-dur) var(--lumen-ease);
893
+ }
894
+ .lumen-step-done .lumen-step-num {
895
+ background: var(--lumen-fg);
896
+ color: var(--lumen-accent-fg);
897
+ border-color: var(--lumen-fg);
898
+ }
899
+ .lumen-step-done .lumen-step-lbl { color: var(--lumen-fg-muted); }
900
+ .lumen-step-done .lumen-step-bar::after { width: 100%; }
901
+ .lumen-step-active .lumen-step-num {
902
+ border-color: var(--lumen-fg);
903
+ color: var(--lumen-fg);
904
+ box-shadow: 0 0 0 3px var(--lumen-focus-ring);
905
+ }
906
+ .lumen-step-active .lumen-step-lbl { color: var(--lumen-fg); font-weight: 500; }
907
+
908
+ /* ─── Wizard: step 1 capture method ──────────────────────────────────── */
909
+ .lumen-method {
910
+ display: grid;
911
+ grid-template-columns: repeat(3, 1fr);
912
+ gap: 6px;
913
+ padding: 12px 16px;
914
+ }
915
+ .lumen-method-btn {
916
+ appearance: none;
917
+ cursor: pointer;
918
+ background: var(--lumen-bg-elev);
919
+ border: 1px solid var(--lumen-border);
920
+ border-radius: var(--lumen-r-md);
921
+ color: var(--lumen-fg-muted);
922
+ padding: 10px 8px;
923
+ display: flex;
924
+ flex-direction: column;
925
+ align-items: center;
926
+ gap: 4px;
927
+ transition: all var(--lumen-dur-fast) var(--lumen-ease);
928
+ }
929
+ .lumen-method-btn:hover:not(:disabled) {
930
+ border-color: var(--lumen-border-strong);
931
+ color: var(--lumen-fg);
932
+ }
933
+ .lumen-method-btn:disabled { opacity: 0.55; cursor: default; }
934
+ .lumen-method-btn[aria-pressed="true"] {
935
+ background: var(--lumen-bg);
936
+ color: var(--lumen-fg);
937
+ border-color: var(--lumen-fg);
938
+ box-shadow: var(--lumen-shadow-sm);
939
+ }
940
+ .lumen-method-btn:focus-visible {
941
+ outline: 2px solid var(--lumen-focus-ring);
942
+ outline-offset: 2px;
943
+ }
944
+ .lumen-method-label { font-size: var(--lumen-fs-13); font-weight: 500; }
945
+ .lumen-method-hint { font-size: var(--lumen-fs-12); color: var(--lumen-fg-subtle); }
946
+ .lumen-method-btn[aria-pressed="true"] .lumen-method-hint {
947
+ color: var(--lumen-fg-muted);
948
+ }
949
+
950
+ .lumen-cap-empty {
951
+ display: flex;
952
+ flex-direction: column;
953
+ align-items: center;
954
+ gap: 12px;
955
+ text-align: center;
956
+ color: var(--lumen-fg-subtle);
957
+ font-size: var(--lumen-fs-13);
958
+ margin: 4px 16px 8px;
959
+ padding: 28px 16px;
960
+ border: 1px dashed var(--lumen-border-strong);
961
+ border-radius: var(--lumen-r-md);
962
+ background: var(--lumen-bg-elev);
963
+ }
964
+ .lumen-cap-empty p { margin: 0; max-width: 36ch; line-height: 1.45; }
965
+
966
+ .lumen-cap-actions {
967
+ display: flex;
968
+ align-items: center;
969
+ gap: 10px;
970
+ flex-wrap: wrap;
971
+ padding: 10px 16px 4px;
972
+ }
973
+ .lumen-cap-note { font-size: var(--lumen-fs-12); color: var(--lumen-fg-subtle); }
974
+
975
+ /* ─── Wizard: step 3 review ──────────────────────────────────────────── */
976
+ .lumen-review { padding: 8px 16px 16px; }
977
+ .lumen-review-row {
978
+ display: flex;
979
+ align-items: flex-start;
980
+ justify-content: space-between;
981
+ gap: 12px;
982
+ padding: 11px 0;
983
+ border-bottom: 1px solid var(--lumen-border);
984
+ }
985
+ .lumen-review-row:last-child { border-bottom: 0; }
986
+ .lumen-review-k {
987
+ font-size: var(--lumen-fs-12);
988
+ color: var(--lumen-fg-subtle);
989
+ text-transform: uppercase;
990
+ letter-spacing: 0.03em;
991
+ width: 84px;
992
+ flex-shrink: 0;
993
+ padding-top: 3px;
994
+ }
995
+ .lumen-review-v {
996
+ font-size: var(--lumen-fs-14);
997
+ color: var(--lumen-fg);
998
+ flex: 1;
999
+ display: flex;
1000
+ flex-wrap: wrap;
1001
+ align-items: center;
1002
+ gap: 8px;
1003
+ }
1004
+ .lumen-chip {
1005
+ display: inline-flex;
1006
+ align-items: center;
1007
+ gap: 6px;
1008
+ padding: 3px 10px;
1009
+ border-radius: 999px;
1010
+ background: var(--lumen-bg-elev);
1011
+ border: 1px solid var(--lumen-border);
1012
+ font-size: var(--lumen-fs-13);
1013
+ font-weight: 500;
1014
+ }
1015
+ .lumen-edit {
1016
+ background: none;
1017
+ border: 0;
1018
+ color: var(--lumen-fg-subtle);
1019
+ font: inherit;
1020
+ font-size: var(--lumen-fs-12);
1021
+ cursor: pointer;
1022
+ text-decoration: underline;
1023
+ padding: 0;
1024
+ }
1025
+ .lumen-edit:hover { color: var(--lumen-fg); }
1026
+ .lumen-muted-empty { color: var(--lumen-fg-subtle); font-style: italic; }
1027
+ .lumen-attach-row { gap: 6px; }
1028
+ .lumen-attach {
1029
+ display: inline-flex;
1030
+ align-items: center;
1031
+ gap: 6px;
1032
+ padding: 3px 9px;
1033
+ border-radius: 999px;
1034
+ background: var(--lumen-bg-elev);
1035
+ border: 1px solid var(--lumen-border);
1036
+ font-size: var(--lumen-fs-12);
1037
+ color: var(--lumen-fg-muted);
1038
+ }
1039
+ .lumen-att-x {
1040
+ background: none;
1041
+ border: 0;
1042
+ color: var(--lumen-fg-subtle);
1043
+ cursor: pointer;
1044
+ font-size: 13px;
1045
+ line-height: 1;
1046
+ padding: 0 0 0 2px;
1047
+ }
1048
+ .lumen-att-x:hover { color: var(--lumen-fg); }
1049
+ .lumen-add-btn { padding: 5px 10px; font-size: 12px; }
1050
+
1051
+ /* ─── Wizard: mobile refinements ─────────────────────────────────────── */
1052
+ @media (max-width: 640px) {
1053
+ .lumen-step:not(.lumen-step-active) .lumen-step-lbl { display: none; }
1054
+ .lumen-method-hint { display: none; }
1055
+ .lumen-modal-actions { width: 100%; }
1056
+ .lumen-modal-actions .lumen-btn-primary,
1057
+ .lumen-modal-actions .lumen-btn-ghost {
1058
+ flex: 1;
1059
+ padding: 12px 16px;
1060
+ }
1061
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumen-stack/react",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "React SDK for Lumen — screenshot capture, annotation, and feedback widget.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -39,7 +39,7 @@
39
39
  "react-dom": ">=18"
40
40
  },
41
41
  "dependencies": {
42
- "@lumen-stack/core": "workspace:^",
42
+ "@lumen-stack/core": "^0.4.0",
43
43
  "html2canvas-pro": "^1.5.8",
44
44
  "sonner": "^1.7.1"
45
45
  },