inline-style-editor 1.2.9 → 1.2.10
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.
|
@@ -2042,6 +2042,13 @@ function get_each_context_1(ctx, list, i) {
|
|
|
2042
2042
|
return child_ctx;
|
|
2043
2043
|
}
|
|
2044
2044
|
|
|
2045
|
+
function get_if_ctx(ctx) {
|
|
2046
|
+
const child_ctx = ctx.slice();
|
|
2047
|
+
const constants_0 = /*allCurrentPropDefs*/ child_ctx[13][/*selectedName*/ child_ctx[63]].choices();
|
|
2048
|
+
child_ctx[62] = constants_0;
|
|
2049
|
+
return child_ctx;
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2045
2052
|
function get_each_context_2(ctx, list, i) {
|
|
2046
2053
|
const child_ctx = ctx.slice();
|
|
2047
2054
|
child_ctx[69] = list[i];
|
|
@@ -2070,8 +2077,8 @@ function get_each_context_5(ctx, list, i) {
|
|
|
2070
2077
|
return child_ctx;
|
|
2071
2078
|
}
|
|
2072
2079
|
|
|
2073
|
-
// (
|
|
2074
|
-
function
|
|
2080
|
+
// (397:4) {#if targetsToSearch.length > 1}
|
|
2081
|
+
function create_if_block_8(ctx) {
|
|
2075
2082
|
let div;
|
|
2076
2083
|
let b;
|
|
2077
2084
|
let t1;
|
|
@@ -2135,7 +2142,7 @@ function create_if_block_7(ctx) {
|
|
|
2135
2142
|
};
|
|
2136
2143
|
}
|
|
2137
2144
|
|
|
2138
|
-
// (
|
|
2145
|
+
// (400:8) {#each targetsToSearch as target, elemIndex}
|
|
2139
2146
|
function create_each_block_5(ctx) {
|
|
2140
2147
|
let span;
|
|
2141
2148
|
let t0;
|
|
@@ -2182,7 +2189,7 @@ function create_each_block_5(ctx) {
|
|
|
2182
2189
|
};
|
|
2183
2190
|
}
|
|
2184
2191
|
|
|
2185
|
-
// (
|
|
2192
|
+
// (409:8) {#each getRuleNames(allRules[selectedElemIndex]) as ruleName, ruleIndex}
|
|
2186
2193
|
function create_each_block_4(ctx) {
|
|
2187
2194
|
let span;
|
|
2188
2195
|
let t_value = /*ruleName*/ ctx[75] + "";
|
|
@@ -2231,8 +2238,8 @@ function create_each_block_4(ctx) {
|
|
|
2231
2238
|
};
|
|
2232
2239
|
}
|
|
2233
2240
|
|
|
2234
|
-
// (
|
|
2235
|
-
function
|
|
2241
|
+
// (420:12) {#if type !== 'custom' || (currentRule === 'inline' && type === 'custom' && hasDisplayedCustom )}
|
|
2242
|
+
function create_if_block_7(ctx) {
|
|
2236
2243
|
let span;
|
|
2237
2244
|
let t0_value = /*type*/ ctx[72] + "";
|
|
2238
2245
|
let t0;
|
|
@@ -2277,10 +2284,10 @@ function create_if_block_6(ctx) {
|
|
|
2277
2284
|
};
|
|
2278
2285
|
}
|
|
2279
2286
|
|
|
2280
|
-
// (
|
|
2287
|
+
// (418:8) {#each allTypes[selectedElemIndex] || [] as type, typeIndex}
|
|
2281
2288
|
function create_each_block_3(ctx) {
|
|
2282
2289
|
let if_block_anchor;
|
|
2283
|
-
let if_block = (/*type*/ ctx[72] !== 'custom' || /*currentRule*/ ctx[16] === 'inline' && /*type*/ ctx[72] === 'custom' && /*hasDisplayedCustom*/ ctx[15]) &&
|
|
2290
|
+
let if_block = (/*type*/ ctx[72] !== 'custom' || /*currentRule*/ ctx[16] === 'inline' && /*type*/ ctx[72] === 'custom' && /*hasDisplayedCustom*/ ctx[15]) && create_if_block_7(ctx);
|
|
2284
2291
|
|
|
2285
2292
|
return {
|
|
2286
2293
|
c() {
|
|
@@ -2296,7 +2303,7 @@ function create_each_block_3(ctx) {
|
|
|
2296
2303
|
if (if_block) {
|
|
2297
2304
|
if_block.p(ctx, dirty);
|
|
2298
2305
|
} else {
|
|
2299
|
-
if_block =
|
|
2306
|
+
if_block = create_if_block_7(ctx);
|
|
2300
2307
|
if_block.c();
|
|
2301
2308
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
2302
2309
|
}
|
|
@@ -2312,7 +2319,7 @@ function create_each_block_3(ctx) {
|
|
|
2312
2319
|
};
|
|
2313
2320
|
}
|
|
2314
2321
|
|
|
2315
|
-
// (
|
|
2322
|
+
// (425:4) {#if allTypes[selectedElemIndex]}
|
|
2316
2323
|
function create_if_block(ctx) {
|
|
2317
2324
|
let div;
|
|
2318
2325
|
let t;
|
|
@@ -2420,7 +2427,7 @@ function create_if_block(ctx) {
|
|
|
2420
2427
|
};
|
|
2421
2428
|
}
|
|
2422
2429
|
|
|
2423
|
-
// (
|
|
2430
|
+
// (436:16) {:else}
|
|
2424
2431
|
function create_else_block(ctx) {
|
|
2425
2432
|
let span;
|
|
2426
2433
|
let t_value = /*selectedName*/ ctx[63] + "";
|
|
@@ -2444,8 +2451,8 @@ function create_else_block(ctx) {
|
|
|
2444
2451
|
};
|
|
2445
2452
|
}
|
|
2446
2453
|
|
|
2447
|
-
// (
|
|
2448
|
-
function
|
|
2454
|
+
// (430:16) {#if choices.props.length > 1}
|
|
2455
|
+
function create_if_block_6(ctx) {
|
|
2449
2456
|
let div;
|
|
2450
2457
|
let select;
|
|
2451
2458
|
let mounted;
|
|
@@ -2518,7 +2525,7 @@ function create_if_block_5(ctx) {
|
|
|
2518
2525
|
};
|
|
2519
2526
|
}
|
|
2520
2527
|
|
|
2521
|
-
// (
|
|
2528
|
+
// (432:24) {#each choices.props as propName, i}
|
|
2522
2529
|
function create_each_block_2(ctx) {
|
|
2523
2530
|
let option;
|
|
2524
2531
|
let t0_value = /*propName*/ ctx[69] + "";
|
|
@@ -2553,8 +2560,8 @@ function create_each_block_2(ctx) {
|
|
|
2553
2560
|
};
|
|
2554
2561
|
}
|
|
2555
2562
|
|
|
2556
|
-
// (
|
|
2557
|
-
function
|
|
2563
|
+
// (459:46)
|
|
2564
|
+
function create_if_block_5(ctx) {
|
|
2558
2565
|
let colorpicker;
|
|
2559
2566
|
let current;
|
|
2560
2567
|
|
|
@@ -2599,12 +2606,15 @@ function create_if_block_4(ctx) {
|
|
|
2599
2606
|
};
|
|
2600
2607
|
}
|
|
2601
2608
|
|
|
2602
|
-
// (
|
|
2609
|
+
// (449:47)
|
|
2603
2610
|
function create_if_block_3(ctx) {
|
|
2604
2611
|
let select;
|
|
2612
|
+
let show_if = !/*choices*/ ctx[62].includes(/*allCurrentPropDefs*/ ctx[13][/*selectedName*/ ctx[63]].value);
|
|
2613
|
+
let if_block_anchor;
|
|
2605
2614
|
let mounted;
|
|
2606
2615
|
let dispose;
|
|
2607
|
-
let
|
|
2616
|
+
let if_block = show_if && create_if_block_4();
|
|
2617
|
+
let each_value_1 = /*choices*/ ctx[62];
|
|
2608
2618
|
let each_blocks = [];
|
|
2609
2619
|
|
|
2610
2620
|
for (let i = 0; i < each_value_1.length; i += 1) {
|
|
@@ -2618,6 +2628,8 @@ function create_if_block_3(ctx) {
|
|
|
2618
2628
|
return {
|
|
2619
2629
|
c() {
|
|
2620
2630
|
select = element("select");
|
|
2631
|
+
if (if_block) if_block.c();
|
|
2632
|
+
if_block_anchor = empty();
|
|
2621
2633
|
|
|
2622
2634
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
2623
2635
|
each_blocks[i].c();
|
|
@@ -2625,6 +2637,8 @@ function create_if_block_3(ctx) {
|
|
|
2625
2637
|
},
|
|
2626
2638
|
m(target, anchor) {
|
|
2627
2639
|
insert(target, select, anchor);
|
|
2640
|
+
if (if_block) if_block.m(select, null);
|
|
2641
|
+
append(select, if_block_anchor);
|
|
2628
2642
|
|
|
2629
2643
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
2630
2644
|
each_blocks[i].m(select, null);
|
|
@@ -2637,9 +2651,21 @@ function create_if_block_3(ctx) {
|
|
|
2637
2651
|
},
|
|
2638
2652
|
p(new_ctx, dirty) {
|
|
2639
2653
|
ctx = new_ctx;
|
|
2654
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 12288) show_if = !/*choices*/ ctx[62].includes(/*allCurrentPropDefs*/ ctx[13][/*selectedName*/ ctx[63]].value);
|
|
2655
|
+
|
|
2656
|
+
if (show_if) {
|
|
2657
|
+
if (if_block) ; else {
|
|
2658
|
+
if_block = create_if_block_4();
|
|
2659
|
+
if_block.c();
|
|
2660
|
+
if_block.m(select, if_block_anchor);
|
|
2661
|
+
}
|
|
2662
|
+
} else if (if_block) {
|
|
2663
|
+
if_block.d(1);
|
|
2664
|
+
if_block = null;
|
|
2665
|
+
}
|
|
2640
2666
|
|
|
2641
2667
|
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 12288) {
|
|
2642
|
-
each_value_1 = /*
|
|
2668
|
+
each_value_1 = /*choices*/ ctx[62];
|
|
2643
2669
|
let i;
|
|
2644
2670
|
|
|
2645
2671
|
for (i = 0; i < each_value_1.length; i += 1) {
|
|
@@ -2665,6 +2691,7 @@ function create_if_block_3(ctx) {
|
|
|
2665
2691
|
o: noop$1,
|
|
2666
2692
|
d(detaching) {
|
|
2667
2693
|
if (detaching) detach(select);
|
|
2694
|
+
if (if_block) if_block.d();
|
|
2668
2695
|
destroy_each(each_blocks, detaching);
|
|
2669
2696
|
mounted = false;
|
|
2670
2697
|
dispose();
|
|
@@ -2672,7 +2699,7 @@ function create_if_block_3(ctx) {
|
|
|
2672
2699
|
};
|
|
2673
2700
|
}
|
|
2674
2701
|
|
|
2675
|
-
// (
|
|
2702
|
+
// (440:16) {#if propType === 'slider'}
|
|
2676
2703
|
function create_if_block_2(ctx) {
|
|
2677
2704
|
let input;
|
|
2678
2705
|
let input_min_value;
|
|
@@ -2747,7 +2774,28 @@ function create_if_block_2(ctx) {
|
|
|
2747
2774
|
};
|
|
2748
2775
|
}
|
|
2749
2776
|
|
|
2750
|
-
// (
|
|
2777
|
+
// (452:24) {#if !choices.includes(allCurrentPropDefs[selectedName].value)}
|
|
2778
|
+
function create_if_block_4(ctx) {
|
|
2779
|
+
let option;
|
|
2780
|
+
|
|
2781
|
+
return {
|
|
2782
|
+
c() {
|
|
2783
|
+
option = element("option");
|
|
2784
|
+
option.textContent = "--- ";
|
|
2785
|
+
option.selected = "true";
|
|
2786
|
+
option.__value = " --- ";
|
|
2787
|
+
option.value = option.__value;
|
|
2788
|
+
},
|
|
2789
|
+
m(target, anchor) {
|
|
2790
|
+
insert(target, option, anchor);
|
|
2791
|
+
},
|
|
2792
|
+
d(detaching) {
|
|
2793
|
+
if (detaching) detach(option);
|
|
2794
|
+
}
|
|
2795
|
+
};
|
|
2796
|
+
}
|
|
2797
|
+
|
|
2798
|
+
// (455:24) {#each choices as choice}
|
|
2751
2799
|
function create_each_block_1(ctx) {
|
|
2752
2800
|
let option;
|
|
2753
2801
|
let t_value = /*choice*/ ctx[66] + "";
|
|
@@ -2785,7 +2833,7 @@ function create_each_block_1(ctx) {
|
|
|
2785
2833
|
};
|
|
2786
2834
|
}
|
|
2787
2835
|
|
|
2788
|
-
// (
|
|
2836
|
+
// (427:8) {#each Object.entries(propsByType) as [propType, choices]}
|
|
2789
2837
|
function create_each_block(ctx) {
|
|
2790
2838
|
let div;
|
|
2791
2839
|
let t0;
|
|
@@ -2798,7 +2846,7 @@ function create_each_block(ctx) {
|
|
|
2798
2846
|
let dispose;
|
|
2799
2847
|
|
|
2800
2848
|
function select_block_type(ctx, dirty) {
|
|
2801
|
-
if (/*choices*/ ctx[62].props.length > 1) return
|
|
2849
|
+
if (/*choices*/ ctx[62].props.length > 1) return create_if_block_6;
|
|
2802
2850
|
return create_else_block;
|
|
2803
2851
|
}
|
|
2804
2852
|
|
|
@@ -2809,7 +2857,7 @@ function create_each_block(ctx) {
|
|
|
2809
2857
|
return /*click_handler_3*/ ctx[36](/*selectedName*/ ctx[63]);
|
|
2810
2858
|
}
|
|
2811
2859
|
|
|
2812
|
-
const if_block_creators = [create_if_block_2, create_if_block_3,
|
|
2860
|
+
const if_block_creators = [create_if_block_2, create_if_block_3, create_if_block_5];
|
|
2813
2861
|
const if_blocks = [];
|
|
2814
2862
|
|
|
2815
2863
|
function select_block_type_1(ctx, dirty) {
|
|
@@ -2819,8 +2867,13 @@ function create_each_block(ctx) {
|
|
|
2819
2867
|
return -1;
|
|
2820
2868
|
}
|
|
2821
2869
|
|
|
2870
|
+
function select_block_ctx(ctx, index) {
|
|
2871
|
+
if (index === 1) return get_if_ctx(ctx);
|
|
2872
|
+
return ctx;
|
|
2873
|
+
}
|
|
2874
|
+
|
|
2822
2875
|
if (~(current_block_type_index = select_block_type_1(ctx))) {
|
|
2823
|
-
if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
2876
|
+
if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](select_block_ctx(ctx, current_block_type_index));
|
|
2824
2877
|
}
|
|
2825
2878
|
|
|
2826
2879
|
return {
|
|
@@ -2873,7 +2926,7 @@ function create_each_block(ctx) {
|
|
|
2873
2926
|
|
|
2874
2927
|
if (current_block_type_index === previous_block_index) {
|
|
2875
2928
|
if (~current_block_type_index) {
|
|
2876
|
-
if_blocks[current_block_type_index].p(ctx, dirty);
|
|
2929
|
+
if_blocks[current_block_type_index].p(select_block_ctx(ctx, current_block_type_index), dirty);
|
|
2877
2930
|
}
|
|
2878
2931
|
} else {
|
|
2879
2932
|
if (if_block1) {
|
|
@@ -2890,10 +2943,10 @@ function create_each_block(ctx) {
|
|
|
2890
2943
|
if_block1 = if_blocks[current_block_type_index];
|
|
2891
2944
|
|
|
2892
2945
|
if (!if_block1) {
|
|
2893
|
-
if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
2946
|
+
if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](select_block_ctx(ctx, current_block_type_index));
|
|
2894
2947
|
if_block1.c();
|
|
2895
2948
|
} else {
|
|
2896
|
-
if_block1.p(ctx, dirty);
|
|
2949
|
+
if_block1.p(select_block_ctx(ctx, current_block_type_index), dirty);
|
|
2897
2950
|
}
|
|
2898
2951
|
|
|
2899
2952
|
transition_in(if_block1, 1);
|
|
@@ -2926,7 +2979,7 @@ function create_each_block(ctx) {
|
|
|
2926
2979
|
};
|
|
2927
2980
|
}
|
|
2928
2981
|
|
|
2929
|
-
// (
|
|
2982
|
+
// (467:8) {#if currentRule === 'inline' && bringableToFront[selectedElemIndex] !== null}
|
|
2930
2983
|
function create_if_block_1(ctx) {
|
|
2931
2984
|
let div;
|
|
2932
2985
|
let mounted;
|
|
@@ -2985,7 +3038,7 @@ function create_fragment(ctx) {
|
|
|
2985
3038
|
let current;
|
|
2986
3039
|
let mounted;
|
|
2987
3040
|
let dispose;
|
|
2988
|
-
let if_block0 = /*targetsToSearch*/ ctx[1].length > 1 &&
|
|
3041
|
+
let if_block0 = /*targetsToSearch*/ ctx[1].length > 1 && create_if_block_8(ctx);
|
|
2989
3042
|
let each_value_4 = getRuleNames(/*allRules*/ ctx[2][/*selectedElemIndex*/ ctx[4]]);
|
|
2990
3043
|
let each_blocks_1 = [];
|
|
2991
3044
|
|
|
@@ -3121,7 +3174,7 @@ function create_fragment(ctx) {
|
|
|
3121
3174
|
if (if_block0) {
|
|
3122
3175
|
if_block0.p(ctx, dirty);
|
|
3123
3176
|
} else {
|
|
3124
|
-
if_block0 =
|
|
3177
|
+
if_block0 = create_if_block_8(ctx);
|
|
3125
3178
|
if_block0.c();
|
|
3126
3179
|
if_block0.m(div4, t4);
|
|
3127
3180
|
}
|
|
@@ -3463,6 +3516,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3463
3516
|
));
|
|
3464
3517
|
|
|
3465
3518
|
$$invalidate(13, allCurrentPropDefs = _allCurrentPropDefs);
|
|
3519
|
+
console.log(JSON.parse(JSON.stringify(allCurrentPropDefs)));
|
|
3466
3520
|
updateHelpers();
|
|
3467
3521
|
}
|
|
3468
3522
|
|