@worktile/theia 20.1.0-next.0 → 20.1.0-next.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.
@@ -14273,7 +14273,6 @@ class TheImage extends TheBaseElement {
14273
14273
  }
14274
14274
  ];
14275
14275
  this.dragable = false;
14276
- this.resolveImageHeight = null;
14277
14276
  this.beforeContextChange = (value) => {
14278
14277
  if (value.element !== this.element && value.element.thumbUrl) {
14279
14278
  let thumbUrl = value.element.thumbUrl;
@@ -14571,11 +14570,6 @@ class TheImage extends TheBaseElement {
14571
14570
  const img = event.target;
14572
14571
  this.naturalWidth = img.naturalWidth;
14573
14572
  this.naturalHeight = img.naturalHeight;
14574
- setTimeout(() => {
14575
- const blockCard = getBlockCardByNativeElement(this.nativeElement);
14576
- const style = getComputedStyle(blockCard);
14577
- this.resolveImageHeight?.(blockCard.offsetHeight + parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));
14578
- }, 0);
14579
14573
  }
14580
14574
  imageError(event) {
14581
14575
  const img = event.target;
@@ -14622,11 +14616,6 @@ class TheImage extends TheBaseElement {
14622
14616
  });
14623
14617
  }
14624
14618
  }
14625
- getRealHeight() {
14626
- return new Promise(resolve => {
14627
- this.resolveImageHeight = resolve;
14628
- });
14629
- }
14630
14619
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: TheImage, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.ThyImageGroup }, { token: THE_IMAGE_SERVICE_TOKEN }, { token: TheContextService }, { token: i1.ThyPopover }, { token: i2.Overlay }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component }); }
14631
14620
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: TheImage, isStandalone: true, selector: "the-image, [theImage]", providers: [ThyImageService], viewQueries: [{ propertyName: "imageContent", first: true, predicate: ["imageContent"], descendants: true }, { propertyName: "img", first: true, predicate: ["img"], descendants: true }, { propertyName: "layoutToolbar", first: true, predicate: ["layoutToolbar"], descendants: true, static: true }, { propertyName: "imageDirective", first: true, predicate: ThyImageDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"the-image-container\" contenteditable=\"false\" [style.textAlign]=\"imageEntry.align\">\n @if (imageEntry.thumbUrl) {\n <div #imageContent class=\"image-content\" contenteditable=\"false\" [class.cursor-pointer]=\"!selection\">\n <img\n #img\n thyImage\n class=\"main-image\"\n [class.image-collapsed]=\"selection && !uploading\"\n [ngStyle]=\"{ 'width.px': imageBindingWidth }\"\n [alt]=\"imageEntry.name\"\n [thySrc]=\"imageEntry.thumbUrl\"\n [thyPreviewSrc]=\"imageEntry.thumbUrl\"\n [thyOriginSrc]=\"imageEntry.originUrl\"\n [thyDisablePreview]=\"disablePreview\"\n [thyImageMeta]=\"{ name: imageEntry.name, size: imageEntry.size }\"\n (load)=\"imageLoaded($event)\"\n (mousedown)=\"preventDefault($event)\"\n (error)=\"imageError($event)\"\n (click)=\"imageClick($event)\"\n />\n @if (isCollapsedAndNonReadonly) {\n <div class=\"image-profile\" [class.outline]=\"selection\">\n @if (!loadImageError) {\n <span (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left top\"></span>\n <span (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right top\"></span>\n <span (mousedown)=\"startDrag($event, 'xl')\" class=\"image-pointer right bottom\"></span>\n <span (mousedown)=\"startDrag($event, '-xl')\" class=\"image-pointer left bottom\"></span>\n }\n </div>\n }\n <ng-template [ngTemplateOutlet]=\"imageUploading\"></ng-template>\n @if (!uploading) {\n <div class=\"layer\" [class.readonly]=\"readonly\"></div>\n }\n </div>\n } @else {\n @if (!imageEntry.thumbUrl) {\n <div class=\"image-loading cursor-pointer\" contenteditable=\"false\">\n <thy-icon thyIconName=\"image\"></thy-icon>\n </div>\n }\n <ng-template [ngTemplateOutlet]=\"imageUploading\"></ng-template>\n }\n</div>\n\n<ng-template #layoutToolbar>\n <thy-actions thySize=\"xxs\">\n @for (item of layoutOptions; track $index) {\n @if (item.key !== 'split') {\n <a\n href=\"javascript:;\"\n thyAction\n [thyType]=\"item.key === 'remove' ? 'danger' : 'primary'\"\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"layoutActive(item.key)\"\n [thyTooltip]=\"item.name\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"item?.handle($event, item.key)\"\n ></a>\n }\n @if (item.key === 'split') {\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\" thyColor=\"light\"></thy-divider>\n }\n }\n </thy-actions>\n</ng-template>\n\n<ng-template #imageUploading>\n @if (uploading) {\n <div class=\"uploading\">\n <div class=\"uploading-percentage\">\n <thy-progress thyType=\"primary\" [thyValue]=\"percentage\" thySize=\"sm\"></thy-progress>\n <thy-icon (click)=\"cancelUpload($event)\" thyIconName=\"close-circle-bold-fill\" thyIconLegging=\"true\"> </thy-icon>\n </div>\n </div>\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: ThyImageDirective, selector: "img[thyImage]", inputs: ["thySrc", "thyPreviewSrc", "thyOriginSrc", "thyImageMeta", "thyDisablePreview", "thyResolveSize"], exportAs: ["thyImage"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "component", type: ThyActions, selector: "thy-actions", inputs: ["thySize"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: ThyProgress, selector: "thy-progress", inputs: ["thyType", "thySize", "thyValue", "thyMax", "thyTips", "thyShape", "thyGapDegree", "thyGapPosition", "thyStrokeWidth"] }] }); }
14632
14621
  }
@@ -18361,8 +18350,7 @@ class TheEditorComponent {
18361
18350
  return;
18362
18351
  }
18363
18352
  const { scrollTop, clientHeight } = this.scrollContainerElement;
18364
- console.log('scrollTop', scrollTop);
18365
- if (localStorage.getItem(SLATE_DEBUG_KEY)) {
18353
+ if (localStorage.getItem(SLATE_DEBUG_KEY + '__SCROLL_TOP')) {
18366
18354
  console.log(`theia: scroll event fired from user: ${scrollTop}`);
18367
18355
  }
18368
18356
  this.virtualConfig.update(config => ({