noteloom 0.1.6 → 0.1.7

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/style.css CHANGED
@@ -753,6 +753,311 @@
753
753
  font-weight: 500;
754
754
  }
755
755
 
756
+ /* --- canvas (freehand drawing) --- */
757
+
758
+ .be-canvas {
759
+ position: relative;
760
+ display: inline-block;
761
+ margin: 0.6em 0;
762
+ line-height: 0; /* avoids extra inline-block whitespace gap below the <svg> */
763
+ }
764
+
765
+ .be-canvas-surface {
766
+ display: block;
767
+ border: 1px solid var(--noteloom-border);
768
+ border-radius: var(--noteloom-radius-lg);
769
+ background: var(--noteloom-bg);
770
+ max-width: 100%;
771
+ touch-action: none; /* the surface owns its own pointer gestures (drawing/panning), not the browser's default scroll/zoom */
772
+ }
773
+
774
+ .be-canvas-toolbar {
775
+ position: absolute;
776
+ top: 8px;
777
+ right: 8px;
778
+ z-index: 2;
779
+ display: flex;
780
+ flex-wrap: wrap;
781
+ justify-content: flex-end;
782
+ max-width: calc(100% - 16px);
783
+ align-items: center;
784
+ gap: 2px;
785
+ padding: 3px;
786
+ background: rgba(15, 23, 42, 0.72);
787
+ border-radius: var(--noteloom-radius-md);
788
+ opacity: 0;
789
+ transition: opacity 0.12s ease;
790
+ }
791
+
792
+ .be-canvas:hover .be-canvas-toolbar,
793
+ .be-canvas-toolbar:focus-within {
794
+ opacity: 1;
795
+ }
796
+
797
+ .be-canvas-toolbar-btn {
798
+ border: none;
799
+ background: transparent;
800
+ width: 26px;
801
+ height: 24px;
802
+ display: flex;
803
+ align-items: center;
804
+ justify-content: center;
805
+ color: rgba(255, 255, 255, 0.8);
806
+ border-radius: var(--noteloom-radius-sm);
807
+ cursor: pointer;
808
+ }
809
+
810
+ .be-canvas-toolbar-btn:hover {
811
+ background: rgba(255, 255, 255, 0.16);
812
+ color: #fff;
813
+ }
814
+
815
+ .be-canvas-toolbar-btn-active {
816
+ background: var(--noteloom-accent);
817
+ color: #fff;
818
+ }
819
+
820
+ .be-canvas-toolbar-btn:disabled {
821
+ opacity: 0.4;
822
+ cursor: default;
823
+ }
824
+
825
+ .be-canvas-toolbar-btn:disabled:hover {
826
+ background: transparent;
827
+ }
828
+
829
+ .be-canvas-zoom-label {
830
+ border: none;
831
+ background: transparent;
832
+ color: rgba(255, 255, 255, 0.8);
833
+ font-size: 0.75rem;
834
+ min-width: 2.8em;
835
+ padding: 0 2px;
836
+ cursor: pointer;
837
+ border-radius: var(--noteloom-radius-sm);
838
+ }
839
+
840
+ .be-canvas-zoom-label:hover {
841
+ background: rgba(255, 255, 255, 0.16);
842
+ color: #fff;
843
+ }
844
+
845
+ .be-canvas-toolbar-divider {
846
+ width: 1px;
847
+ height: 16px;
848
+ background: rgba(255, 255, 255, 0.24);
849
+ margin: 0 2px;
850
+ }
851
+
852
+ .be-canvas-toolbar-swatch {
853
+ border: 2px solid transparent;
854
+ width: 18px;
855
+ height: 18px;
856
+ border-radius: 50%;
857
+ cursor: pointer;
858
+ padding: 0;
859
+ }
860
+
861
+ .be-canvas-toolbar-swatch-active {
862
+ border-color: #fff;
863
+ }
864
+
865
+ .be-canvas-picker-wrap {
866
+ position: relative;
867
+ }
868
+
869
+ .be-canvas-picker {
870
+ position: absolute;
871
+ top: 100%;
872
+ right: 0;
873
+ margin-top: 8px;
874
+ display: flex;
875
+ align-items: center;
876
+ gap: 6px;
877
+ padding: 8px;
878
+ background: rgba(15, 23, 42, 0.92);
879
+ border-radius: var(--noteloom-radius-md);
880
+ z-index: 3;
881
+ }
882
+
883
+ .be-canvas-shape-picker {
884
+ flex-wrap: wrap;
885
+ max-width: 132px;
886
+ }
887
+
888
+ .be-canvas-color-trigger-dot {
889
+ display: block;
890
+ width: 14px;
891
+ height: 14px;
892
+ border-radius: 50%;
893
+ border: 1px solid rgba(255, 255, 255, 0.6);
894
+ }
895
+
896
+ .be-canvas-fill-trigger-dot {
897
+ display: block;
898
+ width: 14px;
899
+ height: 14px;
900
+ border-radius: 50%;
901
+ border: 1px solid rgba(255, 255, 255, 0.6);
902
+ }
903
+
904
+ .be-canvas-fill-trigger-dot-none,
905
+ .be-canvas-fill-swatch-none {
906
+ background: repeating-conic-gradient(rgba(255, 255, 255, 0.5) 0% 25%, transparent 0% 50%) 50% / 8px 8px;
907
+ }
908
+
909
+ .be-canvas-custom-swatch {
910
+ width: 18px;
911
+ height: 18px;
912
+ border-radius: 50%;
913
+ overflow: hidden;
914
+ border: 1px dashed rgba(255, 255, 255, 0.6);
915
+ display: inline-flex;
916
+ cursor: pointer;
917
+ flex-shrink: 0;
918
+ }
919
+
920
+ .be-canvas-custom-swatch input[type='color'] {
921
+ width: 150%;
922
+ height: 150%;
923
+ margin: -25%;
924
+ border: none;
925
+ padding: 0;
926
+ cursor: pointer;
927
+ background: none;
928
+ }
929
+
930
+ /* Live size-preview popover: dot grows/shrinks together with the slider as it's dragged. */
931
+ .be-canvas-size-picker {
932
+ min-width: 160px;
933
+ }
934
+
935
+ .be-canvas-size-trigger-dot {
936
+ display: block;
937
+ border-radius: 50%;
938
+ background: #fff;
939
+ }
940
+
941
+ .be-canvas-size-preview {
942
+ flex-shrink: 0;
943
+ width: 44px;
944
+ height: 44px;
945
+ display: flex;
946
+ align-items: center;
947
+ justify-content: center;
948
+ }
949
+
950
+ .be-canvas-size-preview-dot {
951
+ display: block;
952
+ border-radius: 50%;
953
+ background: #fff;
954
+ }
955
+
956
+ .be-canvas-size-slider {
957
+ flex: 1;
958
+ min-width: 80px;
959
+ }
960
+
961
+ .be-canvas-font-size-trigger {
962
+ display: block;
963
+ font-size: 13px;
964
+ font-weight: 600;
965
+ line-height: 1;
966
+ color: rgba(255, 255, 255, 0.85);
967
+ }
968
+
969
+ .be-canvas-font-size-preview-letter {
970
+ display: block;
971
+ line-height: 1;
972
+ color: #fff;
973
+ font-weight: 600;
974
+ }
975
+
976
+ .be-canvas-size-value {
977
+ flex-shrink: 0;
978
+ min-width: 2.5em;
979
+ text-align: right;
980
+ font-size: 0.8rem;
981
+ color: rgba(255, 255, 255, 0.85);
982
+ }
983
+
984
+ .be-canvas[data-tool='eraser'] .be-canvas-surface {
985
+ cursor: cell;
986
+ }
987
+
988
+ .be-canvas[data-tool='select'] .be-canvas-surface {
989
+ cursor: default;
990
+ }
991
+
992
+ .be-canvas-selection-box {
993
+ stroke: var(--noteloom-accent);
994
+ stroke-width: 1.5;
995
+ stroke-dasharray: 6 4;
996
+ vector-effect: non-scaling-stroke;
997
+ pointer-events: none;
998
+ }
999
+
1000
+ .be-canvas-selection-handle {
1001
+ fill: #fff;
1002
+ stroke: var(--noteloom-accent);
1003
+ stroke-width: 1.5;
1004
+ vector-effect: non-scaling-stroke;
1005
+ pointer-events: none;
1006
+ }
1007
+
1008
+ .be-canvas-rotate-handle {
1009
+ fill: var(--noteloom-accent);
1010
+ stroke: #fff;
1011
+ stroke-width: 1.5;
1012
+ vector-effect: non-scaling-stroke;
1013
+ pointer-events: none;
1014
+ }
1015
+
1016
+ .be-canvas-marquee {
1017
+ fill: color-mix(in srgb, var(--noteloom-accent) 12%, transparent);
1018
+ stroke: var(--noteloom-accent);
1019
+ stroke-width: 1.5;
1020
+ stroke-dasharray: 6 4;
1021
+ vector-effect: non-scaling-stroke;
1022
+ pointer-events: none;
1023
+ }
1024
+
1025
+ .be-canvas-grid-background {
1026
+ pointer-events: none;
1027
+ }
1028
+
1029
+ .be-canvas-grid-dot {
1030
+ fill: rgba(255, 255, 255, 0.18);
1031
+ }
1032
+
1033
+ .be-canvas-text-editor {
1034
+ width: 100%;
1035
+ height: 100%;
1036
+ margin: 0;
1037
+ padding: 0;
1038
+ border: 1px dashed var(--noteloom-accent);
1039
+ outline: none;
1040
+ background: transparent;
1041
+ resize: none;
1042
+ overflow: hidden;
1043
+ line-height: 1.3;
1044
+ font-family: inherit;
1045
+ white-space: pre-wrap;
1046
+ word-break: break-word;
1047
+ }
1048
+
1049
+ .be-canvas-resize-handle {
1050
+ position: absolute;
1051
+ bottom: 4px;
1052
+ right: 4px;
1053
+ width: 12px;
1054
+ height: 12px;
1055
+ cursor: nwse-resize;
1056
+ border-radius: 2px;
1057
+ border: 1px solid #fff;
1058
+ background: var(--noteloom-accent);
1059
+ }
1060
+
756
1061
  /* --- table --- */
757
1062
 
758
1063
  .be-table-scroll {
@@ -2153,6 +2458,8 @@ tr.be-table-row:hover .be-table-delete-row {
2153
2458
  .be-embed-dropzone,
2154
2459
  .be-embed-upload-btn,
2155
2460
  .be-embed-url-row,
2461
+ .be-canvas-toolbar,
2462
+ .be-canvas-resize-handle,
2156
2463
  .be-callout-color-wrap,
2157
2464
  .be-modal-overlay,
2158
2465
  .be-mobile-action-bar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "noteloom",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Zero-runtime-dependency, React-first block/rich-text editor — Notion-style blocks, inline widgets, slash commands, undo/redo, and clipboard, with an optional default theme (noteloom/style.css).",
5
5
  "keywords": [
6
6
  "react",