inline-style-editor 1.3.3 → 1.3.4

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.
@@ -2120,7 +2120,7 @@ function get_each_context_5(ctx, list, i) {
2120
2120
  return child_ctx;
2121
2121
  }
2122
2122
 
2123
- // (415:4) {#if targetsToSearch.length > 1}
2123
+ // (417:4) {#if targetsToSearch.length > 1}
2124
2124
  function create_if_block_9(ctx) {
2125
2125
  let div;
2126
2126
  let b;
@@ -2185,7 +2185,7 @@ function create_if_block_9(ctx) {
2185
2185
  };
2186
2186
  }
2187
2187
 
2188
- // (418:8) {#each targetsToSearch as [_, name], elemIndex}
2188
+ // (420:8) {#each targetsToSearch as [_, name], elemIndex}
2189
2189
  function create_each_block_5(ctx) {
2190
2190
  let span;
2191
2191
  let t0_value = /*name*/ ctx[82] + "";
@@ -2231,7 +2231,7 @@ function create_each_block_5(ctx) {
2231
2231
  };
2232
2232
  }
2233
2233
 
2234
- // (427:8) {#each getRuleNames(allRules[selectedElemIndex]) as ruleName, ruleIndex}
2234
+ // (429:8) {#each getRuleNames(allRules[selectedElemIndex]) as ruleName, ruleIndex}
2235
2235
  function create_each_block_4(ctx) {
2236
2236
  let span;
2237
2237
  let t_value = /*ruleName*/ ctx[78] + "";
@@ -2280,7 +2280,7 @@ function create_each_block_4(ctx) {
2280
2280
  };
2281
2281
  }
2282
2282
 
2283
- // (438:12) {#if type !== 'custom' || (currentRule === 'inline' && type === 'custom' && hasDisplayedCustom )}
2283
+ // (440:12) {#if type !== 'custom' || (currentRule === 'inline' && type === 'custom' && hasDisplayedCustom )}
2284
2284
  function create_if_block_8(ctx) {
2285
2285
  let span;
2286
2286
  let t0_value = /*type*/ ctx[75] + "";
@@ -2326,7 +2326,7 @@ function create_if_block_8(ctx) {
2326
2326
  };
2327
2327
  }
2328
2328
 
2329
- // (436:8) {#each allTypes[selectedElemIndex] || [] as type, typeIndex}
2329
+ // (438:8) {#each allTypes[selectedElemIndex] || [] as type, typeIndex}
2330
2330
  function create_each_block_3(ctx) {
2331
2331
  let if_block_anchor;
2332
2332
  let if_block = (/*type*/ ctx[75] !== 'custom' || /*currentRule*/ ctx[17] === 'inline' && /*type*/ ctx[75] === 'custom' && /*hasDisplayedCustom*/ ctx[16]) && create_if_block_8(ctx);
@@ -2361,7 +2361,7 @@ function create_each_block_3(ctx) {
2361
2361
  };
2362
2362
  }
2363
2363
 
2364
- // (443:4) {#if allTypes[selectedElemIndex]}
2364
+ // (445:4) {#if allTypes[selectedElemIndex]}
2365
2365
  function create_if_block(ctx) {
2366
2366
  let div;
2367
2367
  let t0;
@@ -2492,7 +2492,7 @@ function create_if_block(ctx) {
2492
2492
  };
2493
2493
  }
2494
2494
 
2495
- // (454:16) {:else}
2495
+ // (456:16) {:else}
2496
2496
  function create_else_block(ctx) {
2497
2497
  let span;
2498
2498
  let t_value = /*selectedName*/ ctx[66] + "";
@@ -2516,7 +2516,7 @@ function create_else_block(ctx) {
2516
2516
  };
2517
2517
  }
2518
2518
 
2519
- // (448:16) {#if choices.props.length > 1}
2519
+ // (450:16) {#if choices.props.length > 1}
2520
2520
  function create_if_block_7(ctx) {
2521
2521
  let div;
2522
2522
  let select;
@@ -2590,7 +2590,7 @@ function create_if_block_7(ctx) {
2590
2590
  };
2591
2591
  }
2592
2592
 
2593
- // (450:24) {#each choices.props as propName, i}
2593
+ // (452:24) {#each choices.props as propName, i}
2594
2594
  function create_each_block_2(ctx) {
2595
2595
  let option;
2596
2596
  let t0_value = /*propName*/ ctx[72] + "";
@@ -2625,7 +2625,7 @@ function create_each_block_2(ctx) {
2625
2625
  };
2626
2626
  }
2627
2627
 
2628
- // (477:50)
2628
+ // (479:50)
2629
2629
  function create_if_block_6(ctx) {
2630
2630
  let colorpicker;
2631
2631
  let current;
@@ -2671,7 +2671,7 @@ function create_if_block_6(ctx) {
2671
2671
  };
2672
2672
  }
2673
2673
 
