inline-style-editor 1.2.12 → 1.2.13

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.
@@ -2076,7 +2076,7 @@ function get_each_context_5(ctx, list, i) {
2076
2076
  return child_ctx;
2077
2077
  }
2078
2078
 
2079
- // (403:4) {#if targetsToSearch.length > 1}
2079
+ // (406:4) {#if targetsToSearch.length > 1}
2080
2080
  function create_if_block_8(ctx) {
2081
2081
  let div;
2082
2082
  let b;
@@ -2141,7 +2141,7 @@ function create_if_block_8(ctx) {
2141
2141
  };
2142
2142
  }
2143
2143
 
2144
- // (406:8) {#each targetsToSearch as target, elemIndex}
2144
+ // (409:8) {#each targetsToSearch as target, elemIndex}
2145
2145
  function create_each_block_5(ctx) {
2146
2146
  let span;
2147
2147
  let t0;
@@ -2188,7 +2188,7 @@ function create_each_block_5(ctx) {
2188
2188
  };
2189
2189
  }
2190
2190
 
2191
- // (415:8) {#each getRuleNames(allRules[selectedElemIndex]) as ruleName, ruleIndex}
2191
+ // (418:8) {#each getRuleNames(allRules[selectedElemIndex]) as ruleName, ruleIndex}
2192
2192
  function create_each_block_4(ctx) {
2193
2193
  let span;
2194
2194
  let t_value = /*ruleName*/ ctx[75] + "";
@@ -2237,7 +2237,7 @@ function create_each_block_4(ctx) {
2237
2237
  };
2238
2238
  }
2239
2239
 
2240
- // (426:12) {#if type !== 'custom' || (currentRule === 'inline' && type === 'custom' && hasDisplayedCustom )}
2240
+ // (429:12) {#if type !== 'custom' || (currentRule === 'inline' && type === 'custom' && hasDisplayedCustom )}
2241
2241
  function create_if_block_7(ctx) {
2242
2242
  let span;
2243
2243
  let t0_value = /*type*/ ctx[72] + "";
@@ -2283,7 +2283,7 @@ function create_if_block_7(ctx) {
2283
2283
  };
2284
2284
  }
2285
2285
 
2286
- // (424:8) {#each allTypes[selectedElemIndex] || [] as type, typeIndex}
2286
+ // (427:8) {#each allTypes[selectedElemIndex] || [] as type, typeIndex}
2287
2287
  function create_each_block_3(ctx) {
2288
2288
  let if_block_anchor;
2289
2289
  let if_block = (/*type*/ ctx[72] !== 'custom' || /*currentRule*/ ctx[16] === 'inline' && /*type*/ ctx[72] === 'custom' && /*hasDisplayedCustom*/ ctx[15]) && create_if_block_7(ctx);
@@ -2318,7 +2318,7 @@ function create_each_block_3(ctx) {
2318
2318
  };
2319
2319
  }
2320
2320
 
2321
- // (431:4) {#if allTypes[selectedElemIndex]}
2321
+ // (434:4) {#if allTypes[selectedElemIndex]}
2322
2322
  function create_if_block(ctx) {
2323
2323
  let div;
2324
2324
  let t;
@@ -2426,7 +2426,7 @@ function create_if_block(ctx) {
2426
2426
  };
2427
2427
  }
2428
2428
 
2429
- // (442:16) {:else}
2429
+ // (445:16) {:else}
2430
2430
  function create_else_block(ctx) {
2431
2431
  let span;
2432
2432
  let t_value = /*selectedName*/ ctx[63] + "";
@@ -2450,7 +2450,7 @@ function create_else_block(ctx) {
2450
2450
  };
2451
2451
  }
2452
2452
 
2453
- // (436:16) {#if choices.props.length > 1}
2453
+ // (439:16) {#if choices.props.length > 1}
2454
2454
  function create_if_block_6(ctx) {
2455
2455
  let div;
2456
2456
  let select;
@@ -2524,7 +2524,7 @@ function create_if_block_6(ctx) {
2524
2524
  };
2525
2525
  }
2526
2526
 
2527
- // (438:24) {#each choices.props as propName, i}
2527
+ // (441:24) {#each choices.props as propName, i}
2528
2528
  function create_each_block_2(ctx) {
2529
2529
  let option;
2530
2530
  let t0_value = /*propName*/ ctx[69] + "";
@@ -2559,7 +2559,7 @@ function create_each_block_2(ctx) {
2559
2559
  };
2560
2560
  }
2561
2561
 
