inline-style-editor 1.2.15 → 1.3.0
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.
- package/README.md +3 -1
- package/dist/inline-style-editor.css +1 -1
- package/dist/inline-style-editor.js +2 -2
- package/dist/inline-style-editor.js.map +1 -1
- package/dist/inline-style-editor.mjs +298 -228
- package/dist/inline-style-editor.mjs.map +1 -1
- package/package.json +1 -1
- package/src/assets/style.scss +3 -0
- package/src/components/InlineStyleEditor.svelte +21 -8
- package/stats.html +1 -1
- package/test.html +8 -1
|
@@ -2027,61 +2027,62 @@ function listFonts() {
|
|
|
2027
2027
|
|
|
2028
2028
|
function get_each_context(ctx, list, i) {
|
|
2029
2029
|
const child_ctx = ctx.slice();
|
|
2030
|
-
child_ctx[
|
|
2031
|
-
child_ctx[
|
|
2032
|
-
child_ctx[
|
|
2033
|
-
const constants_0 = /*choices*/ child_ctx[
|
|
2034
|
-
child_ctx[
|
|
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[
|
|
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[
|
|
2047
|
-
child_ctx[
|
|
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[
|
|
2054
|
-
child_ctx[
|
|
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[
|
|
2061
|
-
child_ctx[
|
|
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[
|
|
2068
|
-
child_ctx[
|
|
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[
|
|
2075
|
-
child_ctx[
|
|
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
|
-
// (
|
|
2080
|
-
function
|
|
2080
|
+
// (415:4) {#if targetsToSearch.length > 1}
|
|
2081
|
+
function create_if_block_9(ctx) {
|
|
2081
2082
|
let div;
|
|
2082
2083
|
let b;
|
|
2083
2084
|
let t1;
|
|
2084
|
-
let each_value_5 = /*targetsToSearch*/ ctx[
|
|
2085
|
+
let each_value_5 = /*targetsToSearch*/ ctx[2];
|
|
2085
2086
|
let each_blocks = [];
|
|
2086
2087
|
|
|
2087
2088
|
for (let i = 0; i < each_value_5.length; i += 1) {
|
|
@@ -2111,8 +2112,8 @@ function create_if_block_8(ctx) {
|
|
|
2111
2112
|
}
|
|
2112
2113
|
},
|
|
2113
2114
|
p(ctx, dirty) {
|
|
2114
|
-
if (dirty[0] & /*selectedElemIndex, selectedRuleIndex, targetsToSearch*/
|
|
2115
|
-
each_value_5 = /*targetsToSearch*/ ctx[
|
|
2115
|
+
if (dirty[0] & /*selectedElemIndex, selectedRuleIndex, targetsToSearch*/ 100) {
|
|
2116
|
+
each_value_5 = /*targetsToSearch*/ ctx[2];
|
|
2116
2117
|
let i;
|
|
2117
2118
|
|
|
2118
2119
|
for (i = 0; i < each_value_5.length; i += 1) {
|
|
@@ -2141,32 +2142,30 @@ function create_if_block_8(ctx) {
|
|
|
2141
2142
|
};
|
|
2142
2143
|
}
|
|
2143
2144
|
|
|
2144
|
-
// (
|
|
2145
|
+
// (418: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[
|
|
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(
|
|
2161
|
-
t1 =
|
|
2162
|
-
|
|
2163
|
-
toggle_class(span, "selected", /*selectedElemIndex*/ ctx[4] === /*elemIndex*/ ctx[80]);
|
|
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
|
-
if (dirty[0] & /*selectedElemIndex*/
|
|
2180
|
-
toggle_class(span, "selected", /*selectedElemIndex*/ ctx[
|
|
2179
|
+
if (dirty[0] & /*selectedElemIndex*/ 32) {
|
|
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
|
-
// (
|
|
2191
|
+
// (427: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[
|
|
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[
|
|
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[
|
|
2209
|
-
toggle_class(span, "selected", /*selectedRuleIndex*/ ctx[
|
|
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*/
|
|
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*/
|
|
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
|
-
if (dirty[0] & /*selectedRuleIndex*/
|
|
2229
|
-
toggle_class(span, "selected", /*selectedRuleIndex*/ ctx[
|
|
2228
|
+
if (dirty[0] & /*selectedRuleIndex*/ 64) {
|
|
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
|
-
// (
|
|
2241
|
-
function
|
|
2240
|
+
// (438:12) {#if type !== 'custom' || (currentRule === 'inline' && type === 'custom' && hasDisplayedCustom )}
|
|
2241
|
+
function create_if_block_8(ctx) {
|
|
2242
2242
|
let span;
|
|
2243
|
-
let t0_value = /*type*/ ctx[
|
|
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[
|
|
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_7(ctx) {
|
|
|
2255
2255
|
span = element("span");
|
|
2256
2256
|
t0 = text(t0_value);
|
|
2257
2257
|
t1 = space();
|
|
2258
|
-
toggle_class(span, "selected", /*selectedTypeIndex*/ ctx[
|
|
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_7(ctx) {
|
|
|
2269
2269
|
},
|
|
2270
2270
|
p(new_ctx, dirty) {
|
|
2271
2271
|
ctx = new_ctx;
|
|
2272
|
-
if (dirty[0] & /*allTypes, selectedElemIndex*/
|
|
2272
|
+
if (dirty[0] & /*allTypes, selectedElemIndex*/ 48 && t0_value !== (t0_value = /*type*/ ctx[75] + "")) set_data(t0, t0_value);
|
|
2273
2273
|
|
|
2274
|
-
if (dirty[0] & /*selectedTypeIndex*/
|
|
2275
|
-
toggle_class(span, "selected", /*selectedTypeIndex*/ ctx[
|
|
2274
|
+
if (dirty[0] & /*selectedTypeIndex*/ 128) {
|
|
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_7(ctx) {
|
|
|
2283
2283
|
};
|
|
2284
2284
|
}
|
|
2285
2285
|
|
|
2286
|
-
// (
|
|
2286
|
+
// (436: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[
|
|
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,11 +2298,11 @@ 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[
|
|
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 {
|
|
2305
|
-
if_block =
|
|
2305
|
+
if_block = create_if_block_8(ctx);
|
|
2306
2306
|
if_block.c();
|
|
2307
2307
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
2308
2308
|
}
|
|
@@ -2318,12 +2318,14 @@ function create_each_block_3(ctx) {
|
|
|
2318
2318
|
};
|
|
2319
2319
|
}
|
|
2320
2320
|
|
|
2321
|
-
// (
|
|
2321
|
+
// (443:4) {#if allTypes[selectedElemIndex]}
|
|
2322
2322
|
function create_if_block(ctx) {
|
|
2323
2323
|
let div;
|
|
2324
|
-
let
|
|
2324
|
+
let t0;
|
|
2325
|
+
let t1;
|
|
2326
|
+
let show_if = /*currentRule*/ ctx[17] === 'inline' && /*inlineDeletable*/ ctx[0](/*currentElement*/ ctx[18]);
|
|
2325
2327
|
let current;
|
|
2326
|
-
let each_value = /*propsByType*/ ctx[
|
|
2328
|
+
let each_value = /*propsByType*/ ctx[13];
|
|
2327
2329
|
let each_blocks = [];
|
|
2328
2330
|
|
|
2329
2331
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
@@ -2334,7 +2336,8 @@ function create_if_block(ctx) {
|
|
|
2334
2336
|
each_blocks[i] = null;
|
|
2335
2337
|
});
|
|
2336
2338
|
|
|
2337
|
-
let
|
|
2339
|
+
let if_block0 = /*currentRule*/ ctx[17] === 'inline' && /*bringableToFront*/ ctx[15][/*selectedElemIndex*/ ctx[5]] !== null && create_if_block_2(ctx);
|
|
2340
|
+
let if_block1 = show_if && create_if_block_1(ctx);
|
|
2338
2341
|
|
|
2339
2342
|
return {
|
|
2340
2343
|
c() {
|
|
@@ -2344,8 +2347,10 @@ function create_if_block(ctx) {
|
|
|
2344
2347
|
each_blocks[i].c();
|
|
2345
2348
|
}
|
|
2346
2349
|
|
|
2347
|
-
|
|
2348
|
-
if (
|
|
2350
|
+
t0 = space();
|
|
2351
|
+
if (if_block0) if_block0.c();
|
|
2352
|
+
t1 = space();
|
|
2353
|
+
if (if_block1) if_block1.c();
|
|
2349
2354
|
attr(div, "class", "editor");
|
|
2350
2355
|
},
|
|
2351
2356
|
m(target, anchor) {
|
|
@@ -2355,13 +2360,15 @@ function create_if_block(ctx) {
|
|
|
2355
2360
|
each_blocks[i].m(div, null);
|
|
2356
2361
|
}
|
|
2357
2362
|
|
|
2358
|
-
append(div,
|
|
2359
|
-
if (
|
|
2363
|
+
append(div, t0);
|
|
2364
|
+
if (if_block0) if_block0.m(div, null);
|
|
2365
|
+
append(div, t1);
|
|
2366
|
+
if (if_block1) if_block1.m(div, null);
|
|
2360
2367
|
current = true;
|
|
2361
2368
|
},
|
|
2362
2369
|
p(ctx, dirty) {
|
|
2363
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType, updateProp, deleteProp*/
|
|
2364
|
-
each_value = /*propsByType*/ ctx[
|
|
2370
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType, updateProp, deleteProp*/ 9461760) {
|
|
2371
|
+
each_value = /*propsByType*/ ctx[13];
|
|
2365
2372
|
let i;
|
|
2366
2373
|
|
|
2367
2374
|
for (i = 0; i < each_value.length; i += 1) {
|
|
@@ -2374,7 +2381,7 @@ function create_if_block(ctx) {
|
|
|
2374
2381
|
each_blocks[i] = create_each_block(child_ctx);
|
|
2375
2382
|
each_blocks[i].c();
|
|
2376
2383
|
transition_in(each_blocks[i], 1);
|
|
2377
|
-
each_blocks[i].m(div,
|
|
2384
|
+
each_blocks[i].m(div, t0);
|
|
2378
2385
|
}
|
|
2379
2386
|
}
|
|
2380
2387
|
|
|
@@ -2387,17 +2394,32 @@ function create_if_block(ctx) {
|
|
|
2387
2394
|
check_outros();
|
|
2388
2395
|
}
|
|
2389
2396
|
|
|
2390
|
-
if (/*currentRule*/ ctx[
|
|
2391
|
-
if (
|
|
2392
|
-
|
|
2397
|
+
if (/*currentRule*/ ctx[17] === 'inline' && /*bringableToFront*/ ctx[15][/*selectedElemIndex*/ ctx[5]] !== null) {
|
|
2398
|
+
if (if_block0) {
|
|
2399
|
+
if_block0.p(ctx, dirty);
|
|
2393
2400
|
} else {
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2401
|
+
if_block0 = create_if_block_2(ctx);
|
|
2402
|
+
if_block0.c();
|
|
2403
|
+
if_block0.m(div, t1);
|
|
2397
2404
|
}
|
|
2398
|
-
} else if (
|
|
2399
|
-
|
|
2400
|
-
|
|
2405
|
+
} else if (if_block0) {
|
|
2406
|
+
if_block0.d(1);
|
|
2407
|
+
if_block0 = null;
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
if (dirty[0] & /*currentRule, inlineDeletable, currentElement*/ 393217) show_if = /*currentRule*/ ctx[17] === 'inline' && /*inlineDeletable*/ ctx[0](/*currentElement*/ ctx[18]);
|
|
2411
|
+
|
|
2412
|
+
if (show_if) {
|
|
2413
|
+
if (if_block1) {
|
|
2414
|
+
if_block1.p(ctx, dirty);
|
|
2415
|
+
} else {
|
|
2416
|
+
if_block1 = create_if_block_1(ctx);
|
|
2417
|
+
if_block1.c();
|
|
2418
|
+
if_block1.m(div, null);
|
|
2419
|
+
}
|
|
2420
|
+
} else if (if_block1) {
|
|
2421
|
+
if_block1.d(1);
|
|
2422
|
+
if_block1 = null;
|
|
2401
2423
|
}
|
|
2402
2424
|
},
|
|
2403
2425
|
i(local) {
|
|
@@ -2421,15 +2443,16 @@ function create_if_block(ctx) {
|
|
|
2421
2443
|
d(detaching) {
|
|
2422
2444
|
if (detaching) detach(div);
|
|
2423
2445
|
destroy_each(each_blocks, detaching);
|
|
2424
|
-
if (
|
|
2446
|
+
if (if_block0) if_block0.d();
|
|
2447
|
+
if (if_block1) if_block1.d();
|
|
2425
2448
|
}
|
|
2426
2449
|
};
|
|
2427
2450
|
}
|
|
2428
2451
|
|
|
2429
|
-
// (
|
|
2452
|
+
// (454:16) {:else}
|
|
2430
2453
|
function create_else_block(ctx) {
|
|
2431
2454
|
let span;
|
|
2432
|
-
let t_value = /*selectedName*/ ctx[
|
|
2455
|
+
let t_value = /*selectedName*/ ctx[66] + "";
|
|
2433
2456
|
let t;
|
|
2434
2457
|
|
|
2435
2458
|
return {
|
|
@@ -2442,7 +2465,7 @@ function create_else_block(ctx) {
|
|
|
2442
2465
|
append(span, t);
|
|
2443
2466
|
},
|
|
2444
2467
|
p(ctx, dirty) {
|
|
2445
|
-
if (dirty[0] & /*propsByType*/
|
|
2468
|
+
if (dirty[0] & /*propsByType*/ 8192 && t_value !== (t_value = /*selectedName*/ ctx[66] + "")) set_data(t, t_value);
|
|
2446
2469
|
},
|
|
2447
2470
|
d(detaching) {
|
|
2448
2471
|
if (detaching) detach(span);
|
|
@@ -2450,13 +2473,13 @@ function create_else_block(ctx) {
|
|
|
2450
2473
|
};
|
|
2451
2474
|
}
|
|
2452
2475
|
|
|
2453
|
-
// (
|
|
2454
|
-
function
|
|
2476
|
+
// (448:16) {#if choices.props.length > 1}
|
|
2477
|
+
function create_if_block_7(ctx) {
|
|
2455
2478
|
let div;
|
|
2456
2479
|
let select;
|
|
2457
2480
|
let mounted;
|
|
2458
2481
|
let dispose;
|
|
2459
|
-
let each_value_2 = /*choices*/ ctx[
|
|
2482
|
+
let each_value_2 = /*choices*/ ctx[65].props;
|
|
2460
2483
|
let each_blocks = [];
|
|
2461
2484
|
|
|
2462
2485
|
for (let i = 0; i < each_value_2.length; i += 1) {
|
|
@@ -2464,7 +2487,7 @@ function create_if_block_6(ctx) {
|
|
|
2464
2487
|
}
|
|
2465
2488
|
|
|
2466
2489
|
function change_handler(...args) {
|
|
2467
|
-
return /*change_handler*/ ctx[
|
|
2490
|
+
return /*change_handler*/ ctx[39](/*choices*/ ctx[65], /*each_value*/ ctx[67], /*choices_index*/ ctx[68], ...args);
|
|
2468
2491
|
}
|
|
2469
2492
|
|
|
2470
2493
|
return {
|
|
@@ -2492,8 +2515,8 @@ function create_if_block_6(ctx) {
|
|
|
2492
2515
|
p(new_ctx, dirty) {
|
|
2493
2516
|
ctx = new_ctx;
|
|
2494
2517
|
|
|
2495
|
-
if (dirty[0] & /*propsByType*/
|
|
2496
|
-
each_value_2 = /*choices*/ ctx[
|
|
2518
|
+
if (dirty[0] & /*propsByType*/ 8192) {
|
|
2519
|
+
each_value_2 = /*choices*/ ctx[65].props;
|
|
2497
2520
|
let i;
|
|
2498
2521
|
|
|
2499
2522
|
for (i = 0; i < each_value_2.length; i += 1) {
|
|
@@ -2524,10 +2547,10 @@ function create_if_block_6(ctx) {
|
|
|
2524
2547
|
};
|
|
2525
2548
|
}
|
|
2526
2549
|
|
|
2527
|
-
// (
|
|
2550
|
+
// (450:24) {#each choices.props as propName, i}
|
|
2528
2551
|
function create_each_block_2(ctx) {
|
|
2529
2552
|
let option;
|
|
2530
|
-
let t0_value = /*propName*/ ctx[
|
|
2553
|
+
let t0_value = /*propName*/ ctx[72] + "";
|
|
2531
2554
|
let t0;
|
|
2532
2555
|
let t1;
|
|
2533
2556
|
let option_selected_value;
|
|
@@ -2537,8 +2560,8 @@ function create_each_block_2(ctx) {
|
|
|
2537
2560
|
option = element("option");
|
|
2538
2561
|
t0 = text(t0_value);
|
|
2539
2562
|
t1 = space();
|
|
2540
|
-
option.selected = option_selected_value = /*i*/ ctx[
|
|
2541
|
-
option.__value = /*i*/ ctx[
|
|
2563
|
+
option.selected = option_selected_value = /*i*/ ctx[74] === /*choices*/ ctx[65].selected;
|
|
2564
|
+
option.__value = /*i*/ ctx[74];
|
|
2542
2565
|
option.value = option.__value;
|
|
2543
2566
|
},
|
|
2544
2567
|
m(target, anchor) {
|
|
@@ -2547,9 +2570,9 @@ function create_each_block_2(ctx) {
|
|
|
2547
2570
|
append(option, t1);
|
|
2548
2571
|
},
|
|
2549
2572
|
p(ctx, dirty) {
|
|
2550
|
-
if (dirty[0] & /*propsByType*/
|
|
2573
|
+
if (dirty[0] & /*propsByType*/ 8192 && t0_value !== (t0_value = /*propName*/ ctx[72] + "")) set_data(t0, t0_value);
|
|
2551
2574
|
|
|
2552
|
-
if (dirty[0] & /*propsByType*/
|
|
2575
|
+
if (dirty[0] & /*propsByType*/ 8192 && option_selected_value !== (option_selected_value = /*i*/ ctx[74] === /*choices*/ ctx[65].selected)) {
|
|
2553
2576
|
option.selected = option_selected_value;
|
|
2554
2577
|
}
|
|
2555
2578
|
},
|
|
@@ -2559,18 +2582,18 @@ function create_each_block_2(ctx) {
|
|
|
2559
2582
|
};
|
|
2560
2583
|
}
|
|
2561
2584
|
|
|
2562
|
-
// (
|
|
2563
|
-
function
|
|
2585
|
+
// (477:50)
|
|
2586
|
+
function create_if_block_6(ctx) {
|
|
2564
2587
|
let colorpicker;
|
|
2565
2588
|
let current;
|
|
2566
2589
|
|
|
2567
2590
|
function func(...args) {
|
|
2568
|
-
return /*func*/ ctx[
|
|
2591
|
+
return /*func*/ ctx[43](/*selectedName*/ ctx[66], ...args);
|
|
2569
2592
|
}
|
|
2570
2593
|
|
|
2571
2594
|
colorpicker = new ColorPicker$1({
|
|
2572
2595
|
props: {
|
|
2573
|
-
value: /*allCurrentPropDefs*/ ctx[
|
|
2596
|
+
value: /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].value,
|
|
2574
2597
|
onChange: func
|
|
2575
2598
|
}
|
|
2576
2599
|
});
|
|
@@ -2586,8 +2609,8 @@ function create_if_block_5(ctx) {
|
|
|
2586
2609
|
p(new_ctx, dirty) {
|
|
2587
2610
|
ctx = new_ctx;
|
|
2588
2611
|
const colorpicker_changes = {};
|
|
2589
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
2590
|
-
if (dirty[0] & /*propsByType*/
|
|
2612
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576) colorpicker_changes.value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].value;
|
|
2613
|
+
if (dirty[0] & /*propsByType*/ 8192) colorpicker_changes.onChange = func;
|
|
2591
2614
|
colorpicker.$set(colorpicker_changes);
|
|
2592
2615
|
},
|
|
2593
2616
|
i(local) {
|
|
@@ -2605,15 +2628,15 @@ function create_if_block_5(ctx) {
|
|
|
2605
2628
|
};
|
|
2606
2629
|
}
|
|
2607
2630
|
|
|
2608
|
-
// (
|
|
2609
|
-
function
|
|
2631
|
+
// (467:51)
|
|
2632
|
+
function create_if_block_4(ctx) {
|
|
2610
2633
|
let select;
|
|
2611
|
-
let show_if = !/*choices*/ ctx[
|
|
2634
|
+
let show_if = !/*choices*/ ctx[65].includes(/*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].value);
|
|
2612
2635
|
let if_block_anchor;
|
|
2613
2636
|
let mounted;
|
|
2614
2637
|
let dispose;
|
|
2615
|
-
let if_block = show_if &&
|
|
2616
|
-
let each_value_1 = /*choices*/ ctx[
|
|
2638
|
+
let if_block = show_if && create_if_block_5();
|
|
2639
|
+
let each_value_1 = /*choices*/ ctx[65];
|
|
2617
2640
|
let each_blocks = [];
|
|
2618
2641
|
|
|
2619
2642
|
for (let i = 0; i < each_value_1.length; i += 1) {
|
|
@@ -2621,7 +2644,7 @@ function create_if_block_3(ctx) {
|
|
|
2621
2644
|
}
|
|
2622
2645
|
|
|
2623
2646
|
function change_handler_2(...args) {
|
|
2624
|
-
return /*change_handler_2*/ ctx[
|
|
2647
|
+
return /*change_handler_2*/ ctx[42](/*selectedName*/ ctx[66], ...args);
|
|
2625
2648
|
}
|
|
2626
2649
|
|
|
2627
2650
|
return {
|
|
@@ -2650,11 +2673,11 @@ function create_if_block_3(ctx) {
|
|
|
2650
2673
|
},
|
|
2651
2674
|
p(new_ctx, dirty) {
|
|
2652
2675
|
ctx = new_ctx;
|
|
2653
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
2676
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576) show_if = !/*choices*/ ctx[65].includes(/*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].value);
|
|
2654
2677
|
|
|
2655
2678
|
if (show_if) {
|
|
2656
2679
|
if (if_block) ; else {
|
|
2657
|
-
if_block =
|
|
2680
|
+
if_block = create_if_block_5();
|
|
2658
2681
|
if_block.c();
|
|
2659
2682
|
if_block.m(select, if_block_anchor);
|
|
2660
2683
|
}
|
|
@@ -2663,8 +2686,8 @@ function create_if_block_3(ctx) {
|
|
|
2663
2686
|
if_block = null;
|
|
2664
2687
|
}
|
|
2665
2688
|
|
|
2666
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
2667
|
-
each_value_1 = /*choices*/ ctx[
|
|
2689
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576) {
|
|
2690
|
+
each_value_1 = /*choices*/ ctx[65];
|
|
2668
2691
|
let i;
|
|
2669
2692
|
|
|
2670
2693
|
for (i = 0; i < each_value_1.length; i += 1) {
|
|
@@ -2698,8 +2721,8 @@ function create_if_block_3(ctx) {
|
|
|
2698
2721
|
};
|
|
2699
2722
|
}
|
|
2700
2723
|
|
|
2701
|
-
// (
|
|
2702
|
-
function
|
|
2724
|
+
// (458:16) {#if choices.type === 'slider'}
|
|
2725
|
+
function create_if_block_3(ctx) {
|
|
2703
2726
|
let input;
|
|
2704
2727
|
let input_min_value;
|
|
2705
2728
|
let input_max_value;
|
|
@@ -2707,13 +2730,13 @@ function create_if_block_2(ctx) {
|
|
|
2707
2730
|
let input_value_value;
|
|
2708
2731
|
let t0;
|
|
2709
2732
|
let span;
|
|
2710
|
-
let t1_value = /*allCurrentPropDefs*/ ctx[
|
|
2733
|
+
let t1_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].displayed + "";
|
|
2711
2734
|
let t1;
|
|
2712
2735
|
let mounted;
|
|
2713
2736
|
let dispose;
|
|
2714
2737
|
|
|
2715
2738
|
function change_handler_1(...args) {
|
|
2716
|
-
return /*change_handler_1*/ ctx[
|
|
2739
|
+
return /*change_handler_1*/ ctx[41](/*selectedName*/ ctx[66], ...args);
|
|
2717
2740
|
}
|
|
2718
2741
|
|
|
2719
2742
|
return {
|
|
@@ -2723,10 +2746,10 @@ function create_if_block_2(ctx) {
|
|
|
2723
2746
|
span = element("span");
|
|
2724
2747
|
t1 = text(t1_value);
|
|
2725
2748
|
attr(input, "type", "range");
|
|
2726
|
-
attr(input, "min", input_min_value = /*allCurrentPropDefs*/ ctx[
|
|
2727
|
-
attr(input, "max", input_max_value = /*allCurrentPropDefs*/ ctx[
|
|
2728
|
-
attr(input, "step", input_step_value = /*allCurrentPropDefs*/ ctx[
|
|
2729
|
-
input.value = input_value_value = /*allCurrentPropDefs*/ ctx[
|
|
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;
|
|
2730
2753
|
attr(span, "class", "current-value");
|
|
2731
2754
|
},
|
|
2732
2755
|
m(target, anchor) {
|
|
@@ -2743,23 +2766,23 @@ function create_if_block_2(ctx) {
|
|
|
2743
2766
|
p(new_ctx, dirty) {
|
|
2744
2767
|
ctx = new_ctx;
|
|
2745
2768
|
|
|
2746
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
2769
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && input_min_value !== (input_min_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].min)) {
|
|
2747
2770
|
attr(input, "min", input_min_value);
|
|
2748
2771
|
}
|
|
2749
2772
|
|
|
2750
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
2773
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && input_max_value !== (input_max_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].max)) {
|
|
2751
2774
|
attr(input, "max", input_max_value);
|
|
2752
2775
|
}
|
|
2753
2776
|
|
|
2754
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
2777
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && input_step_value !== (input_step_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].step || 1)) {
|
|
2755
2778
|
attr(input, "step", input_step_value);
|
|
2756
2779
|
}
|
|
2757
2780
|
|
|
2758
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
2781
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && input_value_value !== (input_value_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].value)) {
|
|
2759
2782
|
input.value = input_value_value;
|
|
2760
2783
|
}
|
|
2761
2784
|
|
|
2762
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
2785
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && t1_value !== (t1_value = /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].displayed + "")) set_data(t1, t1_value);
|
|
2763
2786
|
},
|
|
2764
2787
|
i: noop$1,
|
|
2765
2788
|
o: noop$1,
|
|
@@ -2773,8 +2796,8 @@ function create_if_block_2(ctx) {
|
|
|
2773
2796
|
};
|
|
2774
2797
|
}
|
|
2775
2798
|
|
|
2776
|
-
// (
|
|
2777
|
-
function
|
|
2799
|
+
// (470:24) {#if !choices.includes(allCurrentPropDefs[selectedName].value)}
|
|
2800
|
+
function create_if_block_5(ctx) {
|
|
2778
2801
|
let option;
|
|
2779
2802
|
|
|
2780
2803
|
return {
|
|
@@ -2794,10 +2817,10 @@ function create_if_block_4(ctx) {
|
|
|
2794
2817
|
};
|
|
2795
2818
|
}
|
|
2796
2819
|
|
|
2797
|
-
// (
|
|
2820
|
+
// (473:24) {#each choices as choice}
|
|
2798
2821
|
function create_each_block_1(ctx) {
|
|
2799
2822
|
let option;
|
|
2800
|
-
let t_value = /*choice*/ ctx[
|
|
2823
|
+
let t_value = /*choice*/ ctx[69] + "";
|
|
2801
2824
|
let t;
|
|
2802
2825
|
let option_selected_value;
|
|
2803
2826
|
let option_value_value;
|
|
@@ -2806,8 +2829,8 @@ function create_each_block_1(ctx) {
|
|
|
2806
2829
|
c() {
|
|
2807
2830
|
option = element("option");
|
|
2808
2831
|
t = text(t_value);
|
|
2809
|
-
option.selected = option_selected_value = /*choice*/ ctx[
|
|
2810
|
-
option.__value = option_value_value = " " + /*choice*/ ctx[
|
|
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] + " ";
|
|
2811
2834
|
option.value = option.__value;
|
|
2812
2835
|
},
|
|
2813
2836
|
m(target, anchor) {
|
|
@@ -2815,13 +2838,13 @@ function create_each_block_1(ctx) {
|
|
|
2815
2838
|
append(option, t);
|
|
2816
2839
|
},
|
|
2817
2840
|
p(ctx, dirty) {
|
|
2818
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
2841
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && t_value !== (t_value = /*choice*/ ctx[69] + "")) set_data(t, t_value);
|
|
2819
2842
|
|
|
2820
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
2843
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && option_selected_value !== (option_selected_value = /*choice*/ ctx[69] == /*allCurrentPropDefs*/ ctx[14][/*selectedName*/ ctx[66]].value || null)) {
|
|
2821
2844
|
option.selected = option_selected_value;
|
|
2822
2845
|
}
|
|
2823
2846
|
|
|
2824
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
2847
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 24576 && option_value_value !== (option_value_value = " " + /*choice*/ ctx[69] + " ")) {
|
|
2825
2848
|
option.__value = option_value_value;
|
|
2826
2849
|
option.value = option.__value;
|
|
2827
2850
|
}
|
|
@@ -2832,7 +2855,7 @@ function create_each_block_1(ctx) {
|
|
|
2832
2855
|
};
|
|
2833
2856
|
}
|
|
2834
2857
|
|
|
2835
|
-
// (
|
|
2858
|
+
// (445:8) {#each propsByType as choices}
|
|
2836
2859
|
function create_each_block(ctx) {
|
|
2837
2860
|
let div;
|
|
2838
2861
|
let t0;
|
|
@@ -2845,7 +2868,7 @@ function create_each_block(ctx) {
|
|
|
2845
2868
|
let dispose;
|
|
2846
2869
|
|
|
2847
2870
|
function select_block_type(ctx, dirty) {
|
|
2848
|
-
if (/*choices*/ ctx[
|
|
2871
|
+
if (/*choices*/ ctx[65].props.length > 1) return create_if_block_7;
|
|
2849
2872
|
return create_else_block;
|
|
2850
2873
|
}
|
|
2851
2874
|
|
|
@@ -2853,16 +2876,16 @@ function create_each_block(ctx) {
|
|
|
2853
2876
|
let if_block0 = current_block_type(ctx);
|
|
2854
2877
|
|
|
2855
2878
|
function click_handler_3() {
|
|
2856
|
-
return /*click_handler_3*/ ctx[
|
|
2879
|
+
return /*click_handler_3*/ ctx[40](/*selectedName*/ ctx[66]);
|
|
2857
2880
|
}
|
|
2858
2881
|
|
|
2859
|
-
const if_block_creators = [
|
|
2882
|
+
const if_block_creators = [create_if_block_3, create_if_block_4, create_if_block_6];
|
|
2860
2883
|
const if_blocks = [];
|
|
2861
2884
|
|
|
2862
2885
|
function select_block_type_1(ctx, dirty) {
|
|
2863
|
-
if (/*choices*/ ctx[
|
|
2864
|
-
if (/*choices*/ ctx[
|
|
2865
|
-
if (/*choices*/ ctx[
|
|
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;
|
|
2866
2889
|
return -1;
|
|
2867
2890
|
}
|
|
2868
2891
|
|
|
@@ -2978,8 +3001,8 @@ function create_each_block(ctx) {
|
|
|
2978
3001
|
};
|
|
2979
3002
|
}
|
|
2980
3003
|
|
|
2981
|
-
// (
|
|
2982
|
-
function
|
|
3004
|
+
// (485:8) {#if currentRule === 'inline' && bringableToFront[selectedElemIndex] !== null}
|
|
3005
|
+
function create_if_block_2(ctx) {
|
|
2983
3006
|
let div;
|
|
2984
3007
|
let mounted;
|
|
2985
3008
|
let dispose;
|
|
@@ -2989,21 +3012,50 @@ function create_if_block_1(ctx) {
|
|
|
2989
3012
|
div = element("div");
|
|
2990
3013
|
div.textContent = "Bring to front";
|
|
2991
3014
|
attr(div, "class", "btn");
|
|
2992
|
-
toggle_class(div, "active", /*bringableToFront*/ ctx[
|
|
3015
|
+
toggle_class(div, "active", /*bringableToFront*/ ctx[15][/*selectedElemIndex*/ ctx[5]] === true);
|
|
2993
3016
|
},
|
|
2994
3017
|
m(target, anchor) {
|
|
2995
3018
|
insert(target, div, anchor);
|
|
2996
3019
|
|
|
2997
3020
|
if (!mounted) {
|
|
2998
|
-
dispose = listen(div, "click", /*bringToFront*/ ctx[
|
|
3021
|
+
dispose = listen(div, "click", /*bringToFront*/ ctx[21]);
|
|
2999
3022
|
mounted = true;
|
|
3000
3023
|
}
|
|
3001
3024
|
},
|
|
3002
3025
|
p(ctx, dirty) {
|
|
3003
|
-
if (dirty[0] & /*bringableToFront, selectedElemIndex*/
|
|
3004
|
-
toggle_class(div, "active", /*bringableToFront*/ ctx[
|
|
3026
|
+
if (dirty[0] & /*bringableToFront, selectedElemIndex*/ 32800) {
|
|
3027
|
+
toggle_class(div, "active", /*bringableToFront*/ ctx[15][/*selectedElemIndex*/ ctx[5]] === true);
|
|
3028
|
+
}
|
|
3029
|
+
},
|
|
3030
|
+
d(detaching) {
|
|
3031
|
+
if (detaching) detach(div);
|
|
3032
|
+
mounted = false;
|
|
3033
|
+
dispose();
|
|
3034
|
+
}
|
|
3035
|
+
};
|
|
3036
|
+
}
|
|
3037
|
+
|
|
3038
|
+
// (490:8) {#if currentRule === 'inline' && inlineDeletable(currentElement)}
|
|
3039
|
+
function create_if_block_1(ctx) {
|
|
3040
|
+
let div;
|
|
3041
|
+
let mounted;
|
|
3042
|
+
let dispose;
|
|
3043
|
+
|
|
3044
|
+
return {
|
|
3045
|
+
c() {
|
|
3046
|
+
div = element("div");
|
|
3047
|
+
div.textContent = "Delete element";
|
|
3048
|
+
attr(div, "class", "btn delete-elem");
|
|
3049
|
+
},
|
|
3050
|
+
m(target, anchor) {
|
|
3051
|
+
insert(target, div, anchor);
|
|
3052
|
+
|
|
3053
|
+
if (!mounted) {
|
|
3054
|
+
dispose = listen(div, "click", /*deleteElem*/ ctx[22]);
|
|
3055
|
+
mounted = true;
|
|
3005
3056
|
}
|
|
3006
3057
|
},
|
|
3058
|
+
p: noop$1,
|
|
3007
3059
|
d(detaching) {
|
|
3008
3060
|
if (detaching) detach(div);
|
|
3009
3061
|
mounted = false;
|
|
@@ -3037,22 +3089,22 @@ function create_fragment(ctx) {
|
|
|
3037
3089
|
let current;
|
|
3038
3090
|
let mounted;
|
|
3039
3091
|
let dispose;
|
|
3040
|
-
let if_block0 = /*targetsToSearch*/ ctx[
|
|
3041
|
-
let each_value_4 = getRuleNames(/*allRules*/ ctx[
|
|
3092
|
+
let if_block0 = /*targetsToSearch*/ ctx[2].length > 1 && create_if_block_9(ctx);
|
|
3093
|
+
let each_value_4 = getRuleNames(/*allRules*/ ctx[3][/*selectedElemIndex*/ ctx[5]]);
|
|
3042
3094
|
let each_blocks_1 = [];
|
|
3043
3095
|
|
|
3044
3096
|
for (let i = 0; i < each_value_4.length; i += 1) {
|
|
3045
3097
|
each_blocks_1[i] = create_each_block_4(get_each_context_4(ctx, each_value_4, i));
|
|
3046
3098
|
}
|
|
3047
3099
|
|
|
3048
|
-
let each_value_3 = /*allTypes*/ ctx[
|
|
3100
|
+
let each_value_3 = /*allTypes*/ ctx[4][/*selectedElemIndex*/ ctx[5]] || [];
|
|
3049
3101
|
let each_blocks = [];
|
|
3050
3102
|
|
|
3051
3103
|
for (let i = 0; i < each_value_3.length; i += 1) {
|
|
3052
3104
|
each_blocks[i] = create_each_block_3(get_each_context_3(ctx, each_value_3, i));
|
|
3053
3105
|
}
|
|
3054
3106
|
|
|
3055
|
-
let if_block1 = /*allTypes*/ ctx[
|
|
3107
|
+
let if_block1 = /*allTypes*/ ctx[4][/*selectedElemIndex*/ ctx[5]] && create_if_block(ctx);
|
|
3056
3108
|
|
|
3057
3109
|
return {
|
|
3058
3110
|
c() {
|
|
@@ -3091,7 +3143,7 @@ function create_fragment(ctx) {
|
|
|
3091
3143
|
t10 = space();
|
|
3092
3144
|
if (if_block1) if_block1.c();
|
|
3093
3145
|
set_style(div0, "position", "absolute");
|
|
3094
|
-
attr(path, "d", /*pathWithHoles*/ ctx[
|
|
3146
|
+
attr(path, "d", /*pathWithHoles*/ ctx[11]);
|
|
3095
3147
|
attr(clipPath, "id", "overlay-clip");
|
|
3096
3148
|
attr(clipPath, "clip-rule", "evenodd");
|
|
3097
3149
|
attr(rect, "y", "0");
|
|
@@ -3103,8 +3155,8 @@ function create_fragment(ctx) {
|
|
|
3103
3155
|
attr(svg, "version", "1.1");
|
|
3104
3156
|
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
3105
3157
|
attr(svg, "xmlns:xlink", "http://www.w3.org/1999/xlink");
|
|
3106
|
-
attr(svg, "width", svg_width_value = /*pageDimensions*/ ctx[
|
|
3107
|
-
attr(svg, "height", svg_height_value = /*pageDimensions*/ ctx[
|
|
3158
|
+
attr(svg, "width", svg_width_value = /*pageDimensions*/ ctx[12].width);
|
|
3159
|
+
attr(svg, "height", svg_height_value = /*pageDimensions*/ ctx[12].height);
|
|
3108
3160
|
attr(div1, "class", "close-button");
|
|
3109
3161
|
attr(div2, "class", "select-tab");
|
|
3110
3162
|
attr(div3, "class", "select-tab");
|
|
@@ -3112,13 +3164,13 @@ function create_fragment(ctx) {
|
|
|
3112
3164
|
},
|
|
3113
3165
|
m(target, anchor) {
|
|
3114
3166
|
insert(target, div0, anchor);
|
|
3115
|
-
/*div0_binding*/ ctx[
|
|
3167
|
+
/*div0_binding*/ ctx[34](div0);
|
|
3116
3168
|
insert(target, t0, anchor);
|
|
3117
3169
|
insert(target, svg, anchor);
|
|
3118
3170
|
append(svg, clipPath);
|
|
3119
3171
|
append(clipPath, path);
|
|
3120
3172
|
append(svg, rect);
|
|
3121
|
-
/*svg_binding*/ ctx[
|
|
3173
|
+
/*svg_binding*/ ctx[35](svg);
|
|
3122
3174
|
insert(target, t1, anchor);
|
|
3123
3175
|
insert(target, div4, anchor);
|
|
3124
3176
|
append(div4, div1);
|
|
@@ -3144,36 +3196,36 @@ function create_fragment(ctx) {
|
|
|
3144
3196
|
|
|
3145
3197
|
append(div4, t10);
|
|
3146
3198
|
if (if_block1) if_block1.m(div4, null);
|
|
3147
|
-
/*div4_binding*/ ctx[
|
|
3199
|
+
/*div4_binding*/ ctx[44](div4);
|
|
3148
3200
|
current = true;
|
|
3149
3201
|
|
|
3150
3202
|
if (!mounted) {
|
|
3151
3203
|
dispose = [
|
|
3152
|
-
listen(svg, "click", /*overlayClicked*/ ctx[
|
|
3153
|
-
listen(div1, "click", /*close*/ ctx[
|
|
3204
|
+
listen(svg, "click", /*overlayClicked*/ ctx[19]),
|
|
3205
|
+
listen(div1, "click", /*close*/ ctx[1])
|
|
3154
3206
|
];
|
|
3155
3207
|
|
|
3156
3208
|
mounted = true;
|
|
3157
3209
|
}
|
|
3158
3210
|
},
|
|
3159
3211
|
p(ctx, dirty) {
|
|
3160
|
-
if (!current || dirty[0] & /*pathWithHoles*/
|
|
3161
|
-
attr(path, "d", /*pathWithHoles*/ ctx[
|
|
3212
|
+
if (!current || dirty[0] & /*pathWithHoles*/ 2048) {
|
|
3213
|
+
attr(path, "d", /*pathWithHoles*/ ctx[11]);
|
|
3162
3214
|
}
|
|
3163
3215
|
|
|
3164
|
-
if (!current || dirty[0] & /*pageDimensions*/
|
|
3216
|
+
if (!current || dirty[0] & /*pageDimensions*/ 4096 && svg_width_value !== (svg_width_value = /*pageDimensions*/ ctx[12].width)) {
|
|
3165
3217
|
attr(svg, "width", svg_width_value);
|
|
3166
3218
|
}
|
|
3167
3219
|
|
|
3168
|
-
if (!current || dirty[0] & /*pageDimensions*/
|
|
3220
|
+
if (!current || dirty[0] & /*pageDimensions*/ 4096 && svg_height_value !== (svg_height_value = /*pageDimensions*/ ctx[12].height)) {
|
|
3169
3221
|
attr(svg, "height", svg_height_value);
|
|
3170
3222
|
}
|
|
3171
3223
|
|
|
3172
|
-
if (/*targetsToSearch*/ ctx[
|
|
3224
|
+
if (/*targetsToSearch*/ ctx[2].length > 1) {
|
|
3173
3225
|
if (if_block0) {
|
|
3174
3226
|
if_block0.p(ctx, dirty);
|
|
3175
3227
|
} else {
|
|
3176
|
-
if_block0 =
|
|
3228
|
+
if_block0 = create_if_block_9(ctx);
|
|
3177
3229
|
if_block0.c();
|
|
3178
3230
|
if_block0.m(div4, t4);
|
|
3179
3231
|
}
|
|
@@ -3182,8 +3234,8 @@ function create_fragment(ctx) {
|
|
|
3182
3234
|
if_block0 = null;
|
|
3183
3235
|
}
|
|
3184
3236
|
|
|
3185
|
-
if (dirty[0] & /*allRules, selectedElemIndex, selectedRuleIndex, selectRule*/
|
|
3186
|
-
each_value_4 = getRuleNames(/*allRules*/ ctx[
|
|
3237
|
+
if (dirty[0] & /*allRules, selectedElemIndex, selectedRuleIndex, selectRule*/ 16777320) {
|
|
3238
|
+
each_value_4 = getRuleNames(/*allRules*/ ctx[3][/*selectedElemIndex*/ ctx[5]]);
|
|
3187
3239
|
let i;
|
|
3188
3240
|
|
|
3189
3241
|
for (i = 0; i < each_value_4.length; i += 1) {
|
|
@@ -3205,8 +3257,8 @@ function create_fragment(ctx) {
|
|
|
3205
3257
|
each_blocks_1.length = each_value_4.length;
|
|
3206
3258
|
}
|
|
3207
3259
|
|
|
3208
|
-
if (dirty[0] & /*selectedTypeIndex, allTypes, selectedElemIndex, currentRule, hasDisplayedCustom*/
|
|
3209
|
-
each_value_3 = /*allTypes*/ ctx[
|
|
3260
|
+
if (dirty[0] & /*selectedTypeIndex, allTypes, selectedElemIndex, currentRule, hasDisplayedCustom*/ 196784) {
|
|
3261
|
+
each_value_3 = /*allTypes*/ ctx[4][/*selectedElemIndex*/ ctx[5]] || [];
|
|
3210
3262
|
let i;
|
|
3211
3263
|
|
|
3212
3264
|
for (i = 0; i < each_value_3.length; i += 1) {
|
|
@@ -3228,11 +3280,11 @@ function create_fragment(ctx) {
|
|
|
3228
3280
|
each_blocks.length = each_value_3.length;
|
|
3229
3281
|
}
|
|
3230
3282
|
|
|
3231
|
-
if (/*allTypes*/ ctx[
|
|
3283
|
+
if (/*allTypes*/ ctx[4][/*selectedElemIndex*/ ctx[5]]) {
|
|
3232
3284
|
if (if_block1) {
|
|
3233
3285
|
if_block1.p(ctx, dirty);
|
|
3234
3286
|
|
|
3235
|
-
if (dirty[0] & /*allTypes, selectedElemIndex*/
|
|
3287
|
+
if (dirty[0] & /*allTypes, selectedElemIndex*/ 48) {
|
|
3236
3288
|
transition_in(if_block1, 1);
|
|
3237
3289
|
}
|
|
3238
3290
|
} else {
|
|
@@ -3262,17 +3314,17 @@ function create_fragment(ctx) {
|
|
|
3262
3314
|
},
|
|
3263
3315
|
d(detaching) {
|
|
3264
3316
|
if (detaching) detach(div0);
|
|
3265
|
-
/*div0_binding*/ ctx[
|
|
3317
|
+
/*div0_binding*/ ctx[34](null);
|
|
3266
3318
|
if (detaching) detach(t0);
|
|
3267
3319
|
if (detaching) detach(svg);
|
|
3268
|
-
/*svg_binding*/ ctx[
|
|
3320
|
+
/*svg_binding*/ ctx[35](null);
|
|
3269
3321
|
if (detaching) detach(t1);
|
|
3270
3322
|
if (detaching) detach(div4);
|
|
3271
3323
|
if (if_block0) if_block0.d();
|
|
3272
3324
|
destroy_each(each_blocks_1, detaching);
|
|
3273
3325
|
destroy_each(each_blocks, detaching);
|
|
3274
3326
|
if (if_block1) if_block1.d();
|
|
3275
|
-
/*div4_binding*/ ctx[
|
|
3327
|
+
/*div4_binding*/ ctx[44](null);
|
|
3276
3328
|
mounted = false;
|
|
3277
3329
|
run_all(dispose);
|
|
3278
3330
|
}
|
|
@@ -3429,6 +3481,8 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3429
3481
|
} } = $$props;
|
|
3430
3482
|
|
|
3431
3483
|
let { customProps = {} } = $$props;
|
|
3484
|
+
let { inlineDeletable = () => true } = $$props;
|
|
3485
|
+
let { cssRuleFilter = null } = $$props;
|
|
3432
3486
|
|
|
3433
3487
|
const propByType = {
|
|
3434
3488
|
[typeText]: fontProps,
|
|
@@ -3445,7 +3499,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3445
3499
|
let helperElemWrapper;
|
|
3446
3500
|
let pathWithHoles = '';
|
|
3447
3501
|
let pageDimensions = { width: 0, height: 0 };
|
|
3448
|
-
let targetsToSearch = [];
|
|
3502
|
+
let targetsToSearch = [[]];
|
|
3449
3503
|
let allRules = []; // list of list of CSS rules, for every target element
|
|
3450
3504
|
let allTypes = []; // list of list of types (e.g color, border), for every target element
|
|
3451
3505
|
let selectedElemIndex = 0;
|
|
@@ -3459,7 +3513,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3459
3513
|
|
|
3460
3514
|
onMount(() => {
|
|
3461
3515
|
close();
|
|
3462
|
-
$$invalidate(
|
|
3516
|
+
$$invalidate(32, elementToListen = self.parentNode);
|
|
3463
3517
|
document.body.appendChild(self);
|
|
3464
3518
|
document.body.appendChild(helperElemWrapper);
|
|
3465
3519
|
document.body.appendChild(positionAnchor);
|
|
@@ -3510,7 +3564,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3510
3564
|
}
|
|
3511
3565
|
});
|
|
3512
3566
|
|
|
3513
|
-
$$invalidate(
|
|
3567
|
+
$$invalidate(13, propsByType = Object.entries(_allCurrentPropDefs).reduce(
|
|
3514
3568
|
(byType, [propName, selectorDef]) => {
|
|
3515
3569
|
const selectorType = selectorDef.type;
|
|
3516
3570
|
const existing = byType.find(x => x.type === selectorType);
|
|
@@ -3530,7 +3584,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3530
3584
|
return 0;
|
|
3531
3585
|
}));
|
|
3532
3586
|
|
|
3533
|
-
$$invalidate(
|
|
3587
|
+
$$invalidate(14, allCurrentPropDefs = _allCurrentPropDefs);
|
|
3534
3588
|
updateHelpers();
|
|
3535
3589
|
}
|
|
3536
3590
|
|
|
@@ -3540,7 +3594,8 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3540
3594
|
const sheets = document.styleSheets;
|
|
3541
3595
|
|
|
3542
3596
|
return elems.reduce(
|
|
3543
|
-
(matchedRulesByElem,
|
|
3597
|
+
(matchedRulesByElem, elemDef) => {
|
|
3598
|
+
const el = elemDef[0];
|
|
3544
3599
|
const matchedRules = ['inline'];
|
|
3545
3600
|
|
|
3546
3601
|
for (let i in sheets) {
|
|
@@ -3554,6 +3609,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3554
3609
|
if (selectorText.endsWith(':hover')) selectorText = selectorText.substring(0, selectorText.length - (':hover').length);
|
|
3555
3610
|
|
|
3556
3611
|
if (el.matches(selectorText)) {
|
|
3612
|
+
if (cssRuleFilter !== null && !cssRuleFilter(el, rules[r].selectorText)) continue;
|
|
3557
3613
|
matchedRules.push(rules[r]);
|
|
3558
3614
|
}
|
|
3559
3615
|
}
|
|
@@ -3574,7 +3630,8 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3574
3630
|
|
|
3575
3631
|
function getEditableTypes(elems) {
|
|
3576
3632
|
return elems.reduce(
|
|
3577
|
-
(typesByElem,
|
|
3633
|
+
(typesByElem, elemDef) => {
|
|
3634
|
+
const elem = elemDef[0];
|
|
3578
3635
|
const types = [];
|
|
3579
3636
|
|
|
3580
3637
|
if (elem.firstChild && elem.firstChild.nodeType === 3) {
|
|
@@ -3616,20 +3673,20 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3616
3673
|
async function open(el, x, y) {
|
|
3617
3674
|
udpatePageDimensions();
|
|
3618
3675
|
if (el.classList.contains('overlay-over')) return overlayClicked(); else if (self.contains(el)) return;
|
|
3619
|
-
$$invalidate(
|
|
3620
|
-
$$invalidate(
|
|
3621
|
-
$$invalidate(
|
|
3622
|
-
$$invalidate(
|
|
3623
|
-
$$invalidate(
|
|
3624
|
-
$$invalidate(
|
|
3625
|
-
$$invalidate(
|
|
3626
|
-
$$invalidate(
|
|
3627
|
-
$$invalidate(
|
|
3628
|
-
$$invalidate(
|
|
3676
|
+
$$invalidate(5, selectedElemIndex = 0);
|
|
3677
|
+
$$invalidate(6, selectedRuleIndex = 0);
|
|
3678
|
+
$$invalidate(7, selectedTypeIndex = 0);
|
|
3679
|
+
$$invalidate(15, bringableToFront = []);
|
|
3680
|
+
$$invalidate(4, allTypes = []);
|
|
3681
|
+
$$invalidate(3, allRules = []);
|
|
3682
|
+
$$invalidate(2, targetsToSearch = [[el, 'Clicked'], ...getAdditionalElems(el)]);
|
|
3683
|
+
$$invalidate(4, allTypes = getEditableTypes(targetsToSearch));
|
|
3684
|
+
$$invalidate(16, hasDisplayedCustom = false);
|
|
3685
|
+
$$invalidate(3, allRules = getMatchedCSSRules(targetsToSearch));
|
|
3629
3686
|
|
|
3630
3687
|
for (let def of Object.values(customProps)) {
|
|
3631
3688
|
if (def.getter(el) !== null) {
|
|
3632
|
-
$$invalidate(
|
|
3689
|
+
$$invalidate(16, hasDisplayedCustom = true);
|
|
3633
3690
|
break;
|
|
3634
3691
|
}
|
|
3635
3692
|
}
|
|
@@ -3648,9 +3705,9 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3648
3705
|
}
|
|
3649
3706
|
|
|
3650
3707
|
function close() {
|
|
3651
|
-
$$invalidate(
|
|
3652
|
-
$$invalidate(
|
|
3653
|
-
$$invalidate(
|
|
3708
|
+
$$invalidate(9, self.style.display = "none", self);
|
|
3709
|
+
$$invalidate(10, helperElemWrapper.style.display = "none", helperElemWrapper);
|
|
3710
|
+
$$invalidate(11, pathWithHoles = '');
|
|
3654
3711
|
}
|
|
3655
3712
|
|
|
3656
3713
|
function isOpened() {
|
|
@@ -3662,8 +3719,8 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3662
3719
|
}
|
|
3663
3720
|
|
|
3664
3721
|
function show(x, y) {
|
|
3665
|
-
$$invalidate(
|
|
3666
|
-
$$invalidate(
|
|
3722
|
+
$$invalidate(9, self.style.display = "block", self);
|
|
3723
|
+
$$invalidate(9, self.style.opacity = 0, self);
|
|
3667
3724
|
const popupDimension = self.getBoundingClientRect();
|
|
3668
3725
|
|
|
3669
3726
|
x = x + popupDimension.width + 20 > pageDimensions.width
|
|
@@ -3675,10 +3732,10 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3675
3732
|
: y + 20;
|
|
3676
3733
|
|
|
3677
3734
|
y = Math.max(y, 0);
|
|
3678
|
-
$$invalidate(
|
|
3679
|
-
$$invalidate(
|
|
3680
|
-
$$invalidate(
|
|
3681
|
-
$$invalidate(
|
|
3735
|
+
$$invalidate(9, self.style.left = x + "px", self);
|
|
3736
|
+
$$invalidate(9, self.style.top = y + "px", self);
|
|
3737
|
+
$$invalidate(10, helperElemWrapper.style.display = "block", helperElemWrapper);
|
|
3738
|
+
$$invalidate(9, self.style.opacity = 1, self);
|
|
3682
3739
|
updateHelpers();
|
|
3683
3740
|
}
|
|
3684
3741
|
|
|
@@ -3693,7 +3750,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3693
3750
|
}
|
|
3694
3751
|
|
|
3695
3752
|
const boundingBoxes = matching.map(el => getBoundingBoxInfos(el, 10));
|
|
3696
|
-
$$invalidate(
|
|
3753
|
+
$$invalidate(11, pathWithHoles = computeContours(boundingBoxes, pageDimensions));
|
|
3697
3754
|
}
|
|
3698
3755
|
|
|
3699
3756
|
function _updateProp(propName, val, suffix) {
|
|
@@ -3708,8 +3765,8 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3708
3765
|
}
|
|
3709
3766
|
} else currentRule.style.setProperty(propName, finalValue);
|
|
3710
3767
|
|
|
3711
|
-
$$invalidate(
|
|
3712
|
-
$$invalidate(
|
|
3768
|
+
$$invalidate(14, allCurrentPropDefs[propName].value = val, allCurrentPropDefs);
|
|
3769
|
+
$$invalidate(14, allCurrentPropDefs[propName].displayed = finalValue, allCurrentPropDefs);
|
|
3713
3770
|
onStyleChanged(currentElement, currentRule, propName, finalValue);
|
|
3714
3771
|
updateHelpers();
|
|
3715
3772
|
}
|
|
@@ -3723,7 +3780,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3723
3780
|
const marginTop = parseInt(bodyStyle.marginTop);
|
|
3724
3781
|
const marginBottom = parseInt(bodyStyle.marginBottom);
|
|
3725
3782
|
|
|
3726
|
-
$$invalidate(
|
|
3783
|
+
$$invalidate(12, pageDimensions = {
|
|
3727
3784
|
width: document.body.offsetWidth + marginLeft + marginRight,
|
|
3728
3785
|
height: document.body.offsetHeight + marginTop + marginBottom
|
|
3729
3786
|
});
|
|
@@ -3741,11 +3798,16 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3741
3798
|
}
|
|
3742
3799
|
|
|
3743
3800
|
function bringToFront() {
|
|
3744
|
-
$$invalidate(
|
|
3801
|
+
$$invalidate(15, bringableToFront[selectedElemIndex] = false, bringableToFront);
|
|
3745
3802
|
currentElement.parentNode.appendChild(currentElement);
|
|
3746
3803
|
onStyleChanged(currentElement, currentRule, 'bringtofront', null);
|
|
3747
3804
|
}
|
|
3748
3805
|
|
|
3806
|
+
function deleteElem() {
|
|
3807
|
+
currentElement.remove();
|
|
3808
|
+
close();
|
|
3809
|
+
}
|
|
3810
|
+
|
|
3749
3811
|
function deleteProp(propName) {
|
|
3750
3812
|
if (currentRule === 'inline') {
|
|
3751
3813
|
currentElement.style.removeProperty(propName);
|
|
@@ -3761,29 +3823,29 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3761
3823
|
const newRule = allRules[selectedElemIndex]?.[ruleIndex];
|
|
3762
3824
|
|
|
3763
3825
|
if (newRule !== 'inline' && selectedTypeIndex === allTypes[selectedElemIndex].length - 1) {
|
|
3764
|
-
$$invalidate(
|
|
3826
|
+
$$invalidate(7, selectedTypeIndex = 0);
|
|
3765
3827
|
}
|
|
3766
3828
|
|
|
3767
|
-
$$invalidate(
|
|
3829
|
+
$$invalidate(6, selectedRuleIndex = ruleIndex);
|
|
3768
3830
|
}
|
|
3769
3831
|
|
|
3770
3832
|
function div0_binding($$value) {
|
|
3771
3833
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
3772
3834
|
positionAnchor = $$value;
|
|
3773
|
-
$$invalidate(
|
|
3835
|
+
$$invalidate(8, positionAnchor);
|
|
3774
3836
|
});
|
|
3775
3837
|
}
|
|
3776
3838
|
|
|
3777
3839
|
function svg_binding($$value) {
|
|
3778
3840
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
3779
3841
|
helperElemWrapper = $$value;
|
|
3780
|
-
$$invalidate(
|
|
3842
|
+
$$invalidate(10, helperElemWrapper);
|
|
3781
3843
|
});
|
|
3782
3844
|
}
|
|
3783
3845
|
|
|
3784
3846
|
const click_handler = elemIndex => {
|
|
3785
|
-
$$invalidate(
|
|
3786
|
-
$$invalidate(
|
|
3847
|
+
$$invalidate(5, selectedElemIndex = elemIndex);
|
|
3848
|
+
$$invalidate(6, selectedRuleIndex = 0);
|
|
3787
3849
|
};
|
|
3788
3850
|
|
|
3789
3851
|
const click_handler_1 = ruleIndex => {
|
|
@@ -3791,11 +3853,11 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3791
3853
|
};
|
|
3792
3854
|
|
|
3793
3855
|
const click_handler_2 = typeIndex => {
|
|
3794
|
-
$$invalidate(
|
|
3856
|
+
$$invalidate(7, selectedTypeIndex = typeIndex);
|
|
3795
3857
|
};
|
|
3796
3858
|
|
|
3797
3859
|
const change_handler = async (choices, each_value, choices_index, e) => {
|
|
3798
|
-
$$invalidate(
|
|
3860
|
+
$$invalidate(13, each_value[choices_index].selected = e.target.value, propsByType);
|
|
3799
3861
|
await tick();
|
|
3800
3862
|
};
|
|
3801
3863
|
|
|
@@ -3807,19 +3869,21 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3807
3869
|
function div4_binding($$value) {
|
|
3808
3870
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
3809
3871
|
self = $$value;
|
|
3810
|
-
$$invalidate(
|
|
3872
|
+
$$invalidate(9, self);
|
|
3811
3873
|
});
|
|
3812
3874
|
}
|
|
3813
3875
|
|
|
3814
3876
|
$$self.$$set = $$props => {
|
|
3815
|
-
if ('getAdditionalElems' in $$props) $$invalidate(
|
|
3816
|
-
if ('listenOnClick' in $$props) $$invalidate(
|
|
3817
|
-
if ('onStyleChanged' in $$props) $$invalidate(
|
|
3818
|
-
if ('customProps' in $$props) $$invalidate(
|
|
3877
|
+
if ('getAdditionalElems' in $$props) $$invalidate(25, getAdditionalElems = $$props.getAdditionalElems);
|
|
3878
|
+
if ('listenOnClick' in $$props) $$invalidate(26, listenOnClick = $$props.listenOnClick);
|
|
3879
|
+
if ('onStyleChanged' in $$props) $$invalidate(27, onStyleChanged = $$props.onStyleChanged);
|
|
3880
|
+
if ('customProps' in $$props) $$invalidate(28, customProps = $$props.customProps);
|
|
3881
|
+
if ('inlineDeletable' in $$props) $$invalidate(0, inlineDeletable = $$props.inlineDeletable);
|
|
3882
|
+
if ('cssRuleFilter' in $$props) $$invalidate(29, cssRuleFilter = $$props.cssRuleFilter);
|
|
3819
3883
|
};
|
|
3820
3884
|
|
|
3821
3885
|
$$self.$$.update = () => {
|
|
3822
|
-
if ($$self.$$.dirty[
|
|
3886
|
+
if ($$self.$$.dirty[1] & /*elementToListen*/ 2) {
|
|
3823
3887
|
{
|
|
3824
3888
|
if (elementToListen !== null) {
|
|
3825
3889
|
init();
|
|
@@ -3827,23 +3891,23 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3827
3891
|
}
|
|
3828
3892
|
}
|
|
3829
3893
|
|
|
3830
|
-
if ($$self.$$.dirty[0] & /*targetsToSearch, selectedElemIndex*/
|
|
3831
|
-
currentElement = targetsToSearch[selectedElemIndex];
|
|
3894
|
+
if ($$self.$$.dirty[0] & /*targetsToSearch, selectedElemIndex*/ 36) {
|
|
3895
|
+
$$invalidate(18, currentElement = targetsToSearch[selectedElemIndex][0]);
|
|
3832
3896
|
}
|
|
3833
3897
|
|
|
3834
|
-
if ($$self.$$.dirty[0] & /*allRules, selectedElemIndex, selectedRuleIndex*/
|
|
3835
|
-
$$invalidate(
|
|
3898
|
+
if ($$self.$$.dirty[0] & /*allRules, selectedElemIndex, selectedRuleIndex*/ 104) {
|
|
3899
|
+
$$invalidate(17, currentRule = allRules[selectedElemIndex]?.[selectedRuleIndex]);
|
|
3836
3900
|
}
|
|
3837
3901
|
|
|
3838
|
-
if ($$self.$$.dirty[0] & /*allTypes, selectedElemIndex, selectedTypeIndex
|
|
3902
|
+
if ($$self.$$.dirty[0] & /*allTypes, selectedElemIndex, selectedTypeIndex*/ 176 | $$self.$$.dirty[1] & /*curType*/ 4) {
|
|
3839
3903
|
{
|
|
3840
3904
|
if (allTypes[selectedElemIndex]?.[selectedTypeIndex] !== curType) {
|
|
3841
|
-
$$invalidate(
|
|
3905
|
+
$$invalidate(33, curType = allTypes[selectedElemIndex]?.[selectedTypeIndex]);
|
|
3842
3906
|
}
|
|
3843
3907
|
}
|
|
3844
3908
|
}
|
|
3845
3909
|
|
|
3846
|
-
if ($$self.$$.dirty[0] & /*
|
|
3910
|
+
if ($$self.$$.dirty[0] & /*selectedRuleIndex, selectedElemIndex*/ 96 | $$self.$$.dirty[1] & /*curType*/ 4) {
|
|
3847
3911
|
{
|
|
3848
3912
|
if (curType || selectedRuleIndex || selectedElemIndex) {
|
|
3849
3913
|
initAndGroup();
|
|
@@ -3853,6 +3917,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3853
3917
|
};
|
|
3854
3918
|
|
|
3855
3919
|
return [
|
|
3920
|
+
inlineDeletable,
|
|
3856
3921
|
close,
|
|
3857
3922
|
targetsToSearch,
|
|
3858
3923
|
allRules,
|
|
@@ -3870,15 +3935,18 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3870
3935
|
bringableToFront,
|
|
3871
3936
|
hasDisplayedCustom,
|
|
3872
3937
|
currentRule,
|
|
3938
|
+
currentElement,
|
|
3873
3939
|
overlayClicked,
|
|
3874
3940
|
updateProp,
|
|
3875
3941
|
bringToFront,
|
|
3942
|
+
deleteElem,
|
|
3876
3943
|
deleteProp,
|
|
3877
3944
|
selectRule,
|
|
3878
3945
|
getAdditionalElems,
|
|
3879
3946
|
listenOnClick,
|
|
3880
3947
|
onStyleChanged,
|
|
3881
3948
|
customProps,
|
|
3949
|
+
cssRuleFilter,
|
|
3882
3950
|
open,
|
|
3883
3951
|
isOpened,
|
|
3884
3952
|
elementToListen,
|
|
@@ -3908,13 +3976,15 @@ class InlineStyleEditor$1 extends SvelteComponent {
|
|
|
3908
3976
|
create_fragment,
|
|
3909
3977
|
safe_not_equal,
|
|
3910
3978
|
{
|
|
3911
|
-
getAdditionalElems:
|
|
3912
|
-
listenOnClick:
|
|
3913
|
-
onStyleChanged:
|
|
3914
|
-
customProps:
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3979
|
+
getAdditionalElems: 25,
|
|
3980
|
+
listenOnClick: 26,
|
|
3981
|
+
onStyleChanged: 27,
|
|
3982
|
+
customProps: 28,
|
|
3983
|
+
inlineDeletable: 0,
|
|
3984
|
+
cssRuleFilter: 29,
|
|
3985
|
+
open: 30,
|
|
3986
|
+
close: 1,
|
|
3987
|
+
isOpened: 31
|
|
3918
3988
|
},
|
|
3919
3989
|
null,
|
|
3920
3990
|
[-1, -1, -1]
|
|
@@ -3922,15 +3992,15 @@ class InlineStyleEditor$1 extends SvelteComponent {
|
|
|
3922
3992
|
}
|
|
3923
3993
|
|
|
3924
3994
|
get open() {
|
|
3925
|
-
return this.$$.ctx[
|
|
3995
|
+
return this.$$.ctx[30];
|
|
3926
3996
|
}
|
|
3927
3997
|
|
|
3928
3998
|
get close() {
|
|
3929
|
-
return this.$$.ctx[
|
|
3999
|
+
return this.$$.ctx[1];
|
|
3930
4000
|
}
|
|
3931
4001
|
|
|
3932
4002
|
get isOpened() {
|
|
3933
|
-
return this.$$.ctx[
|
|
4003
|
+
return this.$$.ctx[31];
|
|
3934
4004
|
}
|
|
3935
4005
|
}
|
|
3936
4006
|
|