2674
- // (467:51)
2674
+ // (469:51)
2675
2675
  function create_if_block_4(ctx) {
2676
2676
  let select;
2677
2677
  let show_if = !/*choices*/ ctx[65].includes(/*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].value);
@@ -2764,7 +2764,7 @@ function create_if_block_4(ctx) {
2764
2764
  };
2765
2765
  }
2766
2766
 
2767
- // (458:16) {#if choices.type === 'slider'}
2767
+ // (460:16) {#if choices.type === 'slider'}
2768
2768
  function create_if_block_3(ctx) {
2769
2769
  let input;
2770
2770
  let input_min_value;
@@ -2839,7 +2839,7 @@ function create_if_block_3(ctx) {
2839
2839
  };
2840
2840
  }
2841
2841
 
2842
- // (470:24) {#if !choices.includes(allCurrentPropDefs[selectedName].value)}
2842
+ // (472:24) {#if !choices.includes(allCurrentPropDefs[selectedName].value)}
2843
2843
  function create_if_block_5(ctx) {
2844
2844
  let option;
2845
2845
 
@@ -2860,7 +2860,7 @@ function create_if_block_5(ctx) {
2860
2860
  };
2861
2861
  }
2862
2862
 
2863
- // (473:24) {#each choices as choice}
2863
+ // (475:24) {#each choices as choice}
2864
2864
  function create_each_block_1(ctx) {
2865
2865
  let option;
2866
2866
  let t_value = /*choice*/ ctx[69] + "";
@@ -2898,7 +2898,7 @@ function create_each_block_1(ctx) {
2898
2898
  };
2899
2899
  }
2900
2900
 
2901
- // (445:8) {#each propsByType as choices}
2901
+ // (447:8) {#each propsByType as choices}
2902
2902
  function create_each_block(ctx) {
2903
2903
  let div;
2904
2904
  let t0;
@@ -3044,7 +3044,7 @@ function create_each_block(ctx) {
3044
3044
  };
3045
3045
  }
3046
3046
 
3047
- // (485:8) {#if currentRule === 'inline' && bringableToFront[selectedElemIndex] !== null}
3047
+ // (487:8) {#if currentRule === 'inline' && bringableToFront[selectedElemIndex] !== null}
3048
3048
  function create_if_block_2(ctx) {
3049
3049
  let div;
3050
3050
  let mounted;
@@ -3078,7 +3078,7 @@ function create_if_block_2(ctx) {
3078
3078
  };
3079
3079
  }
3080
3080
 
3081
- // (490:8) {#if currentRule === 'inline' && inlineDeletable(currentElement)}
3081
+ // (492:8) {#if currentRule === 'inline' && inlineDeletable(currentElement)}
3082
3082
  function create_if_block_1(ctx) {
3083
3083
  let div;
3084
3084
  let mounted;
@@ -3513,10 +3513,7 @@ function instance($$self, $$props, $$invalidate) {
3513
3513
  "background-color": { type: "color" }
3514
3514
  };
3515
3515
 
3516
- let { getAdditionalElems = () => {
3517
- return [];
3518
- } } = $$props;
3519
-
3516
+ let { getElems = null } = $$props;
3520
3517
  let { listenOnClick = false } = $$props;
3521
3518
 
3522
3519
  let { onStyleChanged = () => {
@@ -3722,7 +3719,8 @@ function instance($$self, $$props, $$invalidate) {
3722
3719
  $$invalidate(15, bringableToFront = []);
3723
3720
  $$invalidate(4, allTypes = []);
3724
3721
  $$invalidate(3, allRules = []);
3725
- $$invalidate(2, targetsToSearch = [[el, 'Clicked'], ...getAdditionalElems(el)]);
3722
+ console.log(getElems, getElems(el));
3723
+ if (getElems) $$invalidate(2, targetsToSearch = getElems(el)); else $$invalidate(2, targetsToSearch = [[el, 'Clicked']]);
3726
3724
  $$invalidate(4, allTypes = getEditableTypes(targetsToSearch));
3727
3725
  $$invalidate(16, hasDisplayedCustom = false);
3728
3726
  $$invalidate(3, allRules = getMatchedCSSRules(targetsToSearch));
@@ -3917,7 +3915,7 @@ function instance($$self, $$props, $$invalidate) {
3917
3915
  }
3918
3916
 
3919
3917
  $$self.$$set = $$props => {
3920
- if ('getAdditionalElems' in $$props) $$invalidate(25, getAdditionalElems = $$props.getAdditionalElems);
3918
+ if ('getElems' in $$props) $$invalidate(25, getElems = $$props.getElems);
3921
3919
  if ('listenOnClick' in $$props) $$invalidate(26, listenOnClick = $$props.listenOnClick);
3922
3920
  if ('onStyleChanged' in $$props) $$invalidate(27, onStyleChanged = $$props.onStyleChanged);
3923
3921
  if ('customProps' in $$props) $$invalidate(28, customProps = $$props.customProps);
@@ -3985,7 +3983,7 @@ function instance($$self, $$props, $$invalidate) {
3985
3983
  deleteElem,
3986
3984
  deleteProp,
3987
3985
  selectRule,
3988
- getAdditionalElems,
3986
+ getElems,
3989
3987
  listenOnClick,
3990
3988
  onStyleChanged,
3991
3989
  customProps,
@@ -4019,7 +4017,7 @@ class InlineStyleEditor$1 extends SvelteComponent {
4019
4017
  create_fragment,
4020
4018
  safe_not_equal,
4021
4019
  {
4022
- getAdditionalElems: 25,
4020
+ getElems: 25,
4023
4021
  listenOnClick: 26,
4024
4022
  onStyleChanged: 27,
4025
4023
  customProps: 28,