2562
- // (465:50)
2562
+ // (468:50)
2563
2563
  function create_if_block_5(ctx) {
2564
2564
  let colorpicker;
2565
2565
  let current;
@@ -2605,7 +2605,7 @@ function create_if_block_5(ctx) {
2605
2605
  };
2606
2606
  }
2607
2607
 
2608
- // (455:51)
2608
+ // (458:51)
2609
2609
  function create_if_block_3(ctx) {
2610
2610
  let select;
2611
2611
  let show_if = !/*choices*/ ctx[62].includes(/*allCurrentPropDefs*/ ctx[13][/*selectedName*/ ctx[63]].value);
@@ -2698,7 +2698,7 @@ function create_if_block_3(ctx) {
2698
2698
  };
2699
2699
  }
2700
2700
 
2701
- // (446:16) {#if choices.type === 'slider'}
2701
+ // (449:16) {#if choices.type === 'slider'}
2702
2702
  function create_if_block_2(ctx) {
2703
2703
  let input;
2704
2704
  let input_min_value;
@@ -2773,7 +2773,7 @@ function create_if_block_2(ctx) {
2773
2773
  };
2774
2774
  }
2775
2775
 
2776
- // (458:24) {#if !choices.includes(allCurrentPropDefs[selectedName].value)}
2776
+ // (461:24) {#if !choices.includes(allCurrentPropDefs[selectedName].value)}
2777
2777
  function create_if_block_4(ctx) {
2778
2778
  let option;
2779
2779
 
@@ -2794,7 +2794,7 @@ function create_if_block_4(ctx) {
2794
2794
  };
2795
2795
  }
2796
2796
 
2797
- // (461:24) {#each choices as choice}
2797
+ // (464:24) {#each choices as choice}
2798
2798
  function create_each_block_1(ctx) {
2799
2799
  let option;
2800
2800
  let t_value = /*choice*/ ctx[66] + "";
@@ -2832,7 +2832,7 @@ function create_each_block_1(ctx) {
2832
2832
  };
2833
2833
  }
2834
2834
 
2835
- // (433:8) {#each propsByType as choices}
2835
+ // (436:8) {#each propsByType as choices}
2836
2836
  function create_each_block(ctx) {
2837
2837
  let div;
2838
2838
  let t0;
@@ -2978,7 +2978,7 @@ function create_each_block(ctx) {
2978
2978
  };
2979
2979
  }
2980
2980
 
2981
- // (473:8) {#if currentRule === 'inline' && bringableToFront[selectedElemIndex] !== null}
2981
+ // (476:8) {#if currentRule === 'inline' && bringableToFront[selectedElemIndex] !== null}
2982
2982
  function create_if_block_1(ctx) {
2983
2983
  let div;
2984
2984
  let mounted;
@@ -3638,13 +3638,13 @@ function instance($$self, $$props, $$invalidate) {
3638
3638
  allTypes[0].push(customType);
3639
3639
  }
3640
3640
 
3641
+ await tick();
3642
+ initAndGroup();
3643
+
3641
3644
  if (x && y) show(x, y); else {
3642
3645
  const rect = getBoundingBoxInfos(el, 15);
3643
3646
  show(rect.left, rect.top);
3644
3647
  }
3645
-
3646
- await tick();
3647
- initAndGroup();
3648
3648
  }
3649
3649
 
3650
3650
  function close() {
@@ -3662,18 +3662,22 @@ function instance($$self, $$props, $$invalidate) {
3662
3662
  }
3663
3663
 
3664
3664
  function show(x, y) {
3665
- x = x + 260 > pageDimensions.width
3666
- ? pageDimensions.width - 300
3665
+ $$invalidate(8, self.style.display = "block", self);
3666
+ $$invalidate(8, self.style.opacity = 0, self);
3667
+ const popupDimension = self.getBoundingClientRect();
3668
+
3669
+ x = x + popupDimension.width > pageDimensions.width
3670
+ ? x - popupDimension.width
3667
3671
  : x + 10;
3668
3672
 
3669
- y = y + 410 > pageDimensions.height
3670
- ? pageDimensions.height - 450
3673
+ y = y + popupDimension.height > pageDimensions.height
3674
+ ? y - popupDimension.height
3671
3675
  : y + 10;
3672
3676
 
3673
3677
  $$invalidate(8, self.style.left = x + "px", self);
3674
3678
  $$invalidate(8, self.style.top = y + "px", self);
3675
3679
  $$invalidate(9, helperElemWrapper.style.display = "block", helperElemWrapper);
3676
- $$invalidate(8, self.style.display = "block", self);
3680
+ $$invalidate(8, self.style.opacity = 1, self);
3677
3681
  updateHelpers();
3678
3682
  }
3679
3683