noteloom 0.3.0 → 0.3.2

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
@@ -2767,6 +2767,288 @@ tr.be-table-row:hover .be-table-delete-row {
2767
2767
  }
2768
2768
  }
2769
2769
 
2770
+ /* --- version history: trigger button + drawer (VersionHistory) --- */
2771
+
2772
+ .be-version-history-trigger {
2773
+ display: inline-flex;
2774
+ align-items: center;
2775
+ gap: 6px;
2776
+ border: 1px solid var(--noteloom-border);
2777
+ background: var(--noteloom-bg);
2778
+ color: var(--noteloom-text);
2779
+ border-radius: var(--noteloom-radius-md);
2780
+ padding: 5px 10px;
2781
+ font-size: 0.85rem;
2782
+ cursor: pointer;
2783
+ }
2784
+
2785
+ .be-version-history-trigger:hover {
2786
+ background: var(--noteloom-bg-hover);
2787
+ }
2788
+
2789
+ .be-version-history-backdrop {
2790
+ position: fixed;
2791
+ inset: 0;
2792
+ background: rgba(15, 23, 42, 0.25);
2793
+ z-index: 1400;
2794
+ }
2795
+
2796
+ .be-version-history-drawer {
2797
+ position: fixed;
2798
+ top: 0;
2799
+ right: 0;
2800
+ bottom: 0;
2801
+ width: 360px;
2802
+ max-width: 100vw;
2803
+ background: var(--noteloom-bg);
2804
+ box-shadow: var(--noteloom-shadow);
2805
+ z-index: 1401;
2806
+ display: flex;
2807
+ flex-direction: column;
2808
+ }
2809
+
2810
+ .be-version-history-header {
2811
+ display: flex;
2812
+ align-items: center;
2813
+ justify-content: space-between;
2814
+ padding: 14px 16px;
2815
+ border-bottom: 1px solid var(--noteloom-border);
2816
+ font-weight: 700;
2817
+ font-size: 0.95rem;
2818
+ }
2819
+
2820
+ .be-version-history-close {
2821
+ border: none;
2822
+ background: transparent;
2823
+ color: var(--noteloom-text-muted);
2824
+ width: 24px;
2825
+ height: 24px;
2826
+ display: flex;
2827
+ align-items: center;
2828
+ justify-content: center;
2829
+ border-radius: var(--noteloom-radius-sm);
2830
+ cursor: pointer;
2831
+ }
2832
+
2833
+ .be-version-history-close:hover {
2834
+ background: var(--noteloom-bg-hover);
2835
+ color: var(--noteloom-text);
2836
+ }
2837
+
2838
+ .be-version-history-list {
2839
+ flex: 1;
2840
+ overflow-y: auto;
2841
+ padding: 8px 0;
2842
+ }
2843
+
2844
+ .be-version-history-empty {
2845
+ color: var(--noteloom-text-muted);
2846
+ font-size: 0.85rem;
2847
+ padding: 16px;
2848
+ margin: 0;
2849
+ }
2850
+
2851
+ .be-version-history-group-label {
2852
+ font-weight: 600;
2853
+ font-size: 0.78rem;
2854
+ color: var(--noteloom-text-muted);
2855
+ padding: 10px 16px 4px;
2856
+ }
2857
+
2858
+ .be-version-history-item {
2859
+ display: flex;
2860
+ align-items: center;
2861
+ gap: 10px;
2862
+ width: 100%;
2863
+ border: none;
2864
+ background: transparent;
2865
+ padding: 8px 16px;
2866
+ text-align: left;
2867
+ cursor: pointer;
2868
+ }
2869
+
2870
+ .be-version-history-item:hover {
2871
+ background: var(--noteloom-bg-hover);
2872
+ }
2873
+
2874
+ .be-version-history-item-body {
2875
+ min-width: 0;
2876
+ }
2877
+
2878
+ .be-version-history-item-author {
2879
+ font-weight: 600;
2880
+ font-size: 0.85rem;
2881
+ }
2882
+
2883
+ .be-version-history-item-meta {
2884
+ font-size: 0.78rem;
2885
+ color: var(--noteloom-text-muted);
2886
+ overflow: hidden;
2887
+ text-overflow: ellipsis;
2888
+ white-space: nowrap;
2889
+ }
2890
+
2891
+ .be-version-history-preview {
2892
+ flex: 1;
2893
+ display: flex;
2894
+ flex-direction: column;
2895
+ min-height: 0;
2896
+ }
2897
+
2898
+ .be-version-history-preview-meta {
2899
+ display: flex;
2900
+ align-items: center;
2901
+ gap: 10px;
2902
+ padding: 12px 16px;
2903
+ border-bottom: 1px solid var(--noteloom-border);
2904
+ }
2905
+
2906
+ .be-version-history-preview-author {
2907
+ font-weight: 600;
2908
+ font-size: 0.85rem;
2909
+ }
2910
+
2911
+ .be-version-history-preview-time {
2912
+ font-size: 0.78rem;
2913
+ color: var(--noteloom-text-muted);
2914
+ }
2915
+
2916
+ .be-version-history-view-toggle {
2917
+ display: flex;
2918
+ gap: 4px;
2919
+ padding: 8px 16px 0;
2920
+ }
2921
+
2922
+ .be-version-history-view-toggle button {
2923
+ border: none;
2924
+ background: transparent;
2925
+ color: var(--noteloom-text-muted);
2926
+ font-size: 0.78rem;
2927
+ font-weight: 600;
2928
+ padding: 5px 10px;
2929
+ border-radius: var(--noteloom-radius-md);
2930
+ cursor: pointer;
2931
+ }
2932
+
2933
+ .be-version-history-view-toggle button.is-active {
2934
+ background: var(--noteloom-bg-subtle);
2935
+ color: var(--noteloom-text);
2936
+ }
2937
+
2938
+ .be-version-history-diff-legend {
2939
+ display: flex;
2940
+ align-items: center;
2941
+ gap: 10px;
2942
+ padding: 10px 16px 0;
2943
+ font-size: 0.75rem;
2944
+ }
2945
+
2946
+ .be-version-history-diff-legend-note {
2947
+ color: var(--noteloom-text-muted);
2948
+ }
2949
+
2950
+ .be-version-history-preview-body {
2951
+ flex: 1;
2952
+ overflow-y: auto;
2953
+ padding: 16px;
2954
+ font-size: 0.9rem;
2955
+ line-height: 1.6;
2956
+ }
2957
+
2958
+ .be-version-history-diff-body :is(p.be-version-diff-block) {
2959
+ margin: 0 0 0.6em;
2960
+ }
2961
+
2962
+ /* Google Docs-style change highlighting: additions get a green underline/background,
2963
+ removals a struck-through red one -- self-evident at a glance, no legend required
2964
+ to understand the individual spans (the legend row above just labels the colors). */
2965
+ .be-version-diff-added {
2966
+ background: rgba(34, 197, 94, 0.18);
2967
+ color: var(--noteloom-text);
2968
+ text-decoration: underline;
2969
+ text-decoration-color: rgba(34, 197, 94, 0.6);
2970
+ border-radius: 2px;
2971
+ padding: 0 1px;
2972
+ }
2973
+
2974
+ .be-version-diff-removed {
2975
+ background: rgba(239, 68, 68, 0.14);
2976
+ color: var(--noteloom-text-muted);
2977
+ text-decoration: line-through;
2978
+ text-decoration-color: rgba(239, 68, 68, 0.6);
2979
+ border-radius: 2px;
2980
+ padding: 0 1px;
2981
+ }
2982
+
2983
+ .be-version-history-diff-legend .be-version-diff-added,
2984
+ .be-version-history-diff-legend .be-version-diff-removed {
2985
+ padding: 2px 6px;
2986
+ text-decoration: none;
2987
+ font-weight: 600;
2988
+ }
2989
+
2990
+ /* exportDocumentHTML emits plain semantic HTML (<p>/<h1-3>/<ul>/<blockquote>/...),
2991
+ not this package's own be-* block classes, so the preview needs its own
2992
+ basic typography rather than inheriting the live editor's block styling. */
2993
+ .be-version-history-preview-body :is(h1, h2, h3) {
2994
+ margin: 0.6em 0 0.3em;
2995
+ }
2996
+
2997
+ .be-version-history-preview-body p {
2998
+ margin: 0 0 0.6em;
2999
+ }
3000
+
3001
+ .be-version-history-preview-body :is(ul, ol) {
3002
+ margin: 0 0 0.6em;
3003
+ padding-left: 1.4em;
3004
+ }
3005
+
3006
+ .be-version-history-preview-body blockquote {
3007
+ margin: 0 0 0.6em;
3008
+ padding-left: 0.8em;
3009
+ border-left: 3px solid var(--noteloom-border);
3010
+ color: var(--noteloom-text-muted);
3011
+ }
3012
+
3013
+ .be-version-history-preview-body pre {
3014
+ background: var(--noteloom-bg-subtle);
3015
+ border-radius: var(--noteloom-radius-sm);
3016
+ padding: 10px;
3017
+ overflow-x: auto;
3018
+ }
3019
+
3020
+ .be-version-history-preview-actions {
3021
+ display: flex;
3022
+ justify-content: space-between;
3023
+ align-items: center;
3024
+ gap: 8px;
3025
+ padding: 12px 16px;
3026
+ border-top: 1px solid var(--noteloom-border);
3027
+ }
3028
+
3029
+ .be-version-history-preview-actions button {
3030
+ border-radius: var(--noteloom-radius-md);
3031
+ padding: 6px 12px;
3032
+ font-size: 0.82rem;
3033
+ font-weight: 600;
3034
+ cursor: pointer;
3035
+ }
3036
+
3037
+ .be-version-history-preview-actions button:first-child {
3038
+ border: 1px solid var(--noteloom-border);
3039
+ background: var(--noteloom-bg);
3040
+ color: var(--noteloom-text);
3041
+ }
3042
+
3043
+ .be-version-history-restore {
3044
+ display: flex;
3045
+ align-items: center;
3046
+ gap: 6px;
3047
+ border: none;
3048
+ background: var(--noteloom-accent);
3049
+ color: #fff;
3050
+ }
3051
+
2770
3052
  /* --- voice typing: caret-anchored listening/processing indicator --- */
2771
3053
 
2772
3054
  .be-voice-indicator {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "noteloom",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Zero-runtime-dependency, React-first block/rich-text editor — nestable content blocks, inline widgets, slash commands, undo/redo, clipboard, real-time collaborative editing (a custom CRDT over WebRTC), offline-first persistence (IndexedDB + PWA-ready), and live presence, with an optional default theme (noteloom/style.css).",
5
5
  "keywords": [
6
6
  "react",