floatnote 1.0.0 → 1.0.6

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.
Files changed (68) hide show
  1. package/bin/floatnote.js +16 -0
  2. package/package.json +13 -5
  3. package/.beads/config.json +0 -6
  4. package/.beads/issues/floatnote-1.md +0 -21
  5. package/.beads/issues/floatnote-10.md +0 -28
  6. package/.beads/issues/floatnote-11.md +0 -36
  7. package/.beads/issues/floatnote-12.md +0 -25
  8. package/.beads/issues/floatnote-13.md +0 -37
  9. package/.beads/issues/floatnote-14.md +0 -22
  10. package/.beads/issues/floatnote-15.md +0 -22
  11. package/.beads/issues/floatnote-16.md +0 -20
  12. package/.beads/issues/floatnote-17.md +0 -20
  13. package/.beads/issues/floatnote-18.md +0 -21
  14. package/.beads/issues/floatnote-19.md +0 -19
  15. package/.beads/issues/floatnote-2.md +0 -32
  16. package/.beads/issues/floatnote-20.md +0 -22
  17. package/.beads/issues/floatnote-3.md +0 -50
  18. package/.beads/issues/floatnote-4.md +0 -31
  19. package/.beads/issues/floatnote-5.md +0 -28
  20. package/.beads/issues/floatnote-6.md +0 -30
  21. package/.beads/issues/floatnote-7.md +0 -38
  22. package/.beads/issues/floatnote-8.md +0 -29
  23. package/.beads/issues/floatnote-9.md +0 -32
  24. package/CLAUDE.md +0 -61
  25. package/coverage/base.css +0 -224
  26. package/coverage/bin/floatnote.js.html +0 -739
  27. package/coverage/bin/index.html +0 -116
  28. package/coverage/block-navigation.js +0 -87
  29. package/coverage/favicon.png +0 -0
  30. package/coverage/index.html +0 -131
  31. package/coverage/lcov-report/base.css +0 -224
  32. package/coverage/lcov-report/bin/floatnote.js.html +0 -739
  33. package/coverage/lcov-report/bin/index.html +0 -116
  34. package/coverage/lcov-report/block-navigation.js +0 -87
  35. package/coverage/lcov-report/favicon.png +0 -0
  36. package/coverage/lcov-report/index.html +0 -131
  37. package/coverage/lcov-report/prettify.css +0 -1
  38. package/coverage/lcov-report/prettify.js +0 -2
  39. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  40. package/coverage/lcov-report/sorter.js +0 -210
  41. package/coverage/lcov-report/src/index.html +0 -146
  42. package/coverage/lcov-report/src/main.js.html +0 -1483
  43. package/coverage/lcov-report/src/preload.js.html +0 -361
  44. package/coverage/lcov-report/src/renderer.js.html +0 -8767
  45. package/coverage/lcov.info +0 -3273
  46. package/coverage/prettify.css +0 -1
  47. package/coverage/prettify.js +0 -2
  48. package/coverage/sort-arrow-sprite.png +0 -0
  49. package/coverage/sorter.js +0 -210
  50. package/coverage/src/index.html +0 -146
  51. package/coverage/src/main.js.html +0 -1483
  52. package/coverage/src/preload.js.html +0 -361
  53. package/coverage/src/renderer.js.html +0 -8767
  54. package/jest.config.js +0 -48
  55. package/src/icon-template.png +0 -0
  56. package/src/index.html +0 -296
  57. package/src/main.js +0 -494
  58. package/src/preload.js +0 -96
  59. package/src/renderer.js +0 -3203
  60. package/src/styles.css +0 -1448
  61. package/tests/cli/floatnote.test.js +0 -167
  62. package/tests/main/main.test.js +0 -287
  63. package/tests/mocks/electron.js +0 -126
  64. package/tests/mocks/fs.js +0 -17
  65. package/tests/preload/preload.test.js +0 -218
  66. package/tests/renderer/history.test.js +0 -234
  67. package/tests/renderer/notes.test.js +0 -262
  68. package/tests/renderer/settings.test.js +0 -178
@@ -1,178 +0,0 @@
1
- // Tests for renderer settings functionality
2
-
3
- describe('Settings', () => {
4
- let mockSettings;
5
-
6
- beforeEach(() => {
7
- // Mock default settings
8
- mockSettings = {
9
- pinchZoom: true,
10
- pan: true,
11
- rotate: true,
12
- showZoomControls: true,
13
- openWithCleanSlate: false,
14
- activeBgMode: 'transparent',
15
- inactiveBgMode: 'transparent',
16
- activeOpacity: 100,
17
- inactiveOpacity: 50,
18
- autoSaveToFolder: false
19
- };
20
- });
21
-
22
- describe('Default settings', () => {
23
- test('pinchZoom should default to true', () => {
24
- expect(mockSettings.pinchZoom).toBe(true);
25
- });
26
-
27
- test('pan should default to true', () => {
28
- expect(mockSettings.pan).toBe(true);
29
- });
30
-
31
- test('rotate should default to true', () => {
32
- expect(mockSettings.rotate).toBe(true);
33
- });
34
-
35
- test('showZoomControls should default to true', () => {
36
- expect(mockSettings.showZoomControls).toBe(true);
37
- });
38
-
39
- test('openWithCleanSlate should default to false', () => {
40
- expect(mockSettings.openWithCleanSlate).toBe(false);
41
- });
42
-
43
- test('activeBgMode should default to transparent', () => {
44
- expect(mockSettings.activeBgMode).toBe('transparent');
45
- });
46
-
47
- test('inactiveBgMode should default to transparent', () => {
48
- expect(mockSettings.inactiveBgMode).toBe('transparent');
49
- });
50
-
51
- test('activeOpacity should default to 100', () => {
52
- expect(mockSettings.activeOpacity).toBe(100);
53
- });
54
-
55
- test('inactiveOpacity should default to 50', () => {
56
- expect(mockSettings.inactiveOpacity).toBe(50);
57
- });
58
-
59
- test('autoSaveToFolder should default to false', () => {
60
- expect(mockSettings.autoSaveToFolder).toBe(false);
61
- });
62
- });
63
-
64
- describe('Settings modification', () => {
65
- test('should update pinchZoom setting', () => {
66
- mockSettings.pinchZoom = false;
67
- expect(mockSettings.pinchZoom).toBe(false);
68
- });
69
-
70
- test('should update pan setting', () => {
71
- mockSettings.pan = false;
72
- expect(mockSettings.pan).toBe(false);
73
- });
74
-
75
- test('should update rotate setting', () => {
76
- mockSettings.rotate = false;
77
- expect(mockSettings.rotate).toBe(false);
78
- });
79
-
80
- test('should update background mode', () => {
81
- mockSettings.activeBgMode = 'blur';
82
- expect(mockSettings.activeBgMode).toBe('blur');
83
-
84
- mockSettings.activeBgMode = 'dark';
85
- expect(mockSettings.activeBgMode).toBe('dark');
86
- });
87
-
88
- test('should update opacity values', () => {
89
- mockSettings.activeOpacity = 75;
90
- mockSettings.inactiveOpacity = 25;
91
- expect(mockSettings.activeOpacity).toBe(75);
92
- expect(mockSettings.inactiveOpacity).toBe(25);
93
- });
94
-
95
- test('should update autoSaveToFolder setting', () => {
96
- mockSettings.autoSaveToFolder = true;
97
- expect(mockSettings.autoSaveToFolder).toBe(true);
98
- });
99
- });
100
-
101
- describe('Background mode options', () => {
102
- test('should accept transparent mode', () => {
103
- mockSettings.activeBgMode = 'transparent';
104
- expect(mockSettings.activeBgMode).toBe('transparent');
105
- });
106
-
107
- test('should accept blur mode', () => {
108
- mockSettings.activeBgMode = 'blur';
109
- expect(mockSettings.activeBgMode).toBe('blur');
110
- });
111
-
112
- test('should accept dark mode', () => {
113
- mockSettings.activeBgMode = 'dark';
114
- expect(mockSettings.activeBgMode).toBe('dark');
115
- });
116
- });
117
-
118
- describe('Opacity validation', () => {
119
- test('opacity should be between 0 and 100', () => {
120
- const validateOpacity = (value) => {
121
- return Math.max(0, Math.min(100, value));
122
- };
123
-
124
- expect(validateOpacity(50)).toBe(50);
125
- expect(validateOpacity(-10)).toBe(0);
126
- expect(validateOpacity(150)).toBe(100);
127
- });
128
- });
129
- });
130
-
131
- describe('Settings persistence', () => {
132
- test('should save settings with data', () => {
133
- const data = {
134
- notes: [],
135
- currentNoteIndex: 0,
136
- settings: {
137
- pinchZoom: true,
138
- pan: true,
139
- rotate: false,
140
- showZoomControls: true,
141
- openWithCleanSlate: false,
142
- activeBgMode: 'blur',
143
- inactiveBgMode: 'transparent',
144
- activeOpacity: 80,
145
- inactiveOpacity: 40,
146
- autoSaveToFolder: true
147
- },
148
- transform: {
149
- zoomLevel: 1,
150
- panX: 0,
151
- panY: 0,
152
- rotation: 0
153
- }
154
- };
155
-
156
- expect(data.settings).toBeDefined();
157
- expect(data.settings.activeBgMode).toBe('blur');
158
- expect(data.settings.autoSaveToFolder).toBe(true);
159
- });
160
-
161
- test('should restore settings from loaded data', () => {
162
- const loadedData = {
163
- settings: {
164
- pinchZoom: false,
165
- pan: true,
166
- rotate: true,
167
- showZoomControls: false,
168
- activeBgMode: 'dark',
169
- activeOpacity: 60
170
- }
171
- };
172
-
173
- const mockSettings = { ...loadedData.settings };
174
- expect(mockSettings.pinchZoom).toBe(false);
175
- expect(mockSettings.showZoomControls).toBe(false);
176
- expect(mockSettings.activeBgMode).toBe('dark');
177
- });
178
- });