@worktile/theia 20.2.9 → 20.2.11

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.
@@ -15349,7 +15349,13 @@ const withLink = (editor) => {
15349
15349
  const clipboardData = await getClipboardData(data);
15350
15350
  const text = clipboardData?.text;
15351
15351
  if (!clipboardData?.elements && text && isUrl(text)) {
15352
- const urls = Array.from(getUrls(text, { stripWWW: false, sortQueryParameters: false, requireSchemeOrWww: true }));
15352
+ const urls = Array.from(getUrls(text, {
15353
+ stripWWW: false,
15354
+ sortQueryParameters: false,
15355
+ requireSchemeOrWww: true,
15356
+ removeTrailingSlash: false,
15357
+ removeSingleSlash: false
15358
+ }));
15353
15359
  if (urls.length) {
15354
15360
  let str = cloneDeep(text);
15355
15361
  urls.forEach((url, index) => {
@@ -18430,9 +18436,7 @@ class TheEditorComponent {
18430
18436
  this.elementToHtml = new WeakMap();
18431
18437
  this.virtualScrollConfig = signal({
18432
18438
  enabled: false,
18433
- scrollTop: 0,
18434
- viewportHeight: 0,
18435
- viewportBoundingTop: 0
18439
+ scrollTop: 0
18436
18440
  }, ...(ngDevMode ? [{ debugName: "virtualScrollConfig" }] : []));
18437
18441
  this.onChangeCallback = () => { };
18438
18442
  this.onTouchedCallback = () => { };
@@ -18521,6 +18525,7 @@ class TheEditorComponent {
18521
18525
  }
18522
18526
  ngOnInit() {
18523
18527
  this.initialize();
18528
+ this.updateVirtualConfig();
18524
18529
  this.onErrorHandler();
18525
18530
  initializeDefaultMenuIcons(this.iconRegistry);
18526
18531
  }
@@ -18561,26 +18566,20 @@ class TheEditorComponent {
18561
18566
  .subscribe(() => {
18562
18567
  this.updateVirtualConfig();
18563
18568
  });
18564
- this.updateVirtualConfig();
18565
18569
  }
18566
18570
  updateVirtualConfig() {
18567
18571
  const scrollContainer = this.theContextService.getScrollContainer();
18568
18572
  if (!this.virtualScrollConfig().enabled || !scrollContainer) {
18569
18573
  return;
18570
18574
  }
18571
- const { scrollTop, offsetHeight } = scrollContainer;
18572
- if (this.scrollContainerBoundingTop === null) {
18573
- this.scrollContainerBoundingTop = scrollContainer.getBoundingClientRect().top;
18574
- }
18575
+ const { scrollTop } = scrollContainer;
18575
18576
  if (localStorage.getItem(SLATE_DEBUG_KEY + '__SCROLL_TOP')) {
18576
18577
  console.log(`theia: scroll event fired from user: ${scrollTop}`);
18577
18578
  }
18578
18579
  this.virtualScrollConfig.update(config => ({
18579
18580
  ...config,
18580
18581
  scrollTop,
18581
- viewportHeight: offsetHeight,
18582
- scrollContainer: this.theContextService.getScrollContainer(),
18583
- viewportBoundingTop: this.scrollContainerBoundingTop
18582
+ scrollContainer
18584
18583
  }));
18585
18584
  }
18586
18585
  initialize() {