superdoc 1.0.0-beta.8 → 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 (48) hide show
  1. package/dist/chunks/{PdfViewer-DJ7BWUbW.cjs → PdfViewer-C3_5zd7y.cjs} +2 -2
  2. package/dist/chunks/{PdfViewer-BfEwF25T.es.js → PdfViewer-OoqzzuS4.es.js} +2 -2
  3. package/dist/chunks/{eventemitter3-ByBH0NYV.es.js → eventemitter3-CcXAdeql.es.js} +1 -1
  4. package/dist/chunks/{eventemitter3-CFCpOk3d.cjs → eventemitter3-DQmQUge-.cjs} +1 -1
  5. package/dist/chunks/{index-BCZ82zY5.es.js → index-BwFit1xu.es.js} +112 -41
  6. package/dist/chunks/{index-DJrRlj1_-HA-nVwDO.es.js → index-CDIpuWy0-DcqcEnVR.es.js} +1 -1
  7. package/dist/chunks/{index-DJrRlj1_-E5dmStMF.cjs → index-CDIpuWy0-v1ZRfNmH.cjs} +1 -1
  8. package/dist/chunks/{index-DMwWcmrk.cjs → index-CVDEHD5c.cjs} +112 -41
  9. package/dist/chunks/{jszip-BwsONqK5.es.js → jszip-5vvIqAEE.es.js} +1 -1
  10. package/dist/chunks/{jszip-B99MTu59.cjs → jszip-BdEez1WM.cjs} +1 -1
  11. package/dist/chunks/{super-editor.es-Bo_fWMy6.cjs → super-editor.es-CWr0w1Tk.cjs} +37747 -20889
  12. package/dist/chunks/{super-editor.es-MRWI4sfo.es.js → super-editor.es-Ddl20DOa.es.js} +37747 -20889
  13. package/dist/chunks/{vue-CztqUvm1.es.js → vue-Dysv_7z5.es.js} +101 -12
  14. package/dist/chunks/{vue-ARQSyfaw.cjs → vue-jWLMl8Ts.cjs} +89 -0
  15. package/dist/chunks/xml-js-ClO_jHnq.es.js +2 -0
  16. package/dist/chunks/xml-js-Dz51sEbr.cjs +3 -0
  17. package/dist/packages/superdoc/src/components/CommentsLayer/use-comment.d.ts.map +1 -1
  18. package/dist/packages/superdoc/src/composables/use-document.d.ts.map +1 -1
  19. package/dist/packages/superdoc/src/core/SuperDoc.d.ts +2 -2
  20. package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
  21. package/dist/packages/superdoc/src/core/collaboration/collaboration.d.ts +11 -0
  22. package/dist/packages/superdoc/src/core/collaboration/collaboration.d.ts.map +1 -1
  23. package/dist/packages/superdoc/src/core/types/index.d.ts +66 -3
  24. package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
  25. package/dist/packages/superdoc/src/stores/comments-store.d.ts.map +1 -1
  26. package/dist/style.css +90 -51
  27. package/dist/super-editor/ai-writer.es.js +2 -2
  28. package/dist/super-editor/chunks/{converter-CflxlFnM.js → converter-CuIVo-Y-.js} +7295 -811
  29. package/dist/super-editor/chunks/{docx-zipper-DKWL4mo2.js → docx-zipper-D24ieyrf.js} +15 -11
  30. package/dist/super-editor/chunks/{editor-B9V7oJbW.js → editor-DyocbwIp.js} +18722 -8867
  31. package/dist/super-editor/chunks/{index-DJrRlj1_.js → index-CDIpuWy0.js} +1 -1
  32. package/dist/super-editor/chunks/{toolbar-B5WlPN4s.js → toolbar-WQTQjgeN.js} +36 -22
  33. package/dist/super-editor/converter.es.js +1 -1
  34. package/dist/super-editor/docx-zipper.es.js +2 -2
  35. package/dist/super-editor/editor.es.js +3 -3
  36. package/dist/super-editor/file-zipper.es.js +2 -2
  37. package/dist/super-editor/style.css +57 -18
  38. package/dist/super-editor/super-editor.es.js +1025 -226
  39. package/dist/super-editor/toolbar.es.js +2 -2
  40. package/dist/super-editor.cjs +4 -4
  41. package/dist/super-editor.es.js +2 -2
  42. package/dist/superdoc.cjs +2 -2
  43. package/dist/superdoc.es.js +2 -2
  44. package/dist/superdoc.umd.js +37527 -20522
  45. package/dist/superdoc.umd.js.map +1 -1
  46. package/package.json +1 -1
  47. package/dist/chunks/xml-js-BZPSMmVo.es.js +0 -2
  48. package/dist/chunks/xml-js-DQa4Ye5C.cjs +0 -3
