socialcalc-ai 1.0.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.
Files changed (41) hide show
  1. package/README.md +268 -0
  2. package/components/CellEditModal/CellEditModal.css +584 -0
  3. package/components/CellEditModal/CellEditModal.tsx +817 -0
  4. package/components/DemoVideosModal/DemoVideosModal.css +307 -0
  5. package/components/DemoVideosModal/DemoVideosModal.tsx +289 -0
  6. package/components/EditableCellsModal/EditableCellsModal.css +346 -0
  7. package/components/EditableCellsModal/EditableCellsModal.tsx +555 -0
  8. package/components/HorizontalScrollBar.css +127 -0
  9. package/components/HorizontalScrollBar.tsx +140 -0
  10. package/components/RowActionPopover/RowActionPopover.css +95 -0
  11. package/components/RowActionPopover/RowActionPopover.tsx +82 -0
  12. package/core/constants.js +1039 -0
  13. package/core/core.js +7172 -0
  14. package/core/format-number.js +7034 -0
  15. package/core/formula.js +1675 -0
  16. package/core/index.js +28 -0
  17. package/core/spreadsheet-control.js +7646 -0
  18. package/core/table-editor.js +8156 -0
  19. package/index.d.ts +68 -0
  20. package/index.js +43 -0
  21. package/modules/device.js +22 -0
  22. package/modules/editable-cells.js +230 -0
  23. package/modules/exporters.js +22 -0
  24. package/modules/formatting.js +258 -0
  25. package/modules/grid-lines.js +127 -0
  26. package/modules/history.js +26 -0
  27. package/modules/horizontal-scroll.js +335 -0
  28. package/modules/init.js +94 -0
  29. package/modules/invoice.js +558 -0
  30. package/modules/listeners.js +531 -0
  31. package/modules/logos.js +191 -0
  32. package/modules/plugin-manager.js +208 -0
  33. package/modules/prompts.js +170 -0
  34. package/modules/row-col-headers.js +514 -0
  35. package/modules/sheets.js +151 -0
  36. package/modules/touch-scroll.js +474 -0
  37. package/modules/utils.js +317 -0
  38. package/modules/weight.js +287 -0
  39. package/package.json +67 -0
  40. package/utils/imageCompressor.ts +118 -0
  41. package/utils/scriptLoader.ts +39 -0
