inline-style-editor 1.2.16 → 1.3.1

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.
@@ -2027,56 +2027,57 @@ function listFonts() {
2027
2027
 
2028
2028
  function get_each_context(ctx, list, i) {
2029
2029
  const child_ctx = ctx.slice();
2030
- child_ctx[64] = list[i];
2031
- child_ctx[66] = list;
2032
- child_ctx[67] = i;
2033
- const constants_0 = /*choices*/ child_ctx[64].props[/*choices*/ child_ctx[64].selected];
2034
- child_ctx[65] = constants_0;
2030
+ child_ctx[65] = list[i];
2031
+ child_ctx[67] = list;
2032
+ child_ctx[68] = i;
2033
+ const constants_0 = /*choices*/ child_ctx[65].props[/*choices*/ child_ctx[65].selected];
2034
+ child_ctx[66] = constants_0;
2035
2035
  return child_ctx;
2036
2036
  }
2037
2037
 
2038
2038
  function get_each_context_1(ctx, list, i) {
2039
2039
  const child_ctx = ctx.slice();
2040
- child_ctx[68] = list[i];
2040
+ child_ctx[69] = list[i];
2041
2041
  return child_ctx;
2042
2042
  }
2043
2043
 
2044
2044
  function get_if_ctx(ctx) {
2045
2045
  const child_ctx = ctx.slice();
2046
- const constants_0 = /*allCurrentPropDefs*/ child_ctx[14][/*selectedName*/ child_ctx[65]].choices();
2047
- child_ctx[64] = constants_0;
2046
+ const constants_0 = /*allCurrentPropDefs*/ child_ctx[14][/*selectedName*/ child_ctx[66]].choices();
2047
+ child_ctx[65] = constants_0;
2048
2048
  return child_ctx;
2049
2049
  }
2050
2050
 
2051
2051
  function get_each_context_2(ctx, list, i) {
2052
2052
  const child_ctx = ctx.slice();
2053
- child_ctx[71] = list[i];
2054
- child_ctx[73] = i;
2053
+ child_ctx[72] = list[i];
2054
+ child_ctx[74] = i;
2055
2055
  return child_ctx;
2056
2056
  }
2057
2057
 
2058
2058
  function get_each_context_3(ctx, list, i) {
2059
2059
  const child_ctx = ctx.slice();
2060
- child_ctx[74] = list[i];
2061
- child_ctx[76] = i;
2060
+ child_ctx[75] = list[i];
2061
+ child_ctx[77] = i;
2062
2062
  return child_ctx;
2063
2063
  }
2064
2064
 
2065
2065
  function get_each_context_4(ctx, list, i) {
2066
2066
  const child_ctx = ctx.slice();
2067
- child_ctx[77] = list[i];
2068
- child_ctx[79] = i;
2067
+ child_ctx[78] = list[i];
2068
+ child_ctx[80] = i;
2069
2069
  return child_ctx;
2070
2070
  }
2071
2071
 
2072
2072
  function get_each_context_5(ctx, list, i) {
2073
2073
  const child_ctx = ctx.slice();
2074
- child_ctx[80] = list[i];
2075
- child_ctx[82] = i;
2074
+ child_ctx[81] = list[i][0];
2075
+ child_ctx[82] = list[i][1];
2076
+ child_ctx[84] = i;
2076
2077
  return child_ctx;
2077
2078
  }
2078
2079
 
2079
- // (412:4) {#if targetsToSearch.length > 1}
2080
+ // (416:4) {#if targetsToSearch.length > 1}
2080
2081
  function create_if_block_9(ctx) {
2081
2082
  let div;
2082
2083
  let b;
@@ -2141,32 +2142,30 @@ function create_if_block_9(ctx) {
2141
2142
  };
2142
2143
  }
2143
2144
 
2144
- // (415:8) {#each targetsToSearch as target, elemIndex}
2145
+ // (419:8) {#each targetsToSearch as [_, name], elemIndex}
2145
2146
  function create_each_block_5(ctx) {
2146
2147
  let span;
2148
+ let t0_value = /*name*/ ctx[82] + "";
2147
2149
  let t0;
2148
2150
  let t1;
2149
- let t2;
2150
2151
  let mounted;
2151
2152
  let dispose;
2152
2153
 
2153
2154
  function click_handler() {
2154
- return /*click_handler*/ ctx[35](/*elemIndex*/ ctx[82]);
2155
+ return /*click_handler*/ ctx[36](/*elemIndex*/ ctx[84]);
2155
2156
  }
2156
2157
 
2157
2158
  return {
2158
2159
  c() {
2159
2160
  span = element("span");
2160
- t0 = text("Elem ");
2161
- t1 = text(/*elemIndex*/ ctx[82]);
2162
- t2 = space();
2163
- toggle_class(span, "selected", /*selectedElemIndex*/ ctx[5] === /*elemIndex*/ ctx[82]);
2161
+ t0 = text(t0_value);
2162
+ t1 = space();
2163
+ toggle_class(span, "selected", /*selectedElemIndex*/ ctx[5] === /*elemIndex*/ ctx[84]);
2164
2164
  },
2165
2165
  m(target, anchor) {
2166
2166
  insert(target, span, anchor);
2167
2167
  append(span, t0);
2168
2168
  append(span, t1);
2169
- append(span, t2);
2170
2169
 
2171
2170
  if (!mounted) {
2172
2171
  dispose = listen(span, "click", click_handler);
@@ -2175,9 +2174,10 @@ function create_each_block_5(ctx) {
2175
2174
  },
2176
2175
  p(new_ctx, dirty) {
2177
2176
  ctx = new_ctx;
2177
+ if (dirty[0] & /*targetsToSearch*/ 4 && t0_value !== (t0_value = /*name*/ ctx[82] + "")) set_data(t0, t0_value);
2178
2178
 
2179
2179
  if (dirty[0] & /*selectedElemIndex*/ 32) {
2180
- toggle_class(span, "selected", /*selectedElemIndex*/ ctx[5] === /*elemIndex*/ ctx[82]);
2180
+ toggle_class(span, "selected", /*selectedElemIndex*/ ctx[5] === /*elemIndex*/ ctx[84]);
2181
2181
  }
2182
2182
  },
2183
2183
  d(detaching) {
@@ -2188,25 +2188,25 @@ function create_each_block_5(ctx) {
2188
2188
  };
2189
2189
  }
2190
2190
 
2191
- // (424:8) {#each getRuleNames(allRules[selectedElemIndex]) as ruleName, ruleIndex}
2191
+ // (428:8) {#each getRuleNames(allRules[selectedElemIndex]) as ruleName, ruleIndex}
2192
2192
  function create_each_block_4(ctx) {
2193
2193
  let span;
2194
- let t_value = /*ruleName*/ ctx[77] + "";
2194
+ let t_value = /*ruleName*/ ctx[78] + "";
2195
2195
  let t;
2196
2196
  let span_title_value;
2197
2197
  let mounted;
2198
2198
  let dispose;
2199
2199
 
2200
2200
  function click_handler_1() {
2201
- return /*click_handler_1*/ ctx[36](/*ruleIndex*/ ctx[79]);
2201
+ return /*click_handler_1*/ ctx[37](/*ruleIndex*/ ctx[80]);
2202
2202
  }
2203
2203
 
2204
2204
  return {
2205
2205
  c() {
2206
2206
  span = element("span");
2207
2207
  t = text(t_value);
2208
- attr(span, "title", span_title_value = /*ruleName*/ ctx[77]);
2209
- toggle_class(span, "selected", /*selectedRuleIndex*/ ctx[6] === /*ruleIndex*/ ctx[79]);
2208
+ attr(span, "title", span_title_value = /*ruleName*/ ctx[78]);
2209
+ toggle_class(span, "selected", /*selectedRuleIndex*/ ctx[6] === /*ruleIndex*/ ctx[80]);
2210
2210
  },
2211
2211
  m(target, anchor) {
2212
2212
  insert(target, span, anchor);
@@ -2219,14 +2219,14 @@ function create_each_block_4(ctx) {
2219
2219
  },
2220
2220
  p(new_ctx, dirty) {
2221
2221
  ctx = new_ctx;
2222
- if (dirty[0] & /*allRules, selectedElemIndex*/ 40 && t_value !== (t_value = /*ruleName*/ ctx[77] + "")) set_data(t, t_value);
2222
+ if (dirty[0] & /*allRules, selectedElemIndex*/ 40 && t_value !== (t_value = /*ruleName*/ ctx[78] + "")) set_data(t, t_value);
2223
2223
 
2224
- if (dirty[0] & /*allRules, selectedElemIndex*/ 40 && span_title_value !== (span_title_value = /*ruleName*/ ctx[77])) {
2224
+ if (dirty[0] & /*allRules, selectedElemIndex*/ 40 && span_title_value !== (span_title_value = /*ruleName*/ ctx[78])) {
2225
2225
  attr(span, "title", span_title_value);
2226
2226
  }
2227
2227
 
2228
2228
  if (dirty[0] & /*selectedRuleIndex*/ 64) {
2229
- toggle_class(span, "selected", /*selectedRuleIndex*/ ctx[6] === /*ruleIndex*/ ctx[79]);
2229
+ toggle_class(span, "selected", /*selectedRuleIndex*/ ctx[6] === /*ruleIndex*/ ctx[80]);
2230
2230
  }
2231
2231
  },
2232
2232
  d(detaching) {
@@ -2237,17 +2237,17 @@ function create_each_block_4(ctx) {
2237
2237
  };
2238
2238
  }
2239
2239
 
2240
- // (435:12) {#if type !== 'custom' || (currentRule === 'inline' && type === 'custom' && hasDisplayedCustom )}
2240
+ // (439:12) {#if type !== 'custom' || (currentRule === 'inline' && type === 'custom' && hasDisplayedCustom )}
2241
2241
  function create_if_block_8(ctx) {
2242
2242
  let span;
2243
- let t0_value = /*type*/ ctx[74] + "";
2243
+ let t0_value = /*type*/ ctx[75] + "";
2244
2244
  let t0;
2245
2245
  let t1;
2246
2246
  let mounted;
2247
2247
  let dispose;
2248
2248
 
2249
2249
  function click_handler_2() {
2250
- return /*click_handler_2*/ ctx[37](/*typeIndex*/ ctx[76]);
2250
+ return /*click_handler_2*/ ctx[38](/*typeIndex*/ ctx[77]);
2251
2251
  }
2252
2252
 
2253
2253
  return {
@@ -2255,7 +2255,7 @@ function create_if_block_8(ctx) {
2255
2255
  span = element("span");
2256
2256
  t0 = text(t0_value);
2257
2257
  t1 = space();
2258
- toggle_class(span, "selected", /*selectedTypeIndex*/ ctx[7] === /*typeIndex*/ ctx[76]);
2258
+ toggle_class(span, "selected", /*selectedTypeIndex*/ ctx[7] === /*typeIndex*/ ctx[77]);
2259
2259
  },
2260
2260
  m(target, anchor) {
2261
2261
  insert(target, span, anchor);
@@ -2269,10 +2269,10 @@ function create_if_block_8(ctx) {
2269
2269
  },
2270
2270
  p(new_ctx, dirty) {
2271
2271
  ctx = new_ctx;
2272
- if (dirty[0] & /*allTypes, selectedElemIndex*/ 48 && t0_value !== (t0_value = /*type*/ ctx[74] + "")) set_data(t0, t0_value);
2272
+ if (dirty[0] & /*allTypes, selectedElemIndex*/ 48 && t0_value !== (t0_value = /*type*/ ctx[75] + "")) set_data(t0, t0_value);
2273
2273
 
2274
2274
  if (dirty[0] & /*selectedTypeIndex*/ 128) {
2275
- toggle_class(span, "selected", /*selectedTypeIndex*/ ctx[7] === /*typeIndex*/ ctx[76]);
2275
+ toggle_class(span, "selected", /*selectedTypeIndex*/ ctx[7] === /*typeIndex*/ ctx[77]);
2276
2276
  }
2277
2277
  },
2278
2278
  d(detaching) {
@@ -2283,10 +2283,10 @@ function create_if_block_8(ctx) {
2283
2283
  };
2284
2284
  }
2285
2285
 
2286
- // (433:8) {#each allTypes[selectedElemIndex] || [] as type, typeIndex}
2286
+ // (437:8) {#each allTypes[selectedElemIndex] || [] as type, typeIndex}
2287
2287
  function create_each_block_3(ctx) {
2288
2288
  let if_block_anchor;
2289
- let if_block = (/*type*/ ctx[74] !== 'custom' || /*currentRule*/ ctx[17] === 'inline' && /*type*/ ctx[74] === 'custom' && /*hasDisplayedCustom*/ ctx[16]) && create_if_block_8(ctx);
2289
+ let if_block = (/*type*/ ctx[75] !== 'custom' || /*currentRule*/ ctx[17] === 'inline' && /*type*/ ctx[75] === 'custom' && /*hasDisplayedCustom*/ ctx[16]) && create_if_block_8(ctx);
2290
2290
 
2291
2291
  return {
2292
2292
  c() {
@@ -2298,7 +2298,7 @@ function create_each_block_3(ctx) {
2298
2298
  insert(target, if_block_anchor, anchor);
2299
2299
  },
2300
2300
  p(ctx, dirty) {
2301
- if (/*type*/ ctx[74] !== 'custom' || /*currentRule*/ ctx[17] === 'inline' && /*type*/ ctx[74] === 'custom' && /*hasDisplayedCustom*/ ctx[16]) {
2301
+ if (/*type*/ ctx[75] !== 'custom' || /*currentRule*/ ctx[17] === 'inline' && /*type*/ ctx[75] === 'custom' && /*hasDisplayedCustom*/ ctx[16]) {
2302
2302
  if (if_block) {
2303
2303
  if_block.p(ctx, dirty);
2304
2304
  } else {
@@ -2318,7 +2318,7 @@ function create_each_block_3(ctx) {
2318
2318
  };
2319
2319
  }
2320
2320
 
2321
- // (440:4) {#if allTypes[selectedElemIndex]}
2321
+ // (444:4) {#if allTypes[selectedElemIndex]}
2322
2322
  function create_if_block(ctx) {
2323
2323
  let div;
2324
2324
  let t0;
@@ -2449,10 +2449,10 @@ function create_if_block(ctx) {
2449
2449
  };
2450
2450
  }
2451
2451
 
2452
- // (451:16) {:else}
2452
+ // (455:16) {:else}
2453
2453
  function create_else_block(ctx) {
2454
2454
  let span;
2455
- let t_value = /*selectedName*/ ctx[65] + "";
2455
+ let t_value = /*selectedName*/ ctx[66] + "";
2456
2456
  let t;
2457
2457
 
2458
2458
  return {
@@ -2465,7 +2465,7 @@ function create_else_block(ctx) {
2465
2465
  append(span, t);
2466
2466
  },
2467
2467
  p(ctx, dirty) {
2468
- if (dirty[0] & /*propsByType*/ 8192 && t_value !== (t_value = /*selectedName*/ ctx[65] + "")) set_data(t, t_value);
2468
+ if (dirty[0] & /*propsByType*/ 8192 && t_value !== (t_value = /*selectedName*/ ctx[66] + "")) set_data(t, t_value);
2469
2469
  },
2470
2470
  d(detaching) {
2471
2471
  if (detaching) detach(span);
@@ -2473,13 +2473,13 @@ function create_else_block(ctx) {
2473
2473
  };
2474
2474
  }
2475
2475
 
2476
- // (445:16) {#if choices.props.length > 1}
2476
+ // (449:16) {#if choices.props.length > 1}
2477
2477
  function create_if_block_7(ctx) {
2478
2478
  let div;
2479
2479
  let select;
2480
2480
  let mounted;
2481
2481
  let dispose;
2482
- let each_value_2 = /*choices*/ ctx[64].props;
2482
+ let each_value_2 = /*choices*/ ctx[65].props;
2483
2483
  let each_blocks = [];
2484
2484
 
2485
2485
  for (let i = 0; i < each_value_2.length; i += 1) {
@@ -2487,7 +2487,7 @@ function create_if_block_7(ctx) {
2487
2487
  }
2488
2488
 
2489
2489
  function change_handler(...args) {
2490
- return /*change_handler*/ ctx[38](/*choices*/ ctx[64], /*each_value*/ ctx[66], /*choices_index*/ ctx[67], ...args);
2490
+ return /*change_handler*/ ctx[39](/*choices*/ ctx[65], /*each_value*/ ctx[67], /*choices_index*/ ctx[68], ...args);
2491
2491
  }
2492
2492
 
2493
2493
  return {
@@ -2516,7 +2516,7 @@ function create_if_block_7(ctx) {
2516
2516
  ctx = new_ctx;
2517
2517
 
2518
2518
  if (dirty[0] & /*propsByType*/ 8192) {
2519
- each_value_2 = /*choices*/ ctx[64].props;
2519
+ each_value_2 = /*choices*/ ctx[65].props;
2520
2520
  let i;
2521
2521
 
2522
2522
  for (i = 0; i < each_value_2.length; i += 1) {
@@ -2547,10 +2547,10 @@ function create_if_block_7(ctx) {
2547
2547
  };
2548
2548
  }
2549
2549
 
2550
- // (447:24) {#each choices.props as propName, i}
2550
+ // (451:24) {#each choices.props as propName, i}
2551
2551
  function create_each_block_2(ctx) {
2552
2552
  let option;
2553
- let t0_value = /*propName*/ ctx[71] + "";
2553
+ let t0_value = /*propName*/ ctx[72] + "";
2554
2554
  let t0;
2555
2555
  let t1;
2556
2556
  let option_selected_value;
@@ -2560,8 +2560,8 @@ function create_each_block_2(ctx) {
2560
2560
  option = element("option");
2561
2561
  t0 = text(t0_value);
2562
2562
  t1 = space();
2563
- option.selected = option_selected_value = /*i*/ ctx[73] === /*choices*/ ctx[64].selected;
2564
- option.__value = /*i*/ ctx[73];
2563
+ option.selected = option_selected_value = /*i*/ ctx[74] === /*choices*/ ctx[65].selected;
2564
+ option.__value = /*i*/ ctx[74];
2565
2565
  option.value = option.__value;
2566
2566
  },
2567
2567
  m(target, anchor) {
@@ -2570,9 +2570,9 @@ function create_each_block_2(ctx) {
2570
2570
  append(option, t1);
2571
2571
  },
2572
2572
  p(ctx, dirty) {
2573
- if (dirty[0] & /*propsByType*/ 8192 && t0_value !== (t0_value = /*propName*/ ctx[71] + "")) set_data(t0, t0_value);
2573
+ if (dirty[0] & /*propsByType*/ 8192 && t0_value !== (t0_value = /*propName*/ ctx[72] + "")) set_data(t0, t0_value);
2574
2574
 
2575
- if (dirty[0] & /*propsByType*/ 8192 && option_selected_value !== (option_selected_value = /*i*/ ctx[73] === /*choices*/ ctx[64].selected)) {
2575
+ if (dirty[0] & /*propsByType*/ 8192 && option_selected_value !== (option_selected_value = /*i*/ ctx[74] === /*choices*/ ctx[65].selected)) {
2576
2576
  option.selected = option_selected_value;
2577
2577
  }
2578
2578
  },
@@ -2582,18 +2582,18 @@ function create_each_block_2(ctx) {
2582
2582
  };
2583
2583
  }
2584
2584
 
2585
- // (474:50)
2585
+ // (478:50)
2586
2586
  function create_if_block_6(ctx) {
2587
2587
  let colorpicker;
2588
2588
  let current;
2589
2589
 
2590
2590
  function func(...args) {
2591
- return /*func*/ ctx[42](/*selectedName*/ ctx[65], ...args);
2591
+ return /*func*/ ctx[43](/*selectedName*/ ctx[66], ...args);
2592
2592
  }
2593
2593
 
2594
2594
  colorpicker = new ColorPicker$1({
2595
2595
  props: {
2596
- value: /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[65]].value,
2596
+ value: /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].value,
2597
2597
  onChange: func
2598
2598
  }
2599
2599
  });
@@ -2609,7 +2609,7 @@ function create_if_block_6(ctx) {
2609
2609
  p(new_ctx, dirty) {
2610
2610
  ctx = new_ctx;
2611
2611
  const colorpicker_changes = {};
2612
- if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576) colorpicker_changes.value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[65]].value;
2612
+ if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576) colorpicker_changes.value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].value;
2613
2613
  if (dirty[0] & /*propsByType*/ 8192) colorpicker_changes.onChange = func;
2614
2614
  colorpicker.$set(colorpicker_changes);
2615
2615
  },
@@ -2628,15 +2628,15 @@ function create_if_block_6(ctx) {
2628
2628
  };
2629
2629
  }
2630
2630
 
2631
- // (464:51)
2631
+ // (468:51)
2632
2632
  function create_if_block_4(ctx) {
2633
2633
  let select;
2634
- let show_if = !/*choices*/ ctx[64].includes(/*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[65]].value);
2634
+ let show_if = !/*choices*/ ctx[65].includes(/*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].value);
2635
2635
  let if_block_anchor;
2636
2636
  let mounted;
2637
2637
  let dispose;
2638
2638
  let if_block = show_if && create_if_block_5();
2639
- let each_value_1 = /*choices*/ ctx[64];
2639
+ let each_value_1 = /*choices*/ ctx[65];
2640
2640
  let each_blocks = [];
2641
2641
 
2642
2642
  for (let i = 0; i < each_value_1.length; i += 1) {
@@ -2644,7 +2644,7 @@ function create_if_block_4(ctx) {
2644
2644
  }
2645
2645
 
2646
2646
  function change_handler_2(...args) {
2647
- return /*change_handler_2*/ ctx[41](/*selectedName*/ ctx[65], ...args);
2647
+ return /*change_handler_2*/ ctx[42](/*selectedName*/ ctx[66], ...args);
2648
2648
  }
2649
2649
 
2650
2650
  return {
@@ -2673,7 +2673,7 @@ function create_if_block_4(ctx) {
2673
2673
  },
2674
2674
  p(new_ctx, dirty) {
2675
2675
  ctx = new_ctx;
2676
- if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576) show_if = !/*choices*/ ctx[64].includes(/*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[65]].value);
2676
+ if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576) show_if = !/*choices*/ ctx[65].includes(/*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].value);
2677
2677
 
2678
2678
  if (show_if) {
2679
2679
  if (if_block) ; else {
@@ -2687,7 +2687,7 @@ function create_if_block_4(ctx) {
2687
2687
  }
2688
2688
 
2689
2689
  if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576) {
2690
- each_value_1 = /*choices*/ ctx[64];
2690
+ each_value_1 = /*choices*/ ctx[65];
2691
2691
  let i;
2692
2692
 
2693
2693
  for (i = 0; i < each_value_1.length; i += 1) {
@@ -2721,7 +2721,7 @@ function create_if_block_4(ctx) {
2721
2721
  };
2722
2722
  }
2723
2723
 
2724
- // (455:16) {#if choices.type === 'slider'}
2724
+ // (459:16) {#if choices.type === 'slider'}
2725
2725
  function create_if_block_3(ctx) {
2726
2726
  let input;
2727
2727
  let input_min_value;
@@ -2730,13 +2730,13 @@ function create_if_block_3(ctx) {
2730
2730
  let input_value_value;
2731
2731
  let t0;
2732
2732
  let span;
2733
- let t1_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[65]].displayed + "";
2733
+ let t1_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].displayed + "";
2734
2734
  let t1;
2735
2735
  let mounted;
2736
2736
  let dispose;
2737
2737
 
2738
2738
  function change_handler_1(...args) {
2739
- return /*change_handler_1*/ ctx[40](/*selectedName*/ ctx[65], ...args);
2739
+ return /*change_handler_1*/ ctx[41](/*selectedName*/ ctx[66], ...args);
2740
2740
  }
2741
2741
 
2742
2742
  return {
@@ -2746,10 +2746,10 @@ function create_if_block_3(ctx) {
2746
2746
  span = element("span");
2747
2747
  t1 = text(t1_value);
2748
2748
  attr(input, "type", "range");
2749
- attr(input, "min", input_min_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[65]].min);
2750
- attr(input, "max", input_max_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[65]].max);
2751
- attr(input, "step", input_step_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[65]].step || 1);
2752
- input.value = input_value_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[65]].value;
2749
+ attr(input, "min", input_min_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].min);
2750
+ attr(input, "max", input_max_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].max);
2751
+ attr(input, "step", input_step_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].step || 1);
2752
+ input.value = input_value_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].value;
2753
2753
  attr(span, "class", "current-value");
2754
2754
  },
2755
2755
  m(target, anchor) {
@@ -2766,23 +2766,23 @@ function create_if_block_3(ctx) {
2766
2766
  p(new_ctx, dirty) {
2767
2767
  ctx = new_ctx;
2768
2768
 
2769
- if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && input_min_value !== (input_min_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[65]].min)) {
2769
+ if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && input_min_value !== (input_min_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].min)) {
2770
2770
  attr(input, "min", input_min_value);
2771
2771
  }
2772
2772
 
2773
- if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && input_max_value !== (input_max_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[65]].max)) {
2773
+ if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && input_max_value !== (input_max_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].max)) {
2774
2774
  attr(input, "max", input_max_value);
2775
2775
  }
2776
2776
 
2777
- if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && input_step_value !== (input_step_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[65]].step || 1)) {
2777
+ if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && input_step_value !== (input_step_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].step || 1)) {
2778
2778
  attr(input, "step", input_step_value);
2779
2779
  }
2780
2780
 
2781
- if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && input_value_value !== (input_value_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[65]].value)) {
2781
+ if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && input_value_value !== (input_value_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].value)) {
2782
2782
  input.value = input_value_value;
2783
2783
  }
2784
2784
 
2785
- if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && t1_value !== (t1_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[65]].displayed + "")) set_data(t1, t1_value);
2785
+ if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && t1_value !== (t1_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].displayed + "")) set_data(t1, t1_value);
2786
2786
  },
2787
2787
  i: noop$1,
2788
2788
  o: noop$1,
@@ -2796,7 +2796,7 @@ function create_if_block_3(ctx) {
2796
2796
  };
2797
2797
  }
2798
2798
 
2799
- // (467:24) {#if !choices.includes(allCurrentPropDefs[selectedName].value)}
2799
+ // (471:24) {#if !choices.includes(allCurrentPropDefs[selectedName].value)}
2800
2800
  function create_if_block_5(ctx) {
2801
2801
  let option;
2802
2802
 
@@ -2817,10 +2817,10 @@ function create_if_block_5(ctx) {
2817
2817
  };
2818
2818
  }
2819
2819
 
2820
- // (470:24) {#each choices as choice}
2820
+ // (474:24) {#each choices as choice}
2821
2821
  function create_each_block_1(ctx) {
2822
2822
  let option;
2823
- let t_value = /*choice*/ ctx[68] + "";
2823
+ let t_value = /*choice*/ ctx[69] + "";
2824
2824
  let t;
2825
2825
  let option_selected_value;
2826
2826
  let option_value_value;
@@ -2829,8 +2829,8 @@ function create_each_block_1(ctx) {
2829
2829
  c() {
2830
2830
  option = element("option");
2831
2831
  t = text(t_value);
2832
- option.selected = option_selected_value = /*choice*/ ctx[68] == /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[65]].value || null;
2833
- option.__value = option_value_value = " " + /*choice*/ ctx[68] + " ";
2832
+ option.selected = option_selected_value = /*choice*/ ctx[69] == /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].value || null;
2833
+ option.__value = option_value_value = " " + /*choice*/ ctx[69] + " ";
2834
2834
  option.value = option.__value;
2835
2835
  },
2836
2836
  m(target, anchor) {
@@ -2838,13 +2838,13 @@ function create_each_block_1(ctx) {
2838
2838
  append(option, t);
2839
2839
  },
2840
2840
  p(ctx, dirty) {
2841
- if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && t_value !== (t_value = /*choice*/ ctx[68] + "")) set_data(t, t_value);
2841
+ if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && t_value !== (t_value = /*choice*/ ctx[69] + "")) set_data(t, t_value);
2842
2842
 
2843
- if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && option_selected_value !== (option_selected_value = /*choice*/ ctx[68] == /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[65]].value || null)) {
2843
+ if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && option_selected_value !== (option_selected_value = /*choice*/ ctx[69] == /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].value || null)) {
2844
2844
  option.selected = option_selected_value;
2845
2845
  }
2846
2846
 
2847
- if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && option_value_value !== (option_value_value = " " + /*choice*/ ctx[68] + " ")) {
2847
+ if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && option_value_value !== (option_value_value = " " + /*choice*/ ctx[69] + " ")) {
2848
2848
  option.__value = option_value_value;
2849
2849
  option.value = option.__value;
2850
2850
  }
@@ -2855,7 +2855,7 @@ function create_each_block_1(ctx) {
2855
2855
  };
2856
2856
  }
2857
2857
 
2858
- // (442:8) {#each propsByType as choices}
2858
+ // (446:8) {#each propsByType as choices}
2859
2859
  function create_each_block(ctx) {
2860
2860
  let div;
2861
2861
  let t0;
@@ -2868,7 +2868,7 @@ function create_each_block(ctx) {
2868
2868
  let dispose;
2869
2869
 
2870
2870
  function select_block_type(ctx, dirty) {
2871
- if (/*choices*/ ctx[64].props.length > 1) return create_if_block_7;
2871
+ if (/*choices*/ ctx[65].props.length > 1) return create_if_block_7;
2872
2872
  return create_else_block;
2873
2873
  }
2874
2874
 
@@ -2876,16 +2876,16 @@ function create_each_block(ctx) {
2876
2876
  let if_block0 = current_block_type(ctx);
2877
2877
 
2878
2878
  function click_handler_3() {
2879
- return /*click_handler_3*/ ctx[39](/*selectedName*/ ctx[65]);
2879
+ return /*click_handler_3*/ ctx[40](/*selectedName*/ ctx[66]);
2880
2880
  }
2881
2881
 
2882
2882
  const if_block_creators = [create_if_block_3, create_if_block_4, create_if_block_6];
2883
2883
  const if_blocks = [];
2884
2884
 
2885
2885
  function select_block_type_1(ctx, dirty) {
2886
- if (/*choices*/ ctx[64].type === 'slider') return 0;
2887
- if (/*choices*/ ctx[64].type == 'select') return 1;
2888
- if (/*choices*/ ctx[64].type == 'color') return 2;
2886
+ if (/*choices*/ ctx[65].type === 'slider') return 0;
2887
+ if (/*choices*/ ctx[65].type == 'select') return 1;
2888
+ if (/*choices*/ ctx[65].type == 'color') return 2;
2889
2889
  return -1;
2890
2890
  }
2891
2891
 
@@ -3001,7 +3001,7 @@ function create_each_block(ctx) {
3001
3001
  };
3002
3002
  }
3003
3003
 
3004
- // (482:8) {#if currentRule === 'inline' && bringableToFront[selectedElemIndex] !== null}
3004
+ // (486:8) {#if currentRule === 'inline' && bringableToFront[selectedElemIndex] !== null}
3005
3005
  function create_if_block_2(ctx) {
3006
3006
  let div;
3007
3007
  let mounted;
@@ -3035,7 +3035,7 @@ function create_if_block_2(ctx) {
3035
3035
  };
3036
3036
  }
3037
3037
 
3038
- // (487:8) {#if currentRule === 'inline' && inlineDeletable(currentElement)}
3038
+ // (491:8) {#if currentRule === 'inline' && inlineDeletable(currentElement)}
3039
3039
  function create_if_block_1(ctx) {
3040
3040
  let div;
3041
3041
  let mounted;
@@ -3164,13 +3164,13 @@ function create_fragment(ctx) {
3164
3164
  },
3165
3165
  m(target, anchor) {
3166
3166
  insert(target, div0, anchor);
3167
- /*div0_binding*/ ctx[33](div0);
3167
+ /*div0_binding*/ ctx[34](div0);
3168
3168
  insert(target, t0, anchor);
3169
3169
  insert(target, svg, anchor);
3170
3170
  append(svg, clipPath);
3171
3171
  append(clipPath, path);
3172
3172
  append(svg, rect);
3173
- /*svg_binding*/ ctx[34](svg);
3173
+ /*svg_binding*/ ctx[35](svg);
3174
3174
  insert(target, t1, anchor);
3175
3175
  insert(target, div4, anchor);
3176
3176
  append(div4, div1);
@@ -3196,7 +3196,7 @@ function create_fragment(ctx) {
3196
3196
 
3197
3197
  append(div4, t10);
3198
3198
  if (if_block1) if_block1.m(div4, null);
3199
- /*div4_binding*/ ctx[43](div4);
3199
+ /*div4_binding*/ ctx[44](div4);
3200
3200
  current = true;
3201
3201
 
3202
3202
  if (!mounted) {
@@ -3314,17 +3314,17 @@ function create_fragment(ctx) {
3314
3314
  },
3315
3315
  d(detaching) {
3316
3316
  if (detaching) detach(div0);
3317
- /*div0_binding*/ ctx[33](null);
3317
+ /*div0_binding*/ ctx[34](null);
3318
3318
  if (detaching) detach(t0);
3319
3319
  if (detaching) detach(svg);
3320
- /*svg_binding*/ ctx[34](null);
3320
+ /*svg_binding*/ ctx[35](null);
3321
3321
  if (detaching) detach(t1);
3322
3322
  if (detaching) detach(div4);
3323
3323
  if (if_block0) if_block0.d();
3324
3324
  destroy_each(each_blocks_1, detaching);
3325
3325
  destroy_each(each_blocks, detaching);
3326
3326
  if (if_block1) if_block1.d();
3327
- /*div4_binding*/ ctx[43](null);
3327
+ /*div4_binding*/ ctx[44](null);
3328
3328
  mounted = false;
3329
3329
  run_all(dispose);
3330
3330
  }
@@ -3482,6 +3482,7 @@ function instance($$self, $$props, $$invalidate) {
3482
3482
 
3483
3483
  let { customProps = {} } = $$props;
3484
3484
  let { inlineDeletable = () => true } = $$props;
3485
+ let { cssRuleFilter = null } = $$props;
3485
3486
 
3486
3487
  const propByType = {
3487
3488
  [typeText]: fontProps,
@@ -3498,7 +3499,7 @@ function instance($$self, $$props, $$invalidate) {
3498
3499
  let helperElemWrapper;
3499
3500
  let pathWithHoles = '';
3500
3501
  let pageDimensions = { width: 0, height: 0 };
3501
- let targetsToSearch = [];
3502
+ let targetsToSearch = [[]];
3502
3503
  let allRules = []; // list of list of CSS rules, for every target element
3503
3504
  let allTypes = []; // list of list of types (e.g color, border), for every target element
3504
3505
  let selectedElemIndex = 0;
@@ -3512,7 +3513,7 @@ function instance($$self, $$props, $$invalidate) {
3512
3513
 
3513
3514
  onMount(() => {
3514
3515
  close();
3515
- $$invalidate(31, elementToListen = self.parentNode);
3516
+ $$invalidate(32, elementToListen = self.parentNode);
3516
3517
  document.body.appendChild(self);
3517
3518
  document.body.appendChild(helperElemWrapper);
3518
3519
  document.body.appendChild(positionAnchor);
@@ -3593,7 +3594,8 @@ function instance($$self, $$props, $$invalidate) {
3593
3594
  const sheets = document.styleSheets;
3594
3595
 
3595
3596
  return elems.reduce(
3596
- (matchedRulesByElem, el) => {
3597
+ (matchedRulesByElem, elemDef) => {
3598
+ const el = elemDef[0];
3597
3599
  const matchedRules = ['inline'];
3598
3600
 
3599
3601
  for (let i in sheets) {
@@ -3607,6 +3609,7 @@ function instance($$self, $$props, $$invalidate) {
3607
3609
  if (selectorText.endsWith(':hover')) selectorText = selectorText.substring(0, selectorText.length - (':hover').length);
3608
3610
 
3609
3611
  if (el.matches(selectorText)) {
3612
+ if (cssRuleFilter !== null && !cssRuleFilter(el, rules[r].selectorText)) continue;
3610
3613
  matchedRules.push(rules[r]);
3611
3614
  }
3612
3615
  }
@@ -3627,10 +3630,11 @@ function instance($$self, $$props, $$invalidate) {
3627
3630
 
3628
3631
  function getEditableTypes(elems) {
3629
3632
  return elems.reduce(
3630
- (typesByElem, elem) => {
3633
+ (typesByElem, elemDef) => {
3634
+ const elem = elemDef[0];
3631
3635
  const types = [];
3632
3636
 
3633
- if (elem.firstChild && elem.firstChild.nodeType === 3) {
3637
+ if (elem.firstChild && (elem.firstChild.nodeType === 3 || elem.firstChild.tagName === 'tspan')) {
3634
3638
  // Node.TEXT_NODE
3635
3639
  types.push(typeText);
3636
3640
  }
@@ -3650,6 +3654,7 @@ function instance($$self, $$props, $$invalidate) {
3650
3654
  types.push(typeBackground);
3651
3655
  }
3652
3656
 
3657
+ console.log(types);
3653
3658
  if (bringable) bringableToFront.push(true); else bringableToFront.push(null);
3654
3659
  typesByElem.push(types);
3655
3660
  return typesByElem;
@@ -3675,7 +3680,7 @@ function instance($$self, $$props, $$invalidate) {
3675
3680
  $$invalidate(15, bringableToFront = []);
3676
3681
  $$invalidate(4, allTypes = []);
3677
3682
  $$invalidate(3, allRules = []);
3678
- $$invalidate(2, targetsToSearch = [el, ...getAdditionalElems(el)]);
3683
+ $$invalidate(2, targetsToSearch = [[el, 'Clicked'], ...getAdditionalElems(el)]);
3679
3684
  $$invalidate(4, allTypes = getEditableTypes(targetsToSearch));
3680
3685
  $$invalidate(16, hasDisplayedCustom = false);
3681
3686
  $$invalidate(3, allRules = getMatchedCSSRules(targetsToSearch));
@@ -3875,10 +3880,11 @@ function instance($$self, $$props, $$invalidate) {
3875
3880
  if ('onStyleChanged' in $$props) $$invalidate(27, onStyleChanged = $$props.onStyleChanged);
3876
3881
  if ('customProps' in $$props) $$invalidate(28, customProps = $$props.customProps);
3877
3882
  if ('inlineDeletable' in $$props) $$invalidate(0, inlineDeletable = $$props.inlineDeletable);
3883
+ if ('cssRuleFilter' in $$props) $$invalidate(29, cssRuleFilter = $$props.cssRuleFilter);
3878
3884
  };
3879
3885
 
3880
3886
  $$self.$$.update = () => {
3881
- if ($$self.$$.dirty[1] & /*elementToListen*/ 1) {
3887
+ if ($$self.$$.dirty[1] & /*elementToListen*/ 2) {
3882
3888
  {
3883
3889
  if (elementToListen !== null) {
3884
3890
  init();
@@ -3887,22 +3893,22 @@ function instance($$self, $$props, $$invalidate) {
3887
3893
  }
3888
3894
 
3889
3895
  if ($$self.$$.dirty[0] & /*targetsToSearch, selectedElemIndex*/ 36) {
3890
- $$invalidate(18, currentElement = targetsToSearch[selectedElemIndex]);
3896
+ $$invalidate(18, currentElement = targetsToSearch[selectedElemIndex][0]);
3891
3897
  }
3892
3898
 
3893
3899
  if ($$self.$$.dirty[0] & /*allRules, selectedElemIndex, selectedRuleIndex*/ 104) {
3894
3900
  $$invalidate(17, currentRule = allRules[selectedElemIndex]?.[selectedRuleIndex]);
3895
3901
  }
3896
3902
 
3897
- if ($$self.$$.dirty[0] & /*allTypes, selectedElemIndex, selectedTypeIndex*/ 176 | $$self.$$.dirty[1] & /*curType*/ 2) {
3903
+ if ($$self.$$.dirty[0] & /*allTypes, selectedElemIndex, selectedTypeIndex*/ 176 | $$self.$$.dirty[1] & /*curType*/ 4) {
3898
3904
  {
3899
3905
  if (allTypes[selectedElemIndex]?.[selectedTypeIndex] !== curType) {
3900
- $$invalidate(32, curType = allTypes[selectedElemIndex]?.[selectedTypeIndex]);
3906
+ $$invalidate(33, curType = allTypes[selectedElemIndex]?.[selectedTypeIndex]);
3901
3907
  }
3902
3908
  }
3903
3909
  }
3904
3910
 
3905
- if ($$self.$$.dirty[0] & /*selectedRuleIndex, selectedElemIndex*/ 96 | $$self.$$.dirty[1] & /*curType*/ 2) {
3911
+ if ($$self.$$.dirty[0] & /*selectedRuleIndex, selectedElemIndex*/ 96 | $$self.$$.dirty[1] & /*curType*/ 4) {
3906
3912
  {
3907
3913
  if (curType || selectedRuleIndex || selectedElemIndex) {
3908
3914
  initAndGroup();
@@ -3941,6 +3947,7 @@ function instance($$self, $$props, $$invalidate) {
3941
3947
  listenOnClick,
3942
3948
  onStyleChanged,
3943
3949
  customProps,
3950
+ cssRuleFilter,
3944
3951
  open,
3945
3952
  isOpened,
3946
3953
  elementToListen,
@@ -3975,9 +3982,10 @@ class InlineStyleEditor$1 extends SvelteComponent {
3975
3982
  onStyleChanged: 27,
3976
3983
  customProps: 28,
3977
3984
  inlineDeletable: 0,
3978
- open: 29,
3985
+ cssRuleFilter: 29,
3986
+ open: 30,
3979
3987
  close: 1,
3980
- isOpened: 30
3988
+ isOpened: 31
3981
3989
  },
3982
3990
  null,
3983
3991
  [-1, -1, -1]
@@ -3985,7 +3993,7 @@ class InlineStyleEditor$1 extends SvelteComponent {
3985
3993
  }
3986
3994
 
3987
3995
  get open() {
3988
- return this.$$.ctx[29];
3996
+ return this.$$.ctx[30];
3989
3997
  }
3990
3998
 
3991
3999
  get close() {
@@ -3993,7 +4001,7 @@ class InlineStyleEditor$1 extends SvelteComponent {
3993
4001
  }
3994
4002
 
3995
4003
  get isOpened() {
3996
- return this.$$.ctx[30];
4004
+ return this.$$.ctx[31];
3997
4005
  }
3998
4006
  }
3999
4007