package/dist/style.css CHANGED
@@ -593,10 +593,10 @@ span[data-v-53e13009] {
593
593
  background-color: #c8d0d8;
594
594
  }
595
595
 
596
- .overflow-menu[data-v-8bf2f427] {
596
+ .overflow-menu[data-v-ef28da92] {
597
597
  position: relative;
598
598
  }
599
- .overflow-menu_items[data-v-8bf2f427] {
599
+ .overflow-menu_items[data-v-ef28da92] {
600
600
  position: absolute;
601
601
  width: 200px;
602
602
  top: calc(100% + 3px);
@@ -608,13 +608,13 @@ span[data-v-53e13009] {
608
608
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.25);
609
609
  box-sizing: border-box;
610
610
  }
611
- .superdoc-toolbar-overflow[data-v-8bf2f427] {
611
+ .superdoc-toolbar-overflow[data-v-ef28da92] {
612
612
  min-width: auto !important;
613
613
  max-width: 200px;
614
614
  flex-wrap: wrap;
615
615
  }
616
616
  @media (max-width: 300px) {
617
- .overflow-menu_items[data-v-8bf2f427] {
617
+ .overflow-menu_items[data-v-ef28da92] {
618
618
  right: auto;
619
619
  left: 0;
620
620
  transform: translateX(-50%);
@@ -656,7 +656,7 @@ span[data-v-53e13009] {
656
656
  border-radius: 8px !important;
657
657
  }
658
658
 
659
- .button-group[data-v-f42ec7e6] {
659
+ .button-group[data-v-c80a1e51] {
660
660
  display: flex;
661
661
  }
662
662
 
@@ -2250,7 +2250,7 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
2250
2250
  }
2251
2251
 
2252
2252
  /* @remarks - popover adds a slight shadow, this can be removed if needed */
2253
- .generic-popover[data-v-cbddcc0f] {
2253
+ .generic-popover[data-v-157855b5] {
2254
2254
  /* @remarks - this should ideally be handled by the content or component - but some are missing */
2255
2255
  background-color: white;
2256
2256
  position: absolute;
@@ -2263,18 +2263,18 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
2263
2263
  min-height: 40px;
2264
2264
  }
2265
2265
 
2266
- .superdoc-table-resize-overlay[data-v-acc51d8d] {
2266
+ .superdoc-table-resize-overlay[data-v-814384b6] {
2267
2267
  position: absolute;
2268
2268
  pointer-events: none;
2269
2269
  user-select: none;
2270
2270
  }
2271
- .resize-handle[data-v-acc51d8d] {
2271
+ .resize-handle[data-v-814384b6] {
2272
2272
  position: absolute;
2273
2273
  cursor: col-resize;
2274
2274
  user-select: none;
2275
2275
  z-index: 15;
2276
2276
  }
2277
- .resize-handle[data-v-acc51d8d]::before {
2277
+ .resize-handle[data-v-814384b6]::before {
2278
2278
  content: '';
2279
2279
  position: absolute;
2280
2280
  left: 50%;
@@ -2287,27 +2287,66 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
2287
2287
  background-color 0.2s ease,
2288
2288
  width 0.2s ease;
2289
2289
  }
2290
- .resize-handle[data-v-acc51d8d]:hover::before {
2290
+ .resize-handle[data-v-814384b6]:hover::before {
2291
2291
  background-color: #4a90e2;
2292
2292
  width: 3px;
2293
2293
  transform: translateX(-1.5px);
2294
2294
  }
2295
- .resize-handle--active[data-v-acc51d8d]::before {
2295
+ .resize-handle--active[data-v-814384b6]::before {
2296
2296
  background-color: #4a90e2;
2297
2297
  width: 2px;
2298
2298
  transform: translateX(-1px);
2299
2299
  }
2300
- .resize-guideline[data-v-acc51d8d] {
2300
+ .resize-guideline[data-v-814384b6] {
2301
2301
  position: absolute;
2302
2302
  background-color: #4a90e2;
2303
2303
  pointer-events: none;
2304
2304
  box-shadow: 0 0 4px rgba(74, 144, 226, 0.5);
2305
2305
  }
2306
2306
 
2307
- .editor-element[data-v-f1e98438] {
2307
+ .superdoc-image-resize-overlay[data-v-e66ec7bb] {
2308
+ position: absolute;
2309
+ pointer-events: none;
2310
+ user-select: none;
2311
+ overflow: visible;
2312
+ }
2313
+ .resize-handle[data-v-e66ec7bb] {
2314
+ position: absolute;
2315
+ width: var(--v1e81f81d);
2316
+ height: var(--v1e81f81d);
2317
+ background-color: #ffffff;
2318
+ border: 2px solid #4a90e2;
2319
+ border-radius: 50%;
2320
+ user-select: none;
2321
+ z-index: var(--v12763124);
2322
+ pointer-events: auto;
2323
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
2324
+ transition:
2325
+ transform 0.2s ease,
2326
+ box-shadow 0.2s ease;
2327
+ }
2328
+ .resize-handle[data-v-e66ec7bb]:hover {
2329
+ transform: scale(1.2);
2330
+ box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
2331
+ background-color: #4a90e2;
2332
+ border-color: #ffffff;
2333
+ }
2334
+ .resize-handle--active[data-v-e66ec7bb] {
2335
+ transform: scale(1.2);
2336
+ background-color: #4a90e2;
2337
+ border-color: #ffffff;
2338
+ }
2339
+ .resize-guideline[data-v-e66ec7bb] {
2340
+ position: absolute;
2341
+ background-color: rgba(74, 144, 226, 0.1);
2342
+ pointer-events: none;
2343
+ box-shadow: 0 0 4px rgba(74, 144, 226, 0.5);
2344
+ }
2345
+
2346
+ .editor-element[data-v-a935d3e2] {
2308
2347
  position: relative;
2309
2348
  }
2310
- .super-editor-container[data-v-f1e98438] {
2349
+ .super-editor-container[data-v-a935d3e2] {
2311
2350
  width: auto;
2312
2351
  height: auto;
2313
2352
  min-width: 8in;
@@ -2316,14 +2355,14 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
2316
2355
  display: flex;
2317
2356
  flex-direction: column;
2318
2357
  }
2319
- .ruler[data-v-f1e98438] {
2358
+ .ruler[data-v-a935d3e2] {
2320
2359
  margin-bottom: 2px;
2321
2360
  }
2322
- .super-editor[data-v-f1e98438] {
2361
+ .super-editor[data-v-a935d3e2] {
2323
2362
  color: initial;
2324
2363
  overflow: hidden;
2325
2364
  }
2326
- .placeholder-editor[data-v-f1e98438] {
2365
+ .placeholder-editor[data-v-a935d3e2] {
2327
2366
  position: absolute;
2328
2367
  top: 0;
2329
2368
  left: 0;
@@ -2335,7 +2374,7 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
2335
2374
  background-color: white;
2336
2375
  box-sizing: border-box;
2337
2376
  }
2338
- .placeholder-title[data-v-f1e98438] {
2377
+ .placeholder-title[data-v-a935d3e2] {
2339
2378
  display: flex;
2340
2379
  justify-content: center;
2341
2380
  margin-bottom: 40px;
@@ -2385,20 +2424,20 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
2385
2424
  /* pointer-events: none; */
2386
2425
  }
2387
2426
 
2388
- .measure-comment[data-v-91de2350] {
2427
+ .measure-comment[data-v-eab6fbfa] {
2389
2428
  box-sizing: border-box;
2390
2429
  height: auto;
2391
2430
  }
2392
- .floating-comment[data-v-91de2350] {
2431
+ .floating-comment[data-v-eab6fbfa] {
2393
2432
  position: absolute;
2394
2433
  display: block;
2395
2434
  }
2396
- .sidebar-container[data-v-91de2350] {
2435
+ .sidebar-container[data-v-eab6fbfa] {
2397
2436
  position: absolute;
2398
2437
  width: 300px;
2399
2438
  min-height: 300px;
2400
2439
  }
2401
- .section-wrapper[data-v-91de2350] {
2440
+ .section-wrapper[data-v-eab6fbfa] {
2402
2441
  position: relative;
2403
2442
  min-height: 100%;
2404
2443
  width: 300px;
@@ -2406,11 +2445,11 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
2406
2445
  align-items: flex-start;
2407
2446
  justify-content: flex-start;
2408
2447
  }
2409
- .floating-comment[data-v-91de2350] {
2448
+ .floating-comment[data-v-eab6fbfa] {
2410
2449
  position: absolute;
2411
2450
  min-width: 300px;
2412
2451
  }
2413
- .calculation-container[data-v-91de2350] {
2452
+ .calculation-container[data-v-eab6fbfa] {
2414
2453
  visibility: hidden;
2415
2454
  position: fixed;
2416
2455
  left: -9999px;
@@ -2504,46 +2543,46 @@ img[data-v-7dd69850] {
2504
2543
  display: none;
2505
2544
  }
2506
2545
 
2507
- .superdoc[data-v-3fafc837] {
2546
+ .superdoc[data-v-3c3356b6] {
2508
2547
  display: flex;
2509
2548
  }
2510
- .right-sidebar[data-v-3fafc837] {
2549
+ .right-sidebar[data-v-3c3356b6] {
2511
2550
  min-width: 320px;
2512
2551
  }
2513
- .floating-comments[data-v-3fafc837] {
2552
+ .floating-comments[data-v-3c3356b6] {
2514
2553
  min-width: 300px;
2515
2554
  width: 300px;
2516
2555
  }
2517
- .superdoc__layers[data-v-3fafc837] {
2556
+ .superdoc__layers[data-v-3c3356b6] {
2518
2557
  height: 100%;
2519
2558
  position: relative;
2520
2559
  box-sizing: border-box;
2521
2560
  }
2522
- .superdoc__document[data-v-3fafc837] {
2561
+ .superdoc__document[data-v-3c3356b6] {
2523
2562
  width: 100%;
2524
2563
  position: relative;
2525
2564
  }
2526
- .superdoc__sub-document[data-v-3fafc837] {
2565
+ .superdoc__sub-document[data-v-3c3356b6] {
2527
2566
  width: 100%;
2528
2567
  position: relative;
2529
2568
  }
2530
- .superdoc__selection-layer[data-v-3fafc837] {
2569
+ .superdoc__selection-layer[data-v-3c3356b6] {
2531
2570
  position: absolute;
2532
2571
  min-width: 100%;
2533
2572
  min-height: 100%;
2534
2573
  z-index: 10;
2535
2574
  pointer-events: none;
2536
2575
  }
2537
- .superdoc__temp-selection[data-v-3fafc837] {
2576
+ .superdoc__temp-selection[data-v-3c3356b6] {
2538
2577
  position: absolute;
2539
2578
  }
2540
- .superdoc__comments-layer[data-v-3fafc837] {
2579
+ .superdoc__comments-layer[data-v-3c3356b6] {
2541
2580
  /* position: absolute; */
2542
2581
  top: 0;
2543
2582
  height: 100%;
2544
2583
  position: relative;
2545
2584
  }
2546
- .superdoc__right-sidebar[data-v-3fafc837] {
2585
+ .superdoc__right-sidebar[data-v-3c3356b6] {
2547
2586
  width: 320px;
2548
2587
  min-width: 320px;
2549
2588
  padding: 0 10px;
@@ -2553,14 +2592,14 @@ img[data-v-7dd69850] {
2553
2592
  }
2554
2593
 
2555
2594
  /* Tools styles */
2556
- .tools[data-v-3fafc837] {
2595
+ .tools[data-v-3c3356b6] {
2557
2596
  position: absolute;
2558
2597
  z-index: 3;
2559
2598
  display: flex;
2560
2599
  flex-direction: column;
2561
2600
  gap: 6px;
2562
2601
  }
2563
- .tools .tool-icon[data-v-3fafc837] {
2602
+ .tools .tool-icon[data-v-3c3356b6] {
2564
2603
  font-size: 20px;
2565
2604
  border-radius: 12px;
2566
2605
  border: none;
@@ -2568,7 +2607,7 @@ img[data-v-7dd69850] {
2568
2607
  background-color: #dbdbdb;
2569
2608
  cursor: pointer;
2570
2609
  }
2571
- .tools-item[data-v-3fafc837] {
2610
+ .tools-item[data-v-3c3356b6] {
2572
2611
  display: flex;
2573
2612
  align-items: center;
2574
2613
  justify-content: center;
@@ -2578,10 +2617,10 @@ img[data-v-7dd69850] {
2578
2617
  border-radius: 12px;
2579
2618
  cursor: pointer;
2580
2619
  }
2581
- .tools-item i[data-v-3fafc837] {
2620
+ .tools-item i[data-v-3c3356b6] {
2582
2621
  cursor: pointer;
2583
2622
  }
2584
- .superdoc__tools-icon[data-v-3fafc837] {
2623
+ .superdoc__tools-icon[data-v-3c3356b6] {
2585
2624
  width: 20px;
2586
2625
  height: 20px;
2587
2626
  flex-shrink: 0;
@@ -2596,15 +2635,15 @@ img[data-v-7dd69850] {
2596
2635
 
2597
2636
  /* 834px is iPad screen size in portrait orientation */
2598
2637
  @media (max-width: 834px) {
2599
- .superdoc .superdoc__layers[data-v-3fafc837] {
2638
+ .superdoc .superdoc__layers[data-v-3c3356b6] {
2600
2639
  margin: 0;
2601
2640
  border: 0 !important;
2602
2641
  box-shadow: none;
2603
2642
  }
2604
- .superdoc__sub-document[data-v-3fafc837] {
2643
+ .superdoc__sub-document[data-v-3c3356b6] {
2605
2644
  max-width: 100%;
2606
2645
  }
2607
- .superdoc__right-sidebar[data-v-3fafc837] {
2646
+ .superdoc__right-sidebar[data-v-3c3356b6] {
2608
2647
  padding: 10px;
2609
2648
  width: 55px;
2610
2649
  position: relative;
@@ -2612,7 +2651,7 @@ img[data-v-7dd69850] {
2612
2651
  }
2613
2652
 
2614
2653
  /* AI Writer styles */
2615
- .ai-writer-container[data-v-3fafc837] {
2654
+ .ai-writer-container[data-v-3c3356b6] {
2616
2655
  position: fixed;
2617
2656
  z-index: 1000;
2618
2657
  background: white;
@@ -2630,13 +2669,13 @@ img[data-v-7dd69850] {
2630
2669
  } */
2631
2670
 
2632
2671
  /* Tools styles */
2633
- .tools[data-v-3fafc837] {
2672
+ .tools[data-v-3c3356b6] {
2634
2673
  position: absolute;
2635
2674
  z-index: 3;
2636
2675
  display: flex;
2637
2676
  gap: 6px;
2638
2677
  }
2639
- .tools .tool-icon[data-v-3fafc837] {
2678
+ .tools .tool-icon[data-v-3c3356b6] {
2640
2679
  font-size: 20px;
2641
2680
  border-radius: 12px;
2642
2681
  border: none;
@@ -2644,7 +2683,7 @@ img[data-v-7dd69850] {
2644
2683
  background-color: #dbdbdb;
2645
2684
  cursor: pointer;
2646
2685
  }
2647
- .tools-item[data-v-3fafc837] {
2686
+ .tools-item[data-v-3c3356b6] {
2648
2687
  display: flex;
2649
2688
  align-items: center;
2650
2689
  justify-content: center;
@@ -2655,18 +2694,18 @@ img[data-v-7dd69850] {
2655
2694
  border-radius: 12px;
2656
2695
  cursor: pointer;
2657
2696
  }
2658
- .tools-item i[data-v-3fafc837] {
2697
+ .tools-item i[data-v-3c3356b6] {
2659
2698
  cursor: pointer;
2660
2699
  }
2661
- .superdoc__tools-icon[data-v-3fafc837] {
2700
+ .superdoc__tools-icon[data-v-3c3356b6] {
2662
2701
  width: 20px;
2663
2702
  height: 20px;
2664
2703
  flex-shrink: 0;
2665
2704
  }
2666
- .ai-tool > svg[data-v-3fafc837] {
2705
+ .ai-tool > svg[data-v-3c3356b6] {
2667
2706
  fill: transparent;
2668
2707
  }
2669
- .ai-tool[data-v-3fafc837]::before {
2708
+ .ai-tool[data-v-3c3356b6]::before {
2670
2709
  content: '';
2671
2710
  position: absolute;
2672
2711
  width: 20px;
@@ -2687,7 +2726,7 @@ img[data-v-7dd69850] {
2687
2726
  filter: brightness(1.2);
2688
2727
  transition: filter 0.2s ease;
2689
2728
  }
2690
- .ai-tool[data-v-3fafc837]:hover::before {
2729
+ .ai-tool[data-v-3c3356b6]:hover::before {
2691
2730
  filter: brightness(1.3);
2692
2731
  }
2693
2732
 
@@ -1,6 +1,6 @@
1
1
  import { ref, onMounted, onUnmounted, computed, createElementBlock, openBlock, withModifiers, createElementVNode, withDirectives, unref, vModelText, createCommentVNode, nextTick } from "vue";
2
- import { T as TextSelection } from "./chunks/converter-CflxlFnM.js";
3
- import { _ as _export_sfc } from "./chunks/editor-B9V7oJbW.js";
2
+ import { T as TextSelection } from "./chunks/converter-CuIVo-Y-.js";
3
+ import { _ as _export_sfc } from "./chunks/editor-DyocbwIp.js";
4
4
  const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
5
5
  const SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
6
6
  async function baseInsightsFetch(payload, options = {}) {