@@ -0,0 +1,584 @@
1
+ /* Universal / Framework-Agnostic Cell Edit Modal Styles */
2
+
3
+ .sc-cell-modal-backdrop {
4
+ position: fixed;
5
+ top: 0;
6
+ left: 0;
7
+ right: 0;
8
+ bottom: 0;
9
+ background: rgba(15, 23, 42, 0.5);
10
+ backdrop-filter: blur(4px);
11
+ -webkit-backdrop-filter: blur(4px);
12
+ display: flex;
13
+ align-items: center;
14
+ justify-content: center;
15
+ z-index: 10000;
16
+ padding: 16px;
17
+ animation: scFadeIn 0.3s cubic-bezier(0.32, 0.72, 0, 1);
18
+ transition: padding-bottom 0.3s cubic-bezier(0.32, 0.72, 0, 1);
19
+ box-sizing: border-box;
20
+ }
21
+
22
+ @keyframes scFadeIn {
23
+ from { opacity: 0; }
24
+ to { opacity: 1; }
25
+ }
26
+
27
+ .sc-cell-modal-dialog {
28
+ background: #ffffff;
29
+ border-radius: 20px;
30
+ box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
31
+ width: 100%;
32
+ max-width: 380px;
33
+ max-height: 90vh;
34
+ display: flex;
35
+ flex-direction: column;
36
+ overflow: hidden;
37
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
38
+ animation: scSlideUp 0.35s cubic-bezier(0.32, 0.72, 0, 1);
39
+ transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
40
+ box-sizing: border-box;
41
+ }
42
+
43
+ @keyframes scSlideUp {
44
+ from {
45
+ opacity: 0;
46
+ transform: translateY(48px) scale(0.95);
47
+ }
48
+ to {
49
+ opacity: 1;
50
+ transform: translateY(0) scale(1);
51
+ }
52
+ }
53
+
54
+ .sc-cell-modal-content {
55
+ padding: 18px;
56
+ display: flex;
57
+ flex-direction: column;
58
+ gap: 14px;
59
+ overflow-y: auto;
60
+ box-sizing: border-box;
61
+ }
62
+
63
+ /* Header */
64
+ .sc-cell-header {
65
+ display: flex;
66
+ justify-content: space-between;
67
+ align-items: center;
68
+ }
69
+
70
+ .sc-cell-title-group {
71
+ display: flex;
72
+ align-items: center;
73
+ gap: 8px;
74
+ }
75
+
76
+ .sc-cell-title {
77
+ font-size: 17px;
78
+ font-weight: 700;
79
+ color: #0f172a;
80
+ margin: 0;
81
+ }
82
+
83
+ .sc-cell-coord-badge {
84
+ background: #eff6ff;
85
+ color: #2563eb;
86
+ border: 1px solid #bfdbfe;
87
+ font-size: 11px;
88
+ font-weight: 700;
89
+ padding: 2px 8px;
90
+ border-radius: 12px;
91
+ }
92
+
93
+ .sc-cell-close-btn {
94
+ background: transparent;
95
+ border: none;
96
+ color: #64748b;
97
+ width: 32px;
98
+ height: 32px;
99
+ border-radius: 8px;
100
+ display: flex;
101
+ align-items: center;
102
+ justify-content: center;
103
+ cursor: pointer;
104
+ font-size: 20px;
105
+ transition: all 0.15s ease;
106
+ padding: 0;
107
+ }
108
+
109
+ .sc-cell-close-btn:hover {
110
+ background: #f1f5f9;
111
+ color: #0f172a;
112
+ }
113
+
114
+ /* Input Section */
115
+ .sc-cell-input-section {
116
+ display: flex;
117
+ align-items: center;
118
+ background: #f8fafc;
119
+ border: 1.5px solid #e2e8f0;
120
+ border-radius: 12px;
121
+ padding: 0 12px;
122
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
123
+ }
124
+
125
+ .sc-cell-input-section:focus-within {
126
+ border-color: #3b82f6;
127
+ background: #ffffff;
128
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
129
+ }
130
+
131
+ .sc-cell-input {
132
+ min-height: 44px;
133
+ font-size: 14.5px;
134
+ font-weight: 500;
135
+ flex: 1;
136
+ background: transparent;
137
+ border: none;
138
+ outline: none;
139
+ color: #0f172a;
140
+ width: 100%;
141
+ }
142
+
143
+ .sc-cell-clear-btn {
144
+ display: flex;
145
+ align-items: center;
146
+ justify-content: center;
147
+ margin-left: 8px;
148
+ cursor: pointer;
149
+ color: #94a3b8;
150
+ border: none;
151
+ background: transparent;
152
+ padding: 4px;
153
+ transition: color 0.15s ease;
154
+ }
155
+
156
+ .sc-cell-clear-btn:hover {
157
+ color: #475569;
158
+ }
159
+
160
+ /* Image Preview Card */
161
+ .sc-image-preview-card {
162
+ display: flex;
163
+ align-items: center;
164
+ gap: 12px;
165
+ background: #f8fafc;
166
+ border: 1px solid #e2e8f0;
167
+ border-radius: 10px;
168
+ padding: 8px 12px;
169
+ }
170
+
171
+ .sc-image-preview-thumb {
172
+ width: 44px;
173
+ height: 44px;
174
+ border-radius: 6px;
175
+ object-fit: contain;
176
+ background: #ffffff;
177
+ border: 1px solid #cbd5e1;
178
+ }
179
+
180
+ .sc-image-preview-info {
181
+ display: flex;
182
+ flex-direction: column;
183
+ gap: 4px;
184
+ flex: 1;
185
+ }
186
+
187
+ .sc-image-preview-label {
188
+ font-size: 12px;
189
+ font-weight: 600;
190
+ color: #334155;
191
+ }
192
+
193
+ .sc-image-remove-btn {
194
+ align-self: flex-start;
195
+ font-size: 11px;
196
+ color: #ef4444;
197
+ background: transparent;
198
+ border: none;
199
+ padding: 0;
200
+ cursor: pointer;
201
+ font-weight: 600;
202
+ }
203
+
204
+ /* Options Accordion */
205
+ .sc-cell-accordion {
206
+ border: 1px solid #e2e8f0;
207
+ border-radius: 12px;
208
+ overflow: hidden;
209
+ background: #ffffff;
210
+ }
211
+
212
+ .sc-accordion-toggle {
213
+ width: 100%;
214
+ display: flex;
215
+ align-items: center;
216
+ justify-content: space-between;
217
+ padding: 10px 14px;
218
+ background: #f8fafc;
219
+ border: none;
220
+ border-bottom: 1px solid #e2e8f0;
221
+ font-size: 12px;
222
+ font-weight: 700;
223
+ color: #64748b;
224
+ text-transform: uppercase;
225
+ letter-spacing: 0.04em;
226
+ cursor: pointer;
227
+ }
228
+
229
+ .sc-accordion-toggle:hover {
230
+ background: #f1f5f9;
231
+ }
232
+
233
+ .sc-accordion-body {
234
+ padding: 12px 14px;
235
+ display: flex;
236
+ flex-direction: column;
237
+ gap: 12px;
238
+ background: #ffffff;
239
+ }
240
+
241
+ .sc-property-row {
242
+ display: flex;
243
+ flex-direction: column;
244
+ gap: 8px;
245
+ }
246
+
247
+ .sc-property-btn {
248
+ width: 100%;
249
+ display: flex;
250
+ align-items: center;
251
+ justify-content: space-between;
252
+ padding: 8px 10px;
253
+ background: #f8fafc;
254
+ border: 1px solid #e2e8f0;
255
+ border-radius: 8px;
256
+ font-size: 13px;
257
+ font-weight: 600;
258
+ color: #334155;
259
+ cursor: pointer;
260
+ transition: all 0.15s ease;
261
+ }
262
+
263
+ .sc-property-btn:hover {
264
+ background: #f1f5f9;
265
+ border-color: #cbd5e1;
266
+ }
267
+
268
+ .sc-property-btn-left {
269
+ display: flex;
270
+ align-items: center;
271
+ gap: 6px;
272
+ }
273
+
274
+ .sc-property-btn-right {
275
+ display: flex;
276
+ align-items: center;
277
+ gap: 8px;
278
+ font-size: 12px;
279
+ color: #64748b;
280
+ }
281
+
282
+ .sc-color-dot {
283
+ width: 14px;
284
+ height: 14px;
285
+ border-radius: 4px;
286
+ border: 1px solid rgba(0, 0, 0, 0.15);
287
+ box-sizing: border-box;
288
+ }
289
+
290
+ .sc-color-grid {
291
+ display: flex;
292
+ flex-wrap: wrap;
293
+ gap: 8px;
294
+ padding: 10px;
295
+ background: #f8fafc;
296
+ border: 1px solid #e2e8f0;
297
+ border-radius: 10px;
298
+ margin-top: 2px;
299
+ }
300
+
301
+ .sc-color-grid.mini {
302
+ padding: 6px 8px;
303
+ gap: 6px;
304
+ }
305
+
306
+ .sc-color-swatch {
307
+ width: 28px;
308
+ height: 28px;
309
+ border-radius: 6px;
310
+ cursor: pointer;
311
+ border: 2px solid transparent;
312
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
313
+ transition: transform 0.1s ease, border-color 0.1s ease;
314
+ box-sizing: border-box;
315
+ }
316
+
317
+ .sc-color-swatch:hover {
318
+ transform: scale(1.1);
319
+ }
320
+
321
+ .sc-color-swatch.selected {
322
+ border-color: #3b82f6;
323
+ box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.4);
324
+ }
325
+
326
+ .sc-color-swatch.default-swatch {
327
+ background: linear-gradient(45deg, transparent 46%, #94a3b8 47%, #94a3b8 53%, transparent 54%), #f1f5f9;
328
+ border: 1px solid #cbd5e1;
329
+ }
330
+
331
+ /* Border Controls */
332
+ .sc-border-controls {
333
+ background: #f8fafc;
334
+ border: 1px solid #e2e8f0;
335
+ border-radius: 10px;
336
+ padding: 10px;
337
+ display: flex;
338
+ flex-direction: column;
339
+ gap: 10px;
340
+ }
341
+
342
+ .sc-border-position-tabs {
343
+ display: grid;
344
+ grid-template-columns: repeat(3, 1fr);
345
+ gap: 6px;
346
+ }
347
+
348
+ .sc-border-pos-btn {
349
+ padding: 6px 4px;
350
+ font-size: 11.5px;
351
+ font-weight: 600;
352
+ border-radius: 6px;
353
+ border: 1px solid #cbd5e1;
354
+ background: #ffffff;
355
+ color: #475569;
356
+ cursor: pointer;
357
+ transition: all 0.15s ease;
358
+ }
359
+
360
+ .sc-border-pos-btn.active {
361
+ background: #2563eb;
362
+ color: #ffffff;
363
+ border-color: #2563eb;
364
+ }
365
+
366
+ .sc-border-inline-row {
367
+ display: grid;
368
+ grid-template-columns: 1fr 1fr;
369
+ gap: 8px;
370
+ }
371
+
372
+ .sc-border-select-group {
373
+ display: flex;
374
+ flex-direction: column;
375
+ gap: 4px;
376
+ }
377
+
378
+ .sc-border-select-group label,
379
+ .sc-border-color-row label {
380
+ font-size: 11px;
381
+ font-weight: 700;
382
+ color: #64748b;
383
+ text-transform: uppercase;
384
+ letter-spacing: 0.02em;
385
+ }
386
+
387
+ .sc-border-select {
388
+ padding: 6px 8px;
389
+ font-size: 12px;
390
+ border-radius: 6px;
391
+ border: 1px solid #cbd5e1;
392
+ background: #ffffff;
393
+ color: #0f172a;
394
+ outline: none;
395
+ font-weight: 500;
396
+ }
397
+
398
+ .sc-border-color-row {
399
+ display: flex;
400
+ flex-direction: column;
401
+ gap: 4px;
402
+ }
403
+
404
+ /* Format Controls */
405
+ .sc-format-controls {
406
+ background: #f8fafc;
407
+ border: 1px solid #e2e8f0;
408
+ border-radius: 10px;
409
+ padding: 10px;
410
+ display: flex;
411
+ flex-direction: column;
412
+ gap: 10px;
413
+ }
414
+
415
+ .sc-format-current-badge {
416
+ font-weight: 600;
417
+ color: #2563eb;
418
+ background: #eff6ff;
419
+ border: 1px solid #bfdbfe;
420
+ padding: 2px 7px;
421
+ border-radius: 6px;
422
+ font-size: 11.5px;
423
+ max-width: 130px;
424
+ overflow: hidden;
425
+ text-overflow: ellipsis;
426
+ white-space: nowrap;
427
+ }
428
+
429
+ .sc-format-category-pills {
430
+ display: flex;
431
+ flex-wrap: wrap;
432
+ gap: 5px;
433
+ }
434
+
435
+ .sc-format-pill-btn {
436
+ padding: 4px 9px;
437
+ font-size: 11px;
438
+ font-weight: 600;
439
+ border-radius: 12px;
440
+ border: 1px solid #cbd5e1;
441
+ background: #ffffff;
442
+ color: #475569;
443
+ cursor: pointer;
444
+ transition: all 0.15s ease;
445
+ }
446
+
447
+ .sc-format-pill-btn:hover {
448
+ background: #f1f5f9;
449
+ color: #0f172a;
450
+ }
451
+
452
+ .sc-format-pill-btn.active {
453
+ background: #2563eb;
454
+ color: #ffffff;
455
+ border-color: #2563eb;
456
+ box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
457
+ }
458
+
459
+ .sc-format-options-grid {
460
+ display: grid;
461
+ grid-template-columns: repeat(2, 1fr);
462
+ gap: 6px;
463
+ max-height: 180px;
464
+ overflow-y: auto;
465
+ padding-right: 2px;
466
+ }
467
+
468
+ .sc-format-card-btn {
469
+ display: flex;
470
+ flex-direction: column;
471
+ align-items: flex-start;
472
+ justify-content: center;
473
+ padding: 7px 9px;
474
+ border-radius: 8px;
475
+ border: 1.5px solid #e2e8f0;
476
+ background: #ffffff;
477
+ cursor: pointer;
478
+ transition: all 0.15s ease;
479
+ text-align: left;
480
+ }
481
+
482
+ .sc-format-card-btn:hover {
483
+ border-color: #93c5fd;
484
+ background: #f8fafc;
485
+ }
486
+
487
+ .sc-format-card-btn.selected {
488
+ border-color: #2563eb;
489
+ background: #eff6ff;
490
+ box-shadow: 0 0 0 1px #2563eb;
491
+ }
492
+
493
+ .sc-format-card-name {
494
+ font-size: 12px;
495
+ font-weight: 700;
496
+ color: #0f172a;
497
+ line-height: 1.2;
498
+ }
499
+
500
+ .sc-format-card-btn.selected .sc-format-card-name {
501
+ color: #1d4ed8;
502
+ }
503
+
504
+ .sc-format-card-preview {
505
+ font-size: 10.5px;
506
+ color: #64748b;
507
+ margin-top: 2px;
508
+ font-weight: 500;
509
+ }
510
+
511
+ .sc-format-card-btn.selected .sc-format-card-preview {
512
+ color: #3b82f6;
513
+ }
514
+
515
+ /* Logo Upload Button */
516
+ .sc-logo-upload-btn {
517
+ width: 100%;
518
+ display: flex;
519
+ align-items: center;
520
+ justify-content: center;
521
+ gap: 8px;
522
+ padding: 10px;
523
+ border: 1.5px dashed #cbd5e1;
524
+ border-radius: 10px;
525
+ background: #f8fafc;
526
+ color: #2563eb;
527
+ font-size: 13px;
528
+ font-weight: 600;
529
+ cursor: pointer;
530
+ transition: all 0.15s ease;
531
+ }
532
+
533
+ .sc-logo-upload-btn:hover {
534
+ background: #eff6ff;
535
+ border-color: #2563eb;
536
+ }
537
+
538
+ /* Actions */
539
+ .sc-cell-actions {
540
+ display: flex;
541
+ gap: 10px;
542
+ padding-top: 4px;
543
+ }
544
+
545
+ .sc-cell-btn-cancel {
546
+ flex: 1;
547
+ height: 42px;
548
+ border-radius: 10px;
549
+ border: 1px solid #cbd5e1;
550
+ background: #ffffff;
551
+ color: #475569;
552
+ font-size: 14px;
553
+ font-weight: 600;
554
+ cursor: pointer;
555
+ transition: all 0.15s ease;
556
+ }
557
+
558
+ .sc-cell-btn-cancel:hover {
559
+ background: #f8fafc;
560
+ color: #0f172a;
561
+ }
562
+
563
+ .sc-cell-btn-apply {
564
+ flex: 1;
565
+ height: 42px;
566
+ border-radius: 10px;
567
+ border: none;
568
+ background: #2563eb;
569
+ color: #ffffff;
570
+ font-size: 14px;
571
+ font-weight: 600;
572
+ cursor: pointer;
573
+ box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
574
+ transition: all 0.15s ease;
575
+ }
576
+
577
+ .sc-cell-btn-apply:hover {
578
+ background: #1d4ed8;
579
+ transform: translateY(-1px);
580
+ }
581
+
582
+ .sc-cell-btn-apply:active {
583
+ transform: translateY(0);
584
+ }