inline-style-editor 1.3.6 → 1.4.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 -0
- package/dist/inline-style-editor.css +1 -1
- package/dist/inline-style-editor.js +5 -4
- package/dist/inline-style-editor.js.map +1 -1
- package/dist/inline-style-editor.mjs +798 -453
- package/dist/inline-style-editor.mjs.map +1 -1
- package/index.d.ts +38 -0
- package/package.json +18 -3
- package/docs/index.html +0 -384
- package/rollup.config.js +0 -41
- package/src/assets/index.scss +0 -2
- package/src/assets/style.scss +0 -152
- package/src/components/ColorPicker.svelte +0 -52
- package/src/components/InlineStyleEditor.svelte +0 -498
- package/src/index.js +0 -7
- package/src/util/boxesContour.js +0 -91
- package/src/util/fonts.js +0 -84
- package/src/util/path.js +0 -46
- package/src/util/util.js +0 -23
- package/stats.html +0 -4034
- package/test.html +0 -409
|
@@ -24,7 +24,9 @@ function insert(target, node, anchor) {
|
|
|
24
24
|
target.insertBefore(node, anchor || null);
|
|
25
25
|
}
|
|
26
26
|
function detach(node) {
|
|
27
|
-
node.parentNode
|
|
27
|
+
if (node.parentNode) {
|
|
28
|
+
node.parentNode.removeChild(node);
|
|
29
|
+
}
|
|
28
30
|
}
|
|
29
31
|
function destroy_each(iterations, detaching) {
|
|
30
32
|
for (let i = 0; i < iterations.length; i += 1) {
|
|
@@ -62,15 +64,13 @@ function children(element) {
|
|
|
62
64
|
}
|
|
63
65
|
function set_data(text, data) {
|
|
64
66
|
data = '' + data;
|
|
65
|
-
if (text.
|
|
66
|
-
|
|
67
|
+
if (text.data === data)
|
|
68
|
+
return;
|
|
69
|
+
text.data = data;
|
|
67
70
|
}
|
|
68
71
|
function set_style(node, key, value, important) {
|
|
69
|
-
|
|
70
|
-
node.style.
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
node.style.setProperty(key, value, important ? 'important' : '');
|
|
72
|
+
{
|
|
73
|
+
node.style.setProperty(key, value, '');
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
function toggle_class(element, name, toggle) {
|
|
@@ -86,18 +86,35 @@ function get_current_component() {
|
|
|
86
86
|
throw new Error('Function called outside component initialization');
|
|
87
87
|
return current_component;
|
|
88
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.
|
|
91
|
+
* It must be called during the component's initialisation (but doesn't need to live *inside* the component;
|
|
92
|
+
* it can be called from an external module).
|
|
93
|
+
*
|
|
94
|
+
* `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).
|
|
95
|
+
*
|
|
96
|
+
* https://svelte.dev/docs#run-time-svelte-onmount
|
|
97
|
+
*/
|
|
89
98
|
function onMount(fn) {
|
|
90
99
|
get_current_component().$$.on_mount.push(fn);
|
|
91
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Schedules a callback to run immediately before the component is unmounted.
|
|
103
|
+
*
|
|
104
|
+
* Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the
|
|
105
|
+
* only one that runs inside a server-side component.
|
|
106
|
+
*
|
|
107
|
+
* https://svelte.dev/docs#run-time-svelte-ondestroy
|
|
108
|
+
*/
|
|
92
109
|
function onDestroy(fn) {
|
|
93
110
|
get_current_component().$$.on_destroy.push(fn);
|
|
94
111
|
}
|
|
95
112
|
|
|
96
113
|
const dirty_components = [];
|
|
97
114
|
const binding_callbacks = [];
|
|
98
|
-
|
|
115
|
+
let render_callbacks = [];
|
|
99
116
|
const flush_callbacks = [];
|
|
100
|
-
const resolved_promise = Promise.resolve();
|
|
117
|
+
const resolved_promise = /* @__PURE__ */ Promise.resolve();
|
|
101
118
|
let update_scheduled = false;
|
|
102
119
|
function schedule_update() {
|
|
103
120
|
if (!update_scheduled) {
|
|
@@ -133,15 +150,29 @@ function add_render_callback(fn) {
|
|
|
133
150
|
const seen_callbacks = new Set();
|
|
134
151
|
let flushidx = 0; // Do *not* move this inside the flush() function
|
|
135
152
|
function flush() {
|
|
153
|
+
// Do not reenter flush while dirty components are updated, as this can
|
|
154
|
+
// result in an infinite loop. Instead, let the inner flush handle it.
|
|
155
|
+
// Reentrancy is ok afterwards for bindings etc.
|
|
156
|
+
if (flushidx !== 0) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
136
159
|
const saved_component = current_component;
|
|
137
160
|
do {
|
|
138
161
|
// first, call beforeUpdate functions
|
|
139
162
|
// and update components
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
163
|
+
try {
|
|
164
|
+
while (flushidx < dirty_components.length) {
|
|
165
|
+
const component = dirty_components[flushidx];
|
|
166
|
+
flushidx++;
|
|
167
|
+
set_current_component(component);
|
|
168
|
+
update(component.$$);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
catch (e) {
|
|
172
|
+
// reset dirty state to not end up in a deadlocked state and then rethrow
|
|
173
|
+
dirty_components.length = 0;
|
|
174
|
+
flushidx = 0;
|
|
175
|
+
throw e;
|
|
145
176
|
}
|
|
146
177
|
set_current_component(null);
|
|
147
178
|
dirty_components.length = 0;
|
|
@@ -178,6 +209,16 @@ function update($$) {
|
|
|
178
209
|
$$.after_update.forEach(add_render_callback);
|
|
179
210
|
}
|
|
180
211
|
}
|
|
212
|
+
/**
|
|
213
|
+
* Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
|
|
214
|
+
*/
|
|
215
|
+
function flush_render_callbacks(fns) {
|
|
216
|
+
const filtered = [];
|
|
217
|
+
const targets = [];
|
|
218
|
+
render_callbacks.forEach((c) => fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c));
|
|
219
|
+
targets.forEach((c) => c());
|
|
220
|
+
render_callbacks = filtered;
|
|
221
|
+
}
|
|
181
222
|
const outroing = new Set();
|
|
182
223
|
let outros;
|
|
183
224
|
function group_outros() {
|
|
@@ -222,14 +263,17 @@ function create_component(block) {
|
|
|
222
263
|
block && block.c();
|
|
223
264
|
}
|
|
224
265
|
function mount_component(component, target, anchor, customElement) {
|
|
225
|
-
const { fragment,
|
|
266
|
+
const { fragment, after_update } = component.$$;
|
|
226
267
|
fragment && fragment.m(target, anchor);
|
|
227
268
|
if (!customElement) {
|
|
228
269
|
// onMount happens before the initial afterUpdate
|
|
229
270
|
add_render_callback(() => {
|
|
230
|
-
const new_on_destroy = on_mount.map(run).filter(is_function);
|
|
231
|
-
if
|
|
232
|
-
|
|
271
|
+
const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);
|
|
272
|
+
// if the component was destroyed immediately
|
|
273
|
+
// it will update the `$$.on_destroy` reference to `null`.
|
|
274
|
+
// the destructured on_destroy may still reference to the old array
|
|
275
|
+
if (component.$$.on_destroy) {
|
|
276
|
+
component.$$.on_destroy.push(...new_on_destroy);
|
|
233
277
|
}
|
|
234
278
|
else {
|
|
235
279
|
// Edge case - component was destroyed immediately,
|
|
@@ -244,6 +288,7 @@ function mount_component(component, target, anchor, customElement) {
|
|
|
244
288
|
function destroy_component(component, detaching) {
|
|
245
289
|
const $$ = component.$$;
|
|
246
290
|
if ($$.fragment !== null) {
|
|
291
|
+
flush_render_callbacks($$.after_update);
|
|
247
292
|
run_all($$.on_destroy);
|
|
248
293
|
$$.fragment && $$.fragment.d(detaching);
|
|
249
294
|
// TODO null out other refs, including component.$$ (but need to
|
|
@@ -265,7 +310,7 @@ function init(component, options, instance, create_fragment, not_equal, props, a
|
|
|
265
310
|
set_current_component(component);
|
|
266
311
|
const $$ = component.$$ = {
|
|
267
312
|
fragment: null,
|
|
268
|
-
ctx:
|
|
313
|
+
ctx: [],
|
|
269
314
|
// state
|
|
270
315
|
props,
|
|
271
316
|
update: noop$1,
|
|
@@ -330,6 +375,9 @@ class SvelteComponent {
|
|
|
330
375
|
this.$destroy = noop$1;
|
|
331
376
|
}
|
|
332
377
|
$on(type, callback) {
|
|
378
|
+
if (!is_function(callback)) {
|
|
379
|
+
return noop$1;
|
|
380
|
+
}
|
|
333
381
|
const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
|
|
334
382
|
callbacks.push(callback);
|
|
335
383
|
return () => {
|
|
@@ -356,9 +404,9 @@ function pick(obj, keys) {
|
|
|
356
404
|
|
|
357
405
|
function debounce(func, wait, immediate = false) {
|
|
358
406
|
let timeout;
|
|
359
|
-
return function() {
|
|
407
|
+
return function () {
|
|
360
408
|
const context = this, args = arguments;
|
|
361
|
-
const later = function() {
|
|
409
|
+
const later = function () {
|
|
362
410
|
timeout = null;
|
|
363
411
|
if (!immediate) func.apply(context, args);
|
|
364
412
|
};
|
|
@@ -368,6 +416,21 @@ function debounce(func, wait, immediate = false) {
|
|
|
368
416
|
if (callNow) func.apply(context, args);
|
|
369
417
|
};
|
|
370
418
|
}
|
|
419
|
+
function capitalizeFirstLetter(str) {
|
|
420
|
+
return str[0].toUpperCase() + str.slice(1);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
function pascalCaseToSentence(str) {
|
|
424
|
+
const splitted = str.replace(/-/g, ' ').trim().toLowerCase();
|
|
425
|
+
return capitalizeFirstLetter(splitted);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
function nbChars(strArray) {
|
|
430
|
+
if (!strArray) return 0;
|
|
431
|
+
console.log(strArray, strArray.reduce((acc, str) => acc + str.length, 0));
|
|
432
|
+
return strArray.reduce((acc, str) => acc + str.length, 0);
|
|
433
|
+
}
|
|
371
434
|
|
|
372
435
|
function ascending$1(a, b) {
|
|
373
436
|
return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
|
|
@@ -444,19 +507,12 @@ bisector(number).center;
|
|
|
444
507
|
|
|
445
508
|
function count(values, valueof) {
|
|
446
509
|
let count = 0;
|
|
447
|
-
|
|
510
|
+
{
|
|
448
511
|
for (let value of values) {
|
|
449
512
|
if (value != null && (value = +value) >= value) {
|
|
450
513
|
++count;
|
|
451
514
|
}
|
|
452
515
|
}
|
|
453
|
-
} else {
|
|
454
|
-
let index = -1;
|
|
455
|
-
for (let value of values) {
|
|
456
|
-
if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {
|
|
457
|
-
++count;
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
516
|
}
|
|
461
517
|
return count;
|
|
462
518
|
}
|
|
@@ -491,63 +547,75 @@ function extent(values, valueof) {
|
|
|
491
547
|
return [min, max];
|
|
492
548
|
}
|
|
493
549
|
|
|
494
|
-
|
|
550
|
+
const e10 = Math.sqrt(50),
|
|
495
551
|
e5 = Math.sqrt(10),
|
|
496
552
|
e2 = Math.sqrt(2);
|
|
497
553
|
|
|
498
|
-
function
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
554
|
+
function tickSpec(start, stop, count) {
|
|
555
|
+
const step = (stop - start) / Math.max(0, count),
|
|
556
|
+
power = Math.floor(Math.log10(step)),
|
|
557
|
+
error = step / Math.pow(10, power),
|
|
558
|
+
factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;
|
|
559
|
+
let i1, i2, inc;
|
|
560
|
+
if (power < 0) {
|
|
561
|
+
inc = Math.pow(10, -power) / factor;
|
|
562
|
+
i1 = Math.round(start * inc);
|
|
563
|
+
i2 = Math.round(stop * inc);
|
|
564
|
+
if (i1 / inc < start) ++i1;
|
|
565
|
+
if (i2 / inc > stop) --i2;
|
|
566
|
+
inc = -inc;
|
|
567
|
+
} else {
|
|
568
|
+
inc = Math.pow(10, power) * factor;
|
|
569
|
+
i1 = Math.round(start / inc);
|
|
570
|
+
i2 = Math.round(stop / inc);
|
|
571
|
+
if (i1 * inc < start) ++i1;
|
|
572
|
+
if (i2 * inc > stop) --i2;
|
|
573
|
+
}
|
|
574
|
+
if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);
|
|
575
|
+
return [i1, i2, inc];
|
|
576
|
+
}
|
|
504
577
|
|
|
578
|
+
function ticks(start, stop, count) {
|
|
505
579
|
stop = +stop, start = +start, count = +count;
|
|
506
|
-
if (
|
|
507
|
-
if (
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
if (
|
|
513
|
-
|
|
514
|
-
ticks = new Array(n = r1 - r0 + 1);
|
|
515
|
-
while (++i < n) ticks[i] = (r0 + i) * step;
|
|
580
|
+
if (!(count > 0)) return [];
|
|
581
|
+
if (start === stop) return [start];
|
|
582
|
+
const reverse = stop < start, [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);
|
|
583
|
+
if (!(i2 >= i1)) return [];
|
|
584
|
+
const n = i2 - i1 + 1, ticks = new Array(n);
|
|
585
|
+
if (reverse) {
|
|
586
|
+
if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;
|
|
587
|
+
else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;
|
|
516
588
|
} else {
|
|
517
|
-
|
|
518
|
-
let
|
|
519
|
-
if (r0 / step < start) ++r0;
|
|
520
|
-
if (r1 / step > stop) --r1;
|
|
521
|
-
ticks = new Array(n = r1 - r0 + 1);
|
|
522
|
-
while (++i < n) ticks[i] = (r0 + i) / step;
|
|
589
|
+
if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;
|
|
590
|
+
else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;
|
|
523
591
|
}
|
|
524
|
-
|
|
525
|
-
if (reverse) ticks.reverse();
|
|
526
|
-
|
|
527
592
|
return ticks;
|
|
528
593
|
}
|
|
529
594
|
|
|
530
595
|
function tickIncrement(start, stop, count) {
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
error = step / Math.pow(10, power);
|
|
534
|
-
return power >= 0
|
|
535
|
-
? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)
|
|
536
|
-
: -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);
|
|
596
|
+
stop = +stop, start = +start, count = +count;
|
|
597
|
+
return tickSpec(start, stop, count)[2];
|
|
537
598
|
}
|
|
538
599
|
|
|
539
|
-
function
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
600
|
+
function nice(start, stop, count) {
|
|
601
|
+
let prestep;
|
|
602
|
+
while (true) {
|
|
603
|
+
const step = tickIncrement(start, stop, count);
|
|
604
|
+
if (step === prestep || step === 0 || !isFinite(step)) {
|
|
605
|
+
return [start, stop];
|
|
606
|
+
} else if (step > 0) {
|
|
607
|
+
start = Math.floor(start / step) * step;
|
|
608
|
+
stop = Math.ceil(stop / step) * step;
|
|
609
|
+
} else if (step < 0) {
|
|
610
|
+
start = Math.ceil(start * step) / step;
|
|
611
|
+
stop = Math.floor(stop * step) / step;
|
|
612
|
+
}
|
|
613
|
+
prestep = step;
|
|
614
|
+
}
|
|
547
615
|
}
|
|
548
616
|
|
|
549
617
|
function thresholdSturges(values) {
|
|
550
|
-
return Math.ceil(Math.log(count(values)) / Math.LN2) + 1;
|
|
618
|
+
return Math.max(1, Math.ceil(Math.log(count(values)) / Math.LN2) + 1);
|
|
551
619
|
}
|
|
552
620
|
|
|
553
621
|
var array = Array.prototype;
|
|
@@ -626,8 +694,10 @@ function contours() {
|
|
|
626
694
|
|
|
627
695
|
// Convert number of thresholds into uniform thresholds.
|
|
628
696
|
if (!Array.isArray(tz)) {
|
|
629
|
-
const e = extent(values
|
|
630
|
-
tz = ticks(
|
|
697
|
+
const e = extent(values, finite);
|
|
698
|
+
tz = ticks(...nice(e[0], e[1], tz), tz);
|
|
699
|
+
while (tz[tz.length - 1] >= e[1]) tz.pop();
|
|
700
|
+
while (tz[1] < e[0]) tz.shift();
|
|
631
701
|
} else {
|
|
632
702
|
tz = tz.slice().sort(ascending);
|
|
633
703
|
}
|
|
@@ -638,11 +708,14 @@ function contours() {
|
|
|
638
708
|
// Accumulate, smooth contour rings, assign holes to exterior rings.
|
|
639
709
|
// Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js
|
|
640
710
|
function contour(values, value) {
|
|
711
|
+
const v = value == null ? NaN : +value;
|
|
712
|
+
if (isNaN(v)) throw new Error(`invalid value: ${value}`);
|
|
713
|
+
|
|
641
714
|
var polygons = [],
|
|
642
715
|
holes = [];
|
|
643
716
|
|
|
644
|
-
isorings(values,
|
|
645
|
-
smooth(ring, values,
|
|
717
|
+
isorings(values, v, function(ring) {
|
|
718
|
+
smooth(ring, values, v);
|
|
646
719
|
if (area(ring) > 0) polygons.push([ring]);
|
|
647
720
|
else holes.push(ring);
|
|
648
721
|
});
|
|
@@ -672,10 +745,10 @@ function contours() {
|
|
|
672
745
|
|
|
673
746
|
// Special case for the first row (y = -1, t2 = t3 = 0).
|
|
674
747
|
x = y = -1;
|
|
675
|
-
t1 = values[0]
|
|
748
|
+
t1 = above(values[0], value);
|
|
676
749
|
cases[t1 << 1].forEach(stitch);
|
|
677
750
|
while (++x < dx - 1) {
|
|
678
|
-
t0 = t1, t1 = values[x + 1]
|
|
751
|
+
t0 = t1, t1 = above(values[x + 1], value);
|
|
679
752
|
cases[t0 | t1 << 1].forEach(stitch);
|
|
680
753
|
}
|
|
681
754
|
cases[t1 << 0].forEach(stitch);
|
|
@@ -683,12 +756,12 @@ function contours() {
|
|
|
683
756
|
// General case for the intermediate rows.
|
|
684
757
|
while (++y < dy - 1) {
|
|
685
758
|
x = -1;
|
|
686
|
-
t1 = values[y * dx + dx]
|
|
687
|
-
t2 = values[y * dx]
|
|
759
|
+
t1 = above(values[y * dx + dx], value);
|
|
760
|
+
t2 = above(values[y * dx], value);
|
|
688
761
|
cases[t1 << 1 | t2 << 2].forEach(stitch);
|
|
689
762
|
while (++x < dx - 1) {
|
|
690
|
-
t0 = t1, t1 = values[y * dx + dx + x + 1]
|
|
691
|
-
t3 = t2, t2 = values[y * dx + x + 1]
|
|
763
|
+
t0 = t1, t1 = above(values[y * dx + dx + x + 1], value);
|
|
764
|
+
t3 = t2, t2 = above(values[y * dx + x + 1], value);
|
|
692
765
|
cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch);
|
|
693
766
|
}
|
|
694
767
|
cases[t1 | t2 << 3].forEach(stitch);
|
|
@@ -699,7 +772,7 @@ function contours() {
|
|
|
699
772
|
t2 = values[y * dx] >= value;
|
|
700
773
|
cases[t2 << 2].forEach(stitch);
|
|
701
774
|
while (++x < dx - 1) {
|
|
702
|
-
t3 = t2, t2 = values[y * dx + x + 1]
|
|
775
|
+
t3 = t2, t2 = above(values[y * dx + x + 1], value);
|
|
703
776
|
cases[t2 << 2 | t3 << 3].forEach(stitch);
|
|
704
777
|
}
|
|
705
778
|
cases[t2 << 3].forEach(stitch);
|
|
@@ -756,15 +829,12 @@ function contours() {
|
|
|
756
829
|
y = point[1],
|
|
757
830
|
xt = x | 0,
|
|
758
831
|
yt = y | 0,
|
|
759
|
-
|
|
760
|
-
v1 = values[yt * dx + xt];
|
|
832
|
+
v1 = valid(values[yt * dx + xt]);
|
|
761
833
|
if (x > 0 && x < dx && xt === x) {
|
|
762
|
-
|
|
763
|
-
point[0] = x + (value - v0) / (v1 - v0) - 0.5;
|
|
834
|
+
point[0] = smooth1(x, valid(values[yt * dx + xt - 1]), v1, value);
|
|
764
835
|
}
|
|
765
836
|
if (y > 0 && y < dy && yt === y) {
|
|
766
|
-
|
|
767
|
-
point[1] = y + (value - v0) / (v1 - v0) - 0.5;
|
|
837
|
+
point[1] = smooth1(y, valid(values[(yt - 1) * dx + xt]), v1, value);
|
|
768
838
|
}
|
|
769
839
|
});
|
|
770
840
|
}
|
|
@@ -789,6 +859,29 @@ function contours() {
|
|
|
789
859
|
return contours;
|
|
790
860
|
}
|
|
791
861
|
|
|
862
|
+
// When computing the extent, ignore infinite values (as well as invalid ones).
|
|
863
|
+
function finite(x) {
|
|
864
|
+
return isFinite(x) ? x : NaN;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
// Is the (possibly invalid) x greater than or equal to the (known valid) value?
|
|
868
|
+
// Treat any invalid value as below negative infinity.
|
|
869
|
+
function above(x, value) {
|
|
870
|
+
return x == null ? false : +x >= value;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
// During smoothing, treat any invalid value as negative infinity.
|
|
874
|
+
function valid(v) {
|
|
875
|
+
return v == null || isNaN(v = +v) ? -Infinity : v;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
function smooth1(x, v0, v1, value) {
|
|
879
|
+
const a = value - v0;
|
|
880
|
+
const b = v1 - v0;
|
|
881
|
+
const d = isFinite(a) || isFinite(b) ? a / b : Math.sign(a) / Math.sign(b);
|
|
882
|
+
return isNaN(d) ? x : x + d - 0.5;
|
|
883
|
+
}
|
|
884
|
+
|
|
792
885
|
function pointInBox(p, box) {
|
|
793
886
|
return !(p.x < box.left || p.x > box.right || p.y > box.bottom || p.y < box.top)
|
|
794
887
|
}
|
|
@@ -878,10 +971,10 @@ function computeContours(boundingBoxes, pageDimensions) {
|
|
|
878
971
|
}
|
|
879
972
|
|
|
880
973
|
/*!
|
|
881
|
-
* vanilla-picker v2.12.
|
|
974
|
+
* vanilla-picker v2.12.3
|
|
882
975
|
* https://vanilla-picker.js.org
|
|
883
976
|
*
|
|
884
|
-
* Copyright 2017-
|
|
977
|
+
* Copyright 2017-2024 Andreas Borgen (https://github.com/Sphinxxxx), Adam Brooks (https://github.com/dissimulate)
|
|
885
978
|
* Released under the ISC license.
|
|
886
979
|
*/
|
|
887
980
|
var classCallCheck = function (instance, Constructor) {
|
|
@@ -1377,9 +1470,6 @@ function stopEvent(e) {
|
|
|
1377
1470
|
function onKey(bucket, target, keys, handler, stop) {
|
|
1378
1471
|
bucket.add(target, EVENT_KEY, function (e) {
|
|
1379
1472
|
if (keys.indexOf(e.key) >= 0) {
|
|
1380
|
-
if (stop) {
|
|
1381
|
-
stopEvent(e);
|
|
1382
|
-
}
|
|
1383
1473
|
handler(e);
|
|
1384
1474
|
}
|
|
1385
1475
|
});
|
|
@@ -1426,9 +1516,6 @@ var Picker = function () {
|
|
|
1426
1516
|
|
|
1427
1517
|
function transfer(source, target, skipKeys) {
|
|
1428
1518
|
for (var key in source) {
|
|
1429
|
-
if (skipKeys && skipKeys.indexOf(key) >= 0) {
|
|
1430
|
-
continue;
|
|
1431
|
-
}
|
|
1432
1519
|
|
|
1433
1520
|
target[key] = source[key];
|
|
1434
1521
|
}
|
|
@@ -1869,7 +1956,7 @@ var Picker = function () {
|
|
|
1869
1956
|
return Picker;
|
|
1870
1957
|
}();
|
|
1871
1958
|
|
|
1872
|
-
/* src/components/ColorPicker.svelte generated by Svelte v3.
|
|
1959
|
+
/* src/components/ColorPicker.svelte generated by Svelte v3.59.2 */
|
|
1873
1960
|
|
|
1874
1961
|
function create_fragment$1(ctx) {
|
|
1875
1962
|
let div;
|
|
@@ -1877,6 +1964,7 @@ function create_fragment$1(ctx) {
|
|
|
1877
1964
|
return {
|
|
1878
1965
|
c() {
|
|
1879
1966
|
div = element("div");
|
|
1967
|
+
attr(div, "class", "picker");
|
|
1880
1968
|
},
|
|
1881
1969
|
m(target, anchor) {
|
|
1882
1970
|
insert(target, div, anchor);
|
|
@@ -1982,8 +2070,6 @@ class ColorPicker extends SvelteComponent {
|
|
|
1982
2070
|
}
|
|
1983
2071
|
}
|
|
1984
2072
|
|
|
1985
|
-
var ColorPicker$1 = ColorPicker;
|
|
1986
|
-
|
|
1987
2073
|
// https://stackoverflow.com/a/3368855
|
|
1988
2074
|
function getAvailableFonts() {
|
|
1989
2075
|
const fontsToCheck = new Set([
|
|
@@ -2056,7 +2142,12 @@ function listFonts() {
|
|
|
2056
2142
|
while (!done) {
|
|
2057
2143
|
const font = it.next();
|
|
2058
2144
|
if (!font.done) {
|
|
2059
|
-
|
|
2145
|
+
const value = font.value;
|
|
2146
|
+
let fontName;
|
|
2147
|
+
// webkit returns directly an object
|
|
2148
|
+
if (value.length) fontName = value[0].family;
|
|
2149
|
+
else fontName = value.family;
|
|
2150
|
+
arr.push(fontName);
|
|
2060
2151
|
} else {
|
|
2061
2152
|
done = font.done;
|
|
2062
2153
|
}
|
|
@@ -2066,77 +2157,84 @@ function listFonts() {
|
|
|
2066
2157
|
return [...new Set(arr)];
|
|
2067
2158
|
}
|
|
2068
2159
|
|
|
2069
|
-
/* src/components/InlineStyleEditor.svelte generated by Svelte v3.
|
|
2160
|
+
/* src/components/InlineStyleEditor.svelte generated by Svelte v3.59.2 */
|
|
2070
2161
|
|
|
2071
2162
|
function get_each_context(ctx, list, i) {
|
|
2072
2163
|
const child_ctx = ctx.slice();
|
|
2073
|
-
child_ctx[
|
|
2074
|
-
child_ctx[
|
|
2075
|
-
child_ctx[
|
|
2076
|
-
const constants_0 = /*choices*/ child_ctx[
|
|
2077
|
-
child_ctx[
|
|
2164
|
+
child_ctx[69] = list[i];
|
|
2165
|
+
child_ctx[71] = list;
|
|
2166
|
+
child_ctx[72] = i;
|
|
2167
|
+
const constants_0 = /*choices*/ child_ctx[69].props[/*choices*/ child_ctx[69].selected];
|
|
2168
|
+
child_ctx[70] = constants_0;
|
|
2078
2169
|
return child_ctx;
|
|
2079
2170
|
}
|
|
2080
2171
|
|
|
2081
2172
|
function get_each_context_1(ctx, list, i) {
|
|
2082
2173
|
const child_ctx = ctx.slice();
|
|
2083
|
-
child_ctx[
|
|
2174
|
+
child_ctx[73] = list[i];
|
|
2084
2175
|
return child_ctx;
|
|
2085
2176
|
}
|
|
2086
2177
|
|
|
2087
2178
|
function get_if_ctx(ctx) {
|
|
2088
2179
|
const child_ctx = ctx.slice();
|
|
2089
|
-
const constants_0 = /*allCurrentPropDefs*/ child_ctx[
|
|
2090
|
-
child_ctx[
|
|
2180
|
+
const constants_0 = /*allCurrentPropDefs*/ child_ctx[16][/*selectedName*/ child_ctx[70]].choices();
|
|
2181
|
+
child_ctx[69] = constants_0;
|
|
2091
2182
|
return child_ctx;
|
|
2092
2183
|
}
|
|
2093
2184
|
|
|
2094
2185
|
function get_each_context_2(ctx, list, i) {
|
|
2095
2186
|
const child_ctx = ctx.slice();
|
|
2096
|
-
child_ctx[
|
|
2097
|
-
child_ctx[
|
|
2187
|
+
child_ctx[76] = list[i];
|
|
2188
|
+
child_ctx[78] = i;
|
|
2098
2189
|
return child_ctx;
|
|
2099
2190
|
}
|
|
2100
2191
|
|
|
2101
2192
|
function get_each_context_3(ctx, list, i) {
|
|
2102
2193
|
const child_ctx = ctx.slice();
|
|
2103
|
-
child_ctx[
|
|
2104
|
-
child_ctx[
|
|
2194
|
+
child_ctx[79] = list[i];
|
|
2195
|
+
child_ctx[81] = i;
|
|
2105
2196
|
return child_ctx;
|
|
2106
2197
|
}
|
|
2107
2198
|
|
|
2108
|
-
function
|
|
2199
|
+
function get_each_context_5(ctx, list, i) {
|
|
2109
2200
|
const child_ctx = ctx.slice();
|
|
2110
|
-
child_ctx[
|
|
2111
|
-
child_ctx[
|
|
2201
|
+
child_ctx[82] = list[i];
|
|
2202
|
+
child_ctx[84] = i;
|
|
2112
2203
|
return child_ctx;
|
|
2113
2204
|
}
|
|
2114
2205
|
|
|
2115
|
-
function
|
|
2206
|
+
function get_each_context_4(ctx, list, i) {
|
|
2116
2207
|
const child_ctx = ctx.slice();
|
|
2117
|
-
child_ctx[
|
|
2118
|
-
child_ctx[82] = list[i][1];
|
|
2208
|
+
child_ctx[82] = list[i];
|
|
2119
2209
|
child_ctx[84] = i;
|
|
2120
2210
|
return child_ctx;
|
|
2121
2211
|
}
|
|
2122
2212
|
|
|
2123
|
-
|
|
2124
|
-
|
|
2213
|
+
function get_each_context_6(ctx, list, i) {
|
|
2214
|
+
const child_ctx = ctx.slice();
|
|
2215
|
+
child_ctx[86] = list[i][0];
|
|
2216
|
+
child_ctx[87] = list[i][1];
|
|
2217
|
+
child_ctx[89] = i;
|
|
2218
|
+
return child_ctx;
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
// (473:4) {#if targetsToSearch.length > 1}
|
|
2222
|
+
function create_if_block_11(ctx) {
|
|
2125
2223
|
let div;
|
|
2126
2224
|
let b;
|
|
2127
2225
|
let t1;
|
|
2128
|
-
let
|
|
2226
|
+
let each_value_6 = /*targetsToSearch*/ ctx[3];
|
|
2129
2227
|
let each_blocks = [];
|
|
2130
2228
|
|
|
2131
|
-
for (let i = 0; i <
|
|
2132
|
-
each_blocks[i] =
|
|
2229
|
+
for (let i = 0; i < each_value_6.length; i += 1) {
|
|
2230
|
+
each_blocks[i] = create_each_block_6(get_each_context_6(ctx, each_value_6, i));
|
|
2133
2231
|
}
|
|
2134
2232
|
|
|
2135
2233
|
return {
|
|
2136
2234
|
c() {
|
|
2137
2235
|
div = element("div");
|
|
2138
2236
|
b = element("b");
|
|
2139
|
-
b.textContent = "
|
|
2237
|
+
b.textContent = "Element";
|
|
2140
2238
|
t1 = space();
|
|
2141
2239
|
|
|
2142
2240
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
@@ -2151,21 +2249,23 @@ function create_if_block_9(ctx) {
|
|
|
2151
2249
|
append(div, t1);
|
|
2152
2250
|
|
|
2153
2251
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
2154
|
-
each_blocks[i]
|
|
2252
|
+
if (each_blocks[i]) {
|
|
2253
|
+
each_blocks[i].m(div, null);
|
|
2254
|
+
}
|
|
2155
2255
|
}
|
|
2156
2256
|
},
|
|
2157
2257
|
p(ctx, dirty) {
|
|
2158
|
-
if (dirty[0] & /*selectedElemIndex, selectedRuleIndex, targetsToSearch*/
|
|
2159
|
-
|
|
2258
|
+
if (dirty[0] & /*selectedElemIndex, selectedRuleIndex, targetsToSearch*/ 200) {
|
|
2259
|
+
each_value_6 = /*targetsToSearch*/ ctx[3];
|
|
2160
2260
|
let i;
|
|
2161
2261
|
|
|
2162
|
-
for (i = 0; i <
|
|
2163
|
-
const child_ctx =
|
|
2262
|
+
for (i = 0; i < each_value_6.length; i += 1) {
|
|
2263
|
+
const child_ctx = get_each_context_6(ctx, each_value_6, i);
|
|
2164
2264
|
|
|
2165
2265
|
if (each_blocks[i]) {
|
|
2166
2266
|
each_blocks[i].p(child_ctx, dirty);
|
|
2167
2267
|
} else {
|
|
2168
|
-
each_blocks[i] =
|
|
2268
|
+
each_blocks[i] = create_each_block_6(child_ctx);
|
|
2169
2269
|
each_blocks[i].c();
|
|
2170
2270
|
each_blocks[i].m(div, null);
|
|
2171
2271
|
}
|
|
@@ -2175,7 +2275,7 @@ function create_if_block_9(ctx) {
|
|
|
2175
2275
|
each_blocks[i].d(1);
|
|
2176
2276
|
}
|
|
2177
2277
|
|
|
2178
|
-
each_blocks.length =
|
|
2278
|
+
each_blocks.length = each_value_6.length;
|
|
2179
2279
|
}
|
|
2180
2280
|
},
|
|
2181
2281
|
d(detaching) {
|
|
@@ -2185,17 +2285,17 @@ function create_if_block_9(ctx) {
|
|
|
2185
2285
|
};
|
|
2186
2286
|
}
|
|
2187
2287
|
|
|
2188
|
-
// (
|
|
2189
|
-
function
|
|
2288
|
+
// (476:12) {#each targetsToSearch as [_, name], elemIndex}
|
|
2289
|
+
function create_each_block_6(ctx) {
|
|
2190
2290
|
let span;
|
|
2191
|
-
let t0_value = /*name*/ ctx[
|
|
2291
|
+
let t0_value = /*name*/ ctx[87] + "";
|
|
2192
2292
|
let t0;
|
|
2193
2293
|
let t1;
|
|
2194
2294
|
let mounted;
|
|
2195
2295
|
let dispose;
|
|
2196
2296
|
|
|
2197
2297
|
function click_handler() {
|
|
2198
|
-
return /*click_handler*/ ctx[
|
|
2298
|
+
return /*click_handler*/ ctx[39](/*elemIndex*/ ctx[89]);
|
|
2199
2299
|
}
|
|
2200
2300
|
|
|
2201
2301
|
return {
|
|
@@ -2203,7 +2303,7 @@ function create_each_block_5(ctx) {
|
|
|
2203
2303
|
span = element("span");
|
|
2204
2304
|
t0 = text(t0_value);
|
|
2205
2305
|
t1 = space();
|
|
2206
|
-
toggle_class(span, "selected", /*selectedElemIndex*/ ctx[
|
|
2306
|
+
toggle_class(span, "selected", /*selectedElemIndex*/ ctx[6] === /*elemIndex*/ ctx[89]);
|
|
2207
2307
|
},
|
|
2208
2308
|
m(target, anchor) {
|
|
2209
2309
|
insert(target, span, anchor);
|
|
@@ -2217,10 +2317,10 @@ function create_each_block_5(ctx) {
|
|
|
2217
2317
|
},
|
|
2218
2318
|
p(new_ctx, dirty) {
|
|
2219
2319
|
ctx = new_ctx;
|
|
2220
|
-
if (dirty[0] & /*targetsToSearch*/
|
|
2320
|
+
if (dirty[0] & /*targetsToSearch*/ 8 && t0_value !== (t0_value = /*name*/ ctx[87] + "")) set_data(t0, t0_value);
|
|
2221
2321
|
|
|
2222
|
-
if (dirty[0] & /*selectedElemIndex*/
|
|
2223
|
-
toggle_class(span, "selected", /*selectedElemIndex*/ ctx[
|
|
2322
|
+
if (dirty[0] & /*selectedElemIndex*/ 64) {
|
|
2323
|
+
toggle_class(span, "selected", /*selectedElemIndex*/ ctx[6] === /*elemIndex*/ ctx[89]);
|
|
2224
2324
|
}
|
|
2225
2325
|
},
|
|
2226
2326
|
d(detaching) {
|
|
@@ -2231,25 +2331,150 @@ function create_each_block_5(ctx) {
|
|
|
2231
2331
|
};
|
|
2232
2332
|
}
|
|
2233
2333
|
|
|
2234
|
-
// (
|
|
2235
|
-
function
|
|
2334
|
+
// (499:8) {:else}
|
|
2335
|
+
function create_else_block_2(ctx) {
|
|
2336
|
+
let each_1_anchor;
|
|
2337
|
+
let each_value_5 = getRuleNames(/*allRules*/ ctx[4][/*selectedElemIndex*/ ctx[6]]);
|
|
2338
|
+
let each_blocks = [];
|
|
2339
|
+
|
|
2340
|
+
for (let i = 0; i < each_value_5.length; i += 1) {
|
|
2341
|
+
each_blocks[i] = create_each_block_5(get_each_context_5(ctx, each_value_5, i));
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
return {
|
|
2345
|
+
c() {
|
|
2346
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
2347
|
+
each_blocks[i].c();
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
each_1_anchor = empty();
|
|
2351
|
+
},
|
|
2352
|
+
m(target, anchor) {
|
|
2353
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
2354
|
+
if (each_blocks[i]) {
|
|
2355
|
+
each_blocks[i].m(target, anchor);
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2358
|
+
|
|
2359
|
+
insert(target, each_1_anchor, anchor);
|
|
2360
|
+
},
|
|
2361
|
+
p(ctx, dirty) {
|
|
2362
|
+
if (dirty[0] & /*allRules, selectedElemIndex, selectedRuleIndex, selectRule, getCssRuleName, clickedElement*/ 134218450) {
|
|
2363
|
+
each_value_5 = getRuleNames(/*allRules*/ ctx[4][/*selectedElemIndex*/ ctx[6]]);
|
|
2364
|
+
let i;
|
|
2365
|
+
|
|
2366
|
+
for (i = 0; i < each_value_5.length; i += 1) {
|
|
2367
|
+
const child_ctx = get_each_context_5(ctx, each_value_5, i);
|
|
2368
|
+
|
|
2369
|
+
if (each_blocks[i]) {
|
|
2370
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
2371
|
+
} else {
|
|
2372
|
+
each_blocks[i] = create_each_block_5(child_ctx);
|
|
2373
|
+
each_blocks[i].c();
|
|
2374
|
+
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2378
|
+
for (; i < each_blocks.length; i += 1) {
|
|
2379
|
+
each_blocks[i].d(1);
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2382
|
+
each_blocks.length = each_value_5.length;
|
|
2383
|
+
}
|
|
2384
|
+
},
|
|
2385
|
+
d(detaching) {
|
|
2386
|
+
destroy_each(each_blocks, detaching);
|
|
2387
|
+
if (detaching) detach(each_1_anchor);
|
|
2388
|
+
}
|
|
2389
|
+
};
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
// (491:8) {#if nbChars(getRuleNamesTransformed(allRules[selectedElemIndex])) > 30}
|
|
2393
|
+
function create_if_block_10(ctx) {
|
|
2394
|
+
let select;
|
|
2395
|
+
let mounted;
|
|
2396
|
+
let dispose;
|
|
2397
|
+
let each_value_4 = getRuleNames(/*allRules*/ ctx[4][/*selectedElemIndex*/ ctx[6]]);
|
|
2398
|
+
let each_blocks = [];
|
|
2399
|
+
|
|
2400
|
+
for (let i = 0; i < each_value_4.length; i += 1) {
|
|
2401
|
+
each_blocks[i] = create_each_block_4(get_each_context_4(ctx, each_value_4, i));
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
return {
|
|
2405
|
+
c() {
|
|
2406
|
+
select = element("select");
|
|
2407
|
+
|
|
2408
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
2409
|
+
each_blocks[i].c();
|
|
2410
|
+
}
|
|
2411
|
+
},
|
|
2412
|
+
m(target, anchor) {
|
|
2413
|
+
insert(target, select, anchor);
|
|
2414
|
+
|
|
2415
|
+
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
2416
|
+
if (each_blocks[i]) {
|
|
2417
|
+
each_blocks[i].m(select, null);
|
|
2418
|
+
}
|
|
2419
|
+
}
|
|
2420
|
+
|
|
2421
|
+
if (!mounted) {
|
|
2422
|
+
dispose = listen(select, "change", /*change_handler*/ ctx[40]);
|
|
2423
|
+
mounted = true;
|
|
2424
|
+
}
|
|
2425
|
+
},
|
|
2426
|
+
p(ctx, dirty) {
|
|
2427
|
+
if (dirty[0] & /*selectedRuleIndex, getCssRuleName, allRules, selectedElemIndex, clickedElement*/ 722) {
|
|
2428
|
+
each_value_4 = getRuleNames(/*allRules*/ ctx[4][/*selectedElemIndex*/ ctx[6]]);
|
|
2429
|
+
let i;
|
|
2430
|
+
|
|
2431
|
+
for (i = 0; i < each_value_4.length; i += 1) {
|
|
2432
|
+
const child_ctx = get_each_context_4(ctx, each_value_4, i);
|
|
2433
|
+
|
|
2434
|
+
if (each_blocks[i]) {
|
|
2435
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
2436
|
+
} else {
|
|
2437
|
+
each_blocks[i] = create_each_block_4(child_ctx);
|
|
2438
|
+
each_blocks[i].c();
|
|
2439
|
+
each_blocks[i].m(select, null);
|
|
2440
|
+
}
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
for (; i < each_blocks.length; i += 1) {
|
|
2444
|
+
each_blocks[i].d(1);
|
|
2445
|
+
}
|
|
2446
|
+
|
|
2447
|
+
each_blocks.length = each_value_4.length;
|
|
2448
|
+
}
|
|
2449
|
+
},
|
|
2450
|
+
d(detaching) {
|
|
2451
|
+
if (detaching) detach(select);
|
|
2452
|
+
destroy_each(each_blocks, detaching);
|
|
2453
|
+
mounted = false;
|
|
2454
|
+
dispose();
|
|
2455
|
+
}
|
|
2456
|
+
};
|
|
2457
|
+
}
|
|
2458
|
+
|
|
2459
|
+
// (500:12) {#each getRuleNames(allRules[selectedElemIndex]) as ruleName, ruleIndex}
|
|
2460
|
+
function create_each_block_5(ctx) {
|
|
2236
2461
|
let span;
|
|
2237
|
-
let t_value = /*ruleName*/ ctx[
|
|
2462
|
+
let t_value = /*getCssRuleName*/ ctx[1](/*ruleName*/ ctx[82], /*clickedElement*/ ctx[9]) + "";
|
|
2238
2463
|
let t;
|
|
2239
2464
|
let span_title_value;
|
|
2240
2465
|
let mounted;
|
|
2241
2466
|
let dispose;
|
|
2242
2467
|
|
|
2243
2468
|
function click_handler_1() {
|
|
2244
|
-
return /*click_handler_1*/ ctx[
|
|
2469
|
+
return /*click_handler_1*/ ctx[41](/*ruleIndex*/ ctx[84]);
|
|
2245
2470
|
}
|
|
2246
2471
|
|
|
2247
2472
|
return {
|
|
2248
2473
|
c() {
|
|
2249
2474
|
span = element("span");
|
|
2250
2475
|
t = text(t_value);
|
|
2251
|
-
attr(span, "title", span_title_value = /*ruleName*/ ctx[
|
|
2252
|
-
toggle_class(span, "selected", /*selectedRuleIndex*/ ctx[
|
|
2476
|
+
attr(span, "title", span_title_value = /*ruleName*/ ctx[82]);
|
|
2477
|
+
toggle_class(span, "selected", /*selectedRuleIndex*/ ctx[7] === /*ruleIndex*/ ctx[84]);
|
|
2253
2478
|
},
|
|
2254
2479
|
m(target, anchor) {
|
|
2255
2480
|
insert(target, span, anchor);
|
|
@@ -2262,14 +2487,14 @@ function create_each_block_4(ctx) {
|
|
|
2262
2487
|
},
|
|
2263
2488
|
p(new_ctx, dirty) {
|
|
2264
2489
|
ctx = new_ctx;
|
|
2265
|
-
if (dirty[0] & /*allRules, selectedElemIndex*/
|
|
2490
|
+
if (dirty[0] & /*getCssRuleName, allRules, selectedElemIndex, clickedElement*/ 594 && t_value !== (t_value = /*getCssRuleName*/ ctx[1](/*ruleName*/ ctx[82], /*clickedElement*/ ctx[9]) + "")) set_data(t, t_value);
|
|
2266
2491
|
|
|
2267
|
-
if (dirty[0] & /*allRules, selectedElemIndex*/
|
|
2492
|
+
if (dirty[0] & /*allRules, selectedElemIndex*/ 80 && span_title_value !== (span_title_value = /*ruleName*/ ctx[82])) {
|
|
2268
2493
|
attr(span, "title", span_title_value);
|
|
2269
2494
|
}
|
|
2270
2495
|
|
|
2271
|
-
if (dirty[0] & /*selectedRuleIndex*/
|
|
2272
|
-
toggle_class(span, "selected", /*selectedRuleIndex*/ ctx[
|
|
2496
|
+
if (dirty[0] & /*selectedRuleIndex*/ 128) {
|
|
2497
|
+
toggle_class(span, "selected", /*selectedRuleIndex*/ ctx[7] === /*ruleIndex*/ ctx[84]);
|
|
2273
2498
|
}
|
|
2274
2499
|
},
|
|
2275
2500
|
d(detaching) {
|
|
@@ -2280,17 +2505,53 @@ function create_each_block_4(ctx) {
|
|
|
2280
2505
|
};
|
|
2281
2506
|
}
|
|
2282
2507
|
|
|
2283
|
-
// (
|
|
2284
|
-
function
|
|
2508
|
+
// (493:16) {#each getRuleNames(allRules[selectedElemIndex]) as ruleName, ruleIndex}
|
|
2509
|
+
function create_each_block_4(ctx) {
|
|
2510
|
+
let option;
|
|
2511
|
+
let t_value = /*getCssRuleName*/ ctx[1](/*ruleName*/ ctx[82], /*clickedElement*/ ctx[9]) + "";
|
|
2512
|
+
let t;
|
|
2513
|
+
let option_selected_value;
|
|
2514
|
+
|
|
2515
|
+
return {
|
|
2516
|
+
c() {
|
|
2517
|
+
option = element("option");
|
|
2518
|
+
t = text(t_value);
|
|
2519
|
+
option.selected = option_selected_value = /*selectedRuleIndex*/ ctx[7] === /*ruleIndex*/ ctx[84];
|
|
2520
|
+
option.__value = /*ruleIndex*/ ctx[84];
|
|
2521
|
+
option.value = option.__value;
|
|
2522
|
+
},
|
|
2523
|
+
m(target, anchor) {
|
|
2524
|
+
insert(target, option, anchor);
|
|
2525
|
+
append(option, t);
|
|
2526
|
+
},
|
|
2527
|
+
p(ctx, dirty) {
|
|
2528
|
+
if (dirty[0] & /*getCssRuleName, allRules, selectedElemIndex, clickedElement*/ 594 && t_value !== (t_value = /*getCssRuleName*/ ctx[1](/*ruleName*/ ctx[82], /*clickedElement*/ ctx[9]) + "")) set_data(t, t_value);
|
|
2529
|
+
|
|
2530
|
+
if (dirty[0] & /*selectedRuleIndex*/ 128 && option_selected_value !== (option_selected_value = /*selectedRuleIndex*/ ctx[7] === /*ruleIndex*/ ctx[84])) {
|
|
2531
|
+
option.selected = option_selected_value;
|
|
2532
|
+
}
|
|
2533
|
+
},
|
|
2534
|
+
d(detaching) {
|
|
2535
|
+
if (detaching) detach(option);
|
|
2536
|
+
}
|
|
2537
|
+
};
|
|
2538
|
+
}
|
|
2539
|
+
|
|
2540
|
+
// (517:12) {#if type !== "custom" || (currentRule === "inline" && type === "custom" && hasDisplayedCustom)}
|
|
2541
|
+
function create_if_block_9(ctx) {
|
|
2285
2542
|
let span;
|
|
2286
|
-
|
|
2543
|
+
|
|
2544
|
+
let t0_value = (/*type*/ ctx[79] === "stroke"
|
|
2545
|
+
? "SVG paint"
|
|
2546
|
+
: capitalizeFirstLetter(/*type*/ ctx[79])) + "";
|
|
2547
|
+
|
|
2287
2548
|
let t0;
|
|
2288
2549
|
let t1;
|
|
2289
2550
|
let mounted;
|
|
2290
2551
|
let dispose;
|
|
2291
2552
|
|
|
2292
2553
|
function click_handler_2() {
|
|
2293
|
-
return /*click_handler_2*/ ctx[
|
|
2554
|
+
return /*click_handler_2*/ ctx[42](/*typeIndex*/ ctx[81]);
|
|
2294
2555
|
}
|
|
2295
2556
|
|
|
2296
2557
|
return {
|
|
@@ -2298,7 +2559,7 @@ function create_if_block_8(ctx) {
|
|
|
2298
2559
|
span = element("span");
|
|
2299
2560
|
t0 = text(t0_value);
|
|
2300
2561
|
t1 = space();
|
|
2301
|
-
toggle_class(span, "selected", /*selectedTypeIndex*/ ctx[
|
|
2562
|
+
toggle_class(span, "selected", /*selectedTypeIndex*/ ctx[8] === /*typeIndex*/ ctx[81]);
|
|
2302
2563
|
},
|
|
2303
2564
|
m(target, anchor) {
|
|
2304
2565
|
insert(target, span, anchor);
|
|
@@ -2312,10 +2573,13 @@ function create_if_block_8(ctx) {
|
|
|
2312
2573
|
},
|
|
2313
2574
|
p(new_ctx, dirty) {
|
|
2314
2575
|
ctx = new_ctx;
|
|
2315
|
-
if (dirty[0] & /*allTypes, selectedElemIndex*/ 48 && t0_value !== (t0_value = /*type*/ ctx[75] + "")) set_data(t0, t0_value);
|
|
2316
2576
|
|
|
2317
|
-
if (dirty[0] & /*
|
|
2318
|
-
|
|
2577
|
+
if (dirty[0] & /*allTypes, selectedElemIndex*/ 96 && t0_value !== (t0_value = (/*type*/ ctx[79] === "stroke"
|
|
2578
|
+
? "SVG paint"
|
|
2579
|
+
: capitalizeFirstLetter(/*type*/ ctx[79])) + "")) set_data(t0, t0_value);
|
|
2580
|
+
|
|
2581
|
+
if (dirty[0] & /*selectedTypeIndex*/ 256) {
|
|
2582
|
+
toggle_class(span, "selected", /*selectedTypeIndex*/ ctx[8] === /*typeIndex*/ ctx[81]);
|
|
2319
2583
|
}
|
|
2320
2584
|
},
|
|
2321
2585
|
d(detaching) {
|
|
@@ -2326,10 +2590,10 @@ function create_if_block_8(ctx) {
|
|
|
2326
2590
|
};
|
|
2327
2591
|
}
|
|
2328
2592
|
|
|
2329
|
-
// (
|
|
2593
|
+
// (515:8) {#each allTypes[selectedElemIndex] || [] as type, typeIndex}
|
|
2330
2594
|
function create_each_block_3(ctx) {
|
|
2331
2595
|
let if_block_anchor;
|
|
2332
|
-
let if_block = (/*type*/ ctx[
|
|
2596
|
+
let if_block = (/*type*/ ctx[79] !== "custom" || /*currentRule*/ ctx[19] === "inline" && /*type*/ ctx[79] === "custom" && /*hasDisplayedCustom*/ ctx[18]) && create_if_block_9(ctx);
|
|
2333
2597
|
|
|
2334
2598
|
return {
|
|
2335
2599
|
c() {
|
|
@@ -2341,11 +2605,11 @@ function create_each_block_3(ctx) {
|
|
|
2341
2605
|
insert(target, if_block_anchor, anchor);
|
|
2342
2606
|
},
|
|
2343
2607
|
p(ctx, dirty) {
|
|
2344
|
-
if (/*type*/ ctx[
|
|
2608
|
+
if (/*type*/ ctx[79] !== "custom" || /*currentRule*/ ctx[19] === "inline" && /*type*/ ctx[79] === "custom" && /*hasDisplayedCustom*/ ctx[18]) {
|
|
2345
2609
|
if (if_block) {
|
|
2346
2610
|
if_block.p(ctx, dirty);
|
|
2347
2611
|
} else {
|
|
2348
|
-
if_block =
|
|
2612
|
+
if_block = create_if_block_9(ctx);
|
|
2349
2613
|
if_block.c();
|
|
2350
2614
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
2351
2615
|
}
|
|
@@ -2361,14 +2625,14 @@ function create_each_block_3(ctx) {
|
|
|
2361
2625
|
};
|
|
2362
2626
|
}
|
|
2363
2627
|
|
|
2364
|
-
// (
|
|
2628
|
+
// (529:4) {#if allTypes[selectedElemIndex]}
|
|
2365
2629
|
function create_if_block(ctx) {
|
|
2366
2630
|
let div;
|
|
2367
2631
|
let t0;
|
|
2368
2632
|
let t1;
|
|
2369
|
-
let show_if = /*currentRule*/ ctx[
|
|
2633
|
+
let show_if = /*currentRule*/ ctx[19] === "inline" && /*inlineDeletable*/ ctx[0](/*currentElement*/ ctx[20]);
|
|
2370
2634
|
let current;
|
|
2371
|
-
let each_value = /*propsByType*/ ctx[
|
|
2635
|
+
let each_value = /*propsByType*/ ctx[15];
|
|
2372
2636
|
let each_blocks = [];
|
|
2373
2637
|
|
|
2374
2638
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
@@ -2379,7 +2643,7 @@ function create_if_block(ctx) {
|
|
|
2379
2643
|
each_blocks[i] = null;
|
|
2380
2644
|
});
|
|
2381
2645
|
|
|
2382
|
-
let if_block0 = /*currentRule*/ ctx[
|
|
2646
|
+
let if_block0 = /*currentRule*/ ctx[19] === "inline" && /*bringableToFront*/ ctx[17][/*selectedElemIndex*/ ctx[6]] !== null && create_if_block_2(ctx);
|
|
2383
2647
|
let if_block1 = show_if && create_if_block_1(ctx);
|
|
2384
2648
|
|
|
2385
2649
|
return {
|
|
@@ -2400,7 +2664,9 @@ function create_if_block(ctx) {
|
|
|
2400
2664
|
insert(target, div, anchor);
|
|
2401
2665
|
|
|
2402
2666
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
2403
|
-
each_blocks[i]
|
|
2667
|
+
if (each_blocks[i]) {
|
|
2668
|
+
each_blocks[i].m(div, null);
|
|
2669
|
+
}
|
|
2404
2670
|
}
|
|
2405
2671
|
|
|
2406
2672
|
append(div, t0);
|
|
@@ -2410,8 +2676,8 @@ function create_if_block(ctx) {
|
|
|
2410
2676
|
current = true;
|
|
2411
2677
|
},
|
|
2412
2678
|
p(ctx, dirty) {
|
|
2413
|
-
if (dirty[0] & /*
|
|
2414
|
-
each_value = /*propsByType*/ ctx[
|
|
2679
|
+
if (dirty[0] & /*propsByType, allCurrentPropDefs, updateProp, deleteProp*/ 75595776) {
|
|
2680
|
+
each_value = /*propsByType*/ ctx[15];
|
|
2415
2681
|
let i;
|
|
2416
2682
|
|
|
2417
2683
|
for (i = 0; i < each_value.length; i += 1) {
|
|
@@ -2437,7 +2703,7 @@ function create_if_block(ctx) {
|
|
|
2437
2703
|
check_outros();
|
|
2438
2704
|
}
|
|
2439
2705
|
|
|
2440
|
-
if (/*currentRule*/ ctx[
|
|
2706
|
+
if (/*currentRule*/ ctx[19] === "inline" && /*bringableToFront*/ ctx[17][/*selectedElemIndex*/ ctx[6]] !== null) {
|
|
2441
2707
|
if (if_block0) {
|
|
2442
2708
|
if_block0.p(ctx, dirty);
|
|
2443
2709
|
} else {
|
|
@@ -2450,7 +2716,7 @@ function create_if_block(ctx) {
|
|
|
2450
2716
|
if_block0 = null;
|
|
2451
2717
|
}
|
|
2452
2718
|
|
|
2453
|
-
if (dirty[0] & /*currentRule, inlineDeletable, currentElement*/
|
|
2719
|
+
if (dirty[0] & /*currentRule, inlineDeletable, currentElement*/ 1572865) show_if = /*currentRule*/ ctx[19] === "inline" && /*inlineDeletable*/ ctx[0](/*currentElement*/ ctx[20]);
|
|
2454
2720
|
|
|
2455
2721
|
if (show_if) {
|
|
2456
2722
|
if (if_block1) {
|
|
@@ -2492,10 +2758,10 @@ function create_if_block(ctx) {
|
|
|
2492
2758
|
};
|
|
2493
2759
|
}
|
|
2494
2760
|
|
|
2495
|
-
// (
|
|
2496
|
-
function
|
|
2761
|
+
// (552:24) {:else}
|
|
2762
|
+
function create_else_block_1(ctx) {
|
|
2497
2763
|
let span;
|
|
2498
|
-
let t_value = /*selectedName*/ ctx[
|
|
2764
|
+
let t_value = pascalCaseToSentence(/*selectedName*/ ctx[70]) + "";
|
|
2499
2765
|
let t;
|
|
2500
2766
|
|
|
2501
2767
|
return {
|
|
@@ -2508,7 +2774,7 @@ function create_else_block(ctx) {
|
|
|
2508
2774
|
append(span, t);
|
|
2509
2775
|
},
|
|
2510
2776
|
p(ctx, dirty) {
|
|
2511
|
-
if (dirty[0] & /*propsByType*/
|
|
2777
|
+
if (dirty[0] & /*propsByType*/ 32768 && t_value !== (t_value = pascalCaseToSentence(/*selectedName*/ ctx[70]) + "")) set_data(t, t_value);
|
|
2512
2778
|
},
|
|
2513
2779
|
d(detaching) {
|
|
2514
2780
|
if (detaching) detach(span);
|
|
@@ -2516,26 +2782,24 @@ function create_else_block(ctx) {
|
|
|
2516
2782
|
};
|
|
2517
2783
|
}
|
|
2518
2784
|
|
|
2519
|
-
// (
|
|
2785
|
+
// (535:24) {#if choices.props.length > 1}
|
|
2520
2786
|
function create_if_block_7(ctx) {
|
|
2521
|
-
let div;
|
|
2522
2787
|
let select;
|
|
2523
2788
|
let mounted;
|
|
2524
2789
|
let dispose;
|
|
2525
|
-
let each_value_2 = /*choices*/ ctx[
|
|
2790
|
+
let each_value_2 = /*choices*/ ctx[69].props;
|
|
2526
2791
|
let each_blocks = [];
|
|
2527
2792
|
|
|
2528
2793
|
for (let i = 0; i < each_value_2.length; i += 1) {
|
|
2529
2794
|
each_blocks[i] = create_each_block_2(get_each_context_2(ctx, each_value_2, i));
|
|
2530
2795
|
}
|
|
2531
2796
|
|
|
2532
|
-
function
|
|
2533
|
-
return /*
|
|
2797
|
+
function change_handler_1(...args) {
|
|
2798
|
+
return /*change_handler_1*/ ctx[43](/*choices*/ ctx[69], /*each_value*/ ctx[71], /*choices_index*/ ctx[72], ...args);
|
|
2534
2799
|
}
|
|
2535
2800
|
|
|
2536
2801
|
return {
|
|
2537
2802
|
c() {
|
|
2538
|
-
div = element("div");
|
|
2539
2803
|
select = element("select");
|
|
2540
2804
|
|
|
2541
2805
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
@@ -2543,23 +2807,24 @@ function create_if_block_7(ctx) {
|
|
|
2543
2807
|
}
|
|
2544
2808
|
},
|
|
2545
2809
|
m(target, anchor) {
|
|
2546
|
-
insert(target,
|
|
2547
|
-
append(div, select);
|
|
2810
|
+
insert(target, select, anchor);
|
|
2548
2811
|
|
|
2549
2812
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
2550
|
-
each_blocks[i]
|
|
2813
|
+
if (each_blocks[i]) {
|
|
2814
|
+
each_blocks[i].m(select, null);
|
|
2815
|
+
}
|
|
2551
2816
|
}
|
|
2552
2817
|
|
|
2553
2818
|
if (!mounted) {
|
|
2554
|
-
dispose = listen(select, "change",
|
|
2819
|
+
dispose = listen(select, "change", change_handler_1);
|
|
2555
2820
|
mounted = true;
|
|
2556
2821
|
}
|
|
2557
2822
|
},
|
|
2558
2823
|
p(new_ctx, dirty) {
|
|
2559
2824
|
ctx = new_ctx;
|
|
2560
2825
|
|
|
2561
|
-
if (dirty[0] & /*propsByType*/
|
|
2562
|
-
each_value_2 = /*choices*/ ctx[
|
|
2826
|
+
if (dirty[0] & /*propsByType*/ 32768) {
|
|
2827
|
+
each_value_2 = /*choices*/ ctx[69].props;
|
|
2563
2828
|
let i;
|
|
2564
2829
|
|
|
2565
2830
|
for (i = 0; i < each_value_2.length; i += 1) {
|
|
@@ -2582,7 +2847,7 @@ function create_if_block_7(ctx) {
|
|
|
2582
2847
|
}
|
|
2583
2848
|
},
|
|
2584
2849
|
d(detaching) {
|
|
2585
|
-
if (detaching) detach(
|
|
2850
|
+
if (detaching) detach(select);
|
|
2586
2851
|
destroy_each(each_blocks, detaching);
|
|
2587
2852
|
mounted = false;
|
|
2588
2853
|
dispose();
|
|
@@ -2590,53 +2855,116 @@ function create_if_block_7(ctx) {
|
|
|
2590
2855
|
};
|
|
2591
2856
|
}
|
|
2592
2857
|
|
|
2593
|
-
// (
|
|
2594
|
-
function
|
|
2595
|
-
let
|
|
2596
|
-
let
|
|
2858
|
+
// (546:40) {:else}
|
|
2859
|
+
function create_else_block(ctx) {
|
|
2860
|
+
let t_value = pascalCaseToSentence(/*propName*/ ctx[76]) + "";
|
|
2861
|
+
let t;
|
|
2862
|
+
|
|
2863
|
+
return {
|
|
2864
|
+
c() {
|
|
2865
|
+
t = text(t_value);
|
|
2866
|
+
},
|
|
2867
|
+
m(target, anchor) {
|
|
2868
|
+
insert(target, t, anchor);
|
|
2869
|
+
},
|
|
2870
|
+
p(ctx, dirty) {
|
|
2871
|
+
if (dirty[0] & /*propsByType*/ 32768 && t_value !== (t_value = pascalCaseToSentence(/*propName*/ ctx[76]) + "")) set_data(t, t_value);
|
|
2872
|
+
},
|
|
2873
|
+
d(detaching) {
|
|
2874
|
+
if (detaching) detach(t);
|
|
2875
|
+
}
|
|
2876
|
+
};
|
|
2877
|
+
}
|
|
2878
|
+
|
|
2879
|
+
// (544:40) {#if choices.type === "color"}
|
|
2880
|
+
function create_if_block_8(ctx) {
|
|
2881
|
+
let t0_value = capitalizeFirstLetter(/*propName*/ ctx[76]) + "";
|
|
2597
2882
|
let t0;
|
|
2598
2883
|
let t1;
|
|
2884
|
+
|
|
2885
|
+
return {
|
|
2886
|
+
c() {
|
|
2887
|
+
t0 = text(t0_value);
|
|
2888
|
+
t1 = text(" color");
|
|
2889
|
+
},
|
|
2890
|
+
m(target, anchor) {
|
|
2891
|
+
insert(target, t0, anchor);
|
|
2892
|
+
insert(target, t1, anchor);
|
|
2893
|
+
},
|
|
2894
|
+
p(ctx, dirty) {
|
|
2895
|
+
if (dirty[0] & /*propsByType*/ 32768 && t0_value !== (t0_value = capitalizeFirstLetter(/*propName*/ ctx[76]) + "")) set_data(t0, t0_value);
|
|
2896
|
+
},
|
|
2897
|
+
d(detaching) {
|
|
2898
|
+
if (detaching) detach(t0);
|
|
2899
|
+
if (detaching) detach(t1);
|
|
2900
|
+
}
|
|
2901
|
+
};
|
|
2902
|
+
}
|
|
2903
|
+
|
|
2904
|
+
// (542:32) {#each choices.props as propName, i}
|
|
2905
|
+
function create_each_block_2(ctx) {
|
|
2906
|
+
let option;
|
|
2907
|
+
let t;
|
|
2599
2908
|
let option_selected_value;
|
|
2600
2909
|
|
|
2910
|
+
function select_block_type_2(ctx, dirty) {
|
|
2911
|
+
if (/*choices*/ ctx[69].type === "color") return create_if_block_8;
|
|
2912
|
+
return create_else_block;
|
|
2913
|
+
}
|
|
2914
|
+
|
|
2915
|
+
let current_block_type = select_block_type_2(ctx);
|
|
2916
|
+
let if_block = current_block_type(ctx);
|
|
2917
|
+
|
|
2601
2918
|
return {
|
|
2602
2919
|
c() {
|
|
2603
2920
|
option = element("option");
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
option.selected = option_selected_value = /*i*/ ctx[
|
|
2607
|
-
option.__value = /*i*/ ctx[
|
|
2921
|
+
if_block.c();
|
|
2922
|
+
t = space();
|
|
2923
|
+
option.selected = option_selected_value = /*i*/ ctx[78] === /*choices*/ ctx[69].selected;
|
|
2924
|
+
option.__value = /*i*/ ctx[78];
|
|
2608
2925
|
option.value = option.__value;
|
|
2609
2926
|
},
|
|
2610
2927
|
m(target, anchor) {
|
|
2611
2928
|
insert(target, option, anchor);
|
|
2612
|
-
|
|
2613
|
-
append(option,
|
|
2929
|
+
if_block.m(option, null);
|
|
2930
|
+
append(option, t);
|
|
2614
2931
|
},
|
|
2615
2932
|
p(ctx, dirty) {
|
|
2616
|
-
if (
|
|
2933
|
+
if (current_block_type === (current_block_type = select_block_type_2(ctx)) && if_block) {
|
|
2934
|
+
if_block.p(ctx, dirty);
|
|
2935
|
+
} else {
|
|
2936
|
+
if_block.d(1);
|
|
2937
|
+
if_block = current_block_type(ctx);
|
|
2938
|
+
|
|
2939
|
+
if (if_block) {
|
|
2940
|
+
if_block.c();
|
|
2941
|
+
if_block.m(option, t);
|
|
2942
|
+
}
|
|
2943
|
+
}
|
|
2617
2944
|
|
|
2618
|
-
if (dirty[0] & /*propsByType*/
|
|
2945
|
+
if (dirty[0] & /*propsByType*/ 32768 && option_selected_value !== (option_selected_value = /*i*/ ctx[78] === /*choices*/ ctx[69].selected)) {
|
|
2619
2946
|
option.selected = option_selected_value;
|
|
2620
2947
|
}
|
|
2621
2948
|
},
|
|
2622
2949
|
d(detaching) {
|
|
2623
2950
|
if (detaching) detach(option);
|
|
2951
|
+
if_block.d();
|
|
2624
2952
|
}
|
|
2625
2953
|
};
|
|
2626
2954
|
}
|
|
2627
2955
|
|
|
2628
|
-
// (
|
|
2956
|
+
// (587:54)
|
|
2629
2957
|
function create_if_block_6(ctx) {
|
|
2630
2958
|
let colorpicker;
|
|
2631
2959
|
let current;
|
|
2632
2960
|
|
|
2633
2961
|
function func(...args) {
|
|
2634
|
-
return /*func*/ ctx[
|
|
2962
|
+
return /*func*/ ctx[47](/*selectedName*/ ctx[70], ...args);
|
|
2635
2963
|
}
|
|
2636
2964
|
|
|
2637
|
-
colorpicker = new ColorPicker
|
|
2965
|
+
colorpicker = new ColorPicker({
|
|
2638
2966
|
props: {
|
|
2639
|
-
value: /*allCurrentPropDefs*/ ctx[
|
|
2967
|
+
value: /*allCurrentPropDefs*/ ctx[16][/*selectedName*/ ctx[70]].value,
|
|
2640
2968
|
onChange: func
|
|
2641
2969
|
}
|
|
2642
2970
|
});
|
|
@@ -2652,8 +2980,8 @@ function create_if_block_6(ctx) {
|
|
|
2652
2980
|
p(new_ctx, dirty) {
|
|
2653
2981
|
ctx = new_ctx;
|
|
2654
2982
|
const colorpicker_changes = {};
|
|
2655
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
2656
|
-
if (dirty[0] & /*propsByType*/
|
|
2983
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 98304) colorpicker_changes.value = /*allCurrentPropDefs*/ ctx[16][/*selectedName*/ ctx[70]].value;
|
|
2984
|
+
if (dirty[0] & /*propsByType*/ 32768) colorpicker_changes.onChange = func;
|
|
2657
2985
|
colorpicker.$set(colorpicker_changes);
|
|
2658
2986
|
},
|
|
2659
2987
|
i(local) {
|
|
@@ -2671,23 +2999,23 @@ function create_if_block_6(ctx) {
|
|
|
2671
2999
|
};
|
|
2672
3000
|
}
|
|
2673
3001
|
|
|
2674
|
-
// (
|
|
3002
|
+
// (575:55)
|
|
2675
3003
|
function create_if_block_4(ctx) {
|
|
2676
3004
|
let select;
|
|
2677
|
-
let show_if = !/*choices*/ ctx[
|
|
3005
|
+
let show_if = !/*choices*/ ctx[69].includes(/*allCurrentPropDefs*/ ctx[16][/*selectedName*/ ctx[70]].value);
|
|
2678
3006
|
let if_block_anchor;
|
|
2679
3007
|
let mounted;
|
|
2680
3008
|
let dispose;
|
|
2681
3009
|
let if_block = show_if && create_if_block_5();
|
|
2682
|
-
let each_value_1 = /*choices*/ ctx[
|
|
3010
|
+
let each_value_1 = /*choices*/ ctx[69];
|
|
2683
3011
|
let each_blocks = [];
|
|
2684
3012
|
|
|
2685
3013
|
for (let i = 0; i < each_value_1.length; i += 1) {
|
|
2686
3014
|
each_blocks[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i));
|
|
2687
3015
|
}
|
|
2688
3016
|
|
|
2689
|
-
function
|
|
2690
|
-
return /*
|
|
3017
|
+
function change_handler_3(...args) {
|
|
3018
|
+
return /*change_handler_3*/ ctx[46](/*selectedName*/ ctx[70], ...args);
|
|
2691
3019
|
}
|
|
2692
3020
|
|
|
2693
3021
|
return {
|
|
@@ -2706,17 +3034,19 @@ function create_if_block_4(ctx) {
|
|
|
2706
3034
|
append(select, if_block_anchor);
|
|
2707
3035
|
|
|
2708
3036
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
2709
|
-
each_blocks[i]
|
|
3037
|
+
if (each_blocks[i]) {
|
|
3038
|
+
each_blocks[i].m(select, null);
|
|
3039
|
+
}
|
|
2710
3040
|
}
|
|
2711
3041
|
|
|
2712
3042
|
if (!mounted) {
|
|
2713
|
-
dispose = listen(select, "change",
|
|
3043
|
+
dispose = listen(select, "change", change_handler_3);
|
|
2714
3044
|
mounted = true;
|
|
2715
3045
|
}
|
|
2716
3046
|
},
|
|
2717
3047
|
p(new_ctx, dirty) {
|
|
2718
3048
|
ctx = new_ctx;
|
|
2719
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
3049
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 98304) show_if = !/*choices*/ ctx[69].includes(/*allCurrentPropDefs*/ ctx[16][/*selectedName*/ ctx[70]].value);
|
|
2720
3050
|
|
|
2721
3051
|
if (show_if) {
|
|
2722
3052
|
if (if_block) ; else {
|
|
@@ -2729,8 +3059,8 @@ function create_if_block_4(ctx) {
|
|
|
2729
3059
|
if_block = null;
|
|
2730
3060
|
}
|
|
2731
3061
|
|
|
2732
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
2733
|
-
each_value_1 = /*choices*/ ctx[
|
|
3062
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 98304) {
|
|
3063
|
+
each_value_1 = /*choices*/ ctx[69];
|
|
2734
3064
|
let i;
|
|
2735
3065
|
|
|
2736
3066
|
for (i = 0; i < each_value_1.length; i += 1) {
|
|
@@ -2764,7 +3094,7 @@ function create_if_block_4(ctx) {
|
|
|
2764
3094
|
};
|
|
2765
3095
|
}
|
|
2766
3096
|
|
|
2767
|
-
// (
|
|
3097
|
+
// (557:20) {#if choices.type === "slider"}
|
|
2768
3098
|
function create_if_block_3(ctx) {
|
|
2769
3099
|
let input;
|
|
2770
3100
|
let input_min_value;
|
|
@@ -2773,13 +3103,13 @@ function create_if_block_3(ctx) {
|
|
|
2773
3103
|
let input_value_value;
|
|
2774
3104
|
let t0;
|
|
2775
3105
|
let span;
|
|
2776
|
-
let t1_value = /*allCurrentPropDefs*/ ctx[
|
|
3106
|
+
let t1_value = /*allCurrentPropDefs*/ ctx[16][/*selectedName*/ ctx[70]].displayed + "";
|
|
2777
3107
|
let t1;
|
|
2778
3108
|
let mounted;
|
|
2779
3109
|
let dispose;
|
|
2780
3110
|
|
|
2781
|
-
function
|
|
2782
|
-
return /*
|
|
3111
|
+
function change_handler_2(...args) {
|
|
3112
|
+
return /*change_handler_2*/ ctx[45](/*selectedName*/ ctx[70], ...args);
|
|
2783
3113
|
}
|
|
2784
3114
|
|
|
2785
3115
|
return {
|
|
@@ -2789,10 +3119,10 @@ function create_if_block_3(ctx) {
|
|
|
2789
3119
|
span = element("span");
|
|
2790
3120
|
t1 = text(t1_value);
|
|
2791
3121
|
attr(input, "type", "range");
|
|
2792
|
-
attr(input, "min", input_min_value = /*allCurrentPropDefs*/ ctx[
|
|
2793
|
-
attr(input, "max", input_max_value = /*allCurrentPropDefs*/ ctx[
|
|
2794
|
-
attr(input, "step", input_step_value = /*allCurrentPropDefs*/ ctx[
|
|
2795
|
-
input.value = input_value_value = /*allCurrentPropDefs*/ ctx[
|
|
3122
|
+
attr(input, "min", input_min_value = /*allCurrentPropDefs*/ ctx[16][/*selectedName*/ ctx[70]].min);
|
|
3123
|
+
attr(input, "max", input_max_value = /*allCurrentPropDefs*/ ctx[16][/*selectedName*/ ctx[70]].max);
|
|
3124
|
+
attr(input, "step", input_step_value = /*allCurrentPropDefs*/ ctx[16][/*selectedName*/ ctx[70]].step || 1);
|
|
3125
|
+
input.value = input_value_value = /*allCurrentPropDefs*/ ctx[16][/*selectedName*/ ctx[70]].value;
|
|
2796
3126
|
attr(span, "class", "current-value");
|
|
2797
3127
|
},
|
|
2798
3128
|
m(target, anchor) {
|
|
@@ -2802,30 +3132,30 @@ function create_if_block_3(ctx) {
|
|
|
2802
3132
|
append(span, t1);
|
|
2803
3133
|
|
|
2804
3134
|
if (!mounted) {
|
|
2805
|
-
dispose = listen(input, "change",
|
|
3135
|
+
dispose = listen(input, "change", change_handler_2);
|
|
2806
3136
|
mounted = true;
|
|
2807
3137
|
}
|
|
2808
3138
|
},
|
|
2809
3139
|
p(new_ctx, dirty) {
|
|
2810
3140
|
ctx = new_ctx;
|
|
2811
3141
|
|
|
2812
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
3142
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 98304 && input_min_value !== (input_min_value = /*allCurrentPropDefs*/ ctx[16][/*selectedName*/ ctx[70]].min)) {
|
|
2813
3143
|
attr(input, "min", input_min_value);
|
|
2814
3144
|
}
|
|
2815
3145
|
|
|
2816
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
3146
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 98304 && input_max_value !== (input_max_value = /*allCurrentPropDefs*/ ctx[16][/*selectedName*/ ctx[70]].max)) {
|
|
2817
3147
|
attr(input, "max", input_max_value);
|
|
2818
3148
|
}
|
|
2819
3149
|
|
|
2820
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
3150
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 98304 && input_step_value !== (input_step_value = /*allCurrentPropDefs*/ ctx[16][/*selectedName*/ ctx[70]].step || 1)) {
|
|
2821
3151
|
attr(input, "step", input_step_value);
|
|
2822
3152
|
}
|
|
2823
3153
|
|
|
2824
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
3154
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 98304 && input_value_value !== (input_value_value = /*allCurrentPropDefs*/ ctx[16][/*selectedName*/ ctx[70]].value)) {
|
|
2825
3155
|
input.value = input_value_value;
|
|
2826
3156
|
}
|
|
2827
3157
|
|
|
2828
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
3158
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 98304 && t1_value !== (t1_value = /*allCurrentPropDefs*/ ctx[16][/*selectedName*/ ctx[70]].displayed + "")) set_data(t1, t1_value);
|
|
2829
3159
|
},
|
|
2830
3160
|
i: noop$1,
|
|
2831
3161
|
o: noop$1,
|
|
@@ -2839,7 +3169,7 @@ function create_if_block_3(ctx) {
|
|
|
2839
3169
|
};
|
|
2840
3170
|
}
|
|
2841
3171
|
|
|
2842
|
-
// (
|
|
3172
|
+
// (578:28) {#if !choices.includes(allCurrentPropDefs[selectedName].value)}
|
|
2843
3173
|
function create_if_block_5(ctx) {
|
|
2844
3174
|
let option;
|
|
2845
3175
|
|
|
@@ -2860,10 +3190,10 @@ function create_if_block_5(ctx) {
|
|
|
2860
3190
|
};
|
|
2861
3191
|
}
|
|
2862
3192
|
|
|
2863
|
-
// (
|
|
3193
|
+
// (581:28) {#each choices as choice}
|
|
2864
3194
|
function create_each_block_1(ctx) {
|
|
2865
3195
|
let option;
|
|
2866
|
-
let t_value = /*choice*/ ctx[
|
|
3196
|
+
let t_value = /*choice*/ ctx[73] + "";
|
|
2867
3197
|
let t;
|
|
2868
3198
|
let option_selected_value;
|
|
2869
3199
|
let option_value_value;
|
|
@@ -2872,8 +3202,8 @@ function create_each_block_1(ctx) {
|
|
|
2872
3202
|
c() {
|
|
2873
3203
|
option = element("option");
|
|
2874
3204
|
t = text(t_value);
|
|
2875
|
-
option.selected = option_selected_value = /*choice*/ ctx[
|
|
2876
|
-
option.__value = option_value_value = "
|
|
3205
|
+
option.selected = option_selected_value = /*choice*/ ctx[73] == /*allCurrentPropDefs*/ ctx[16][/*selectedName*/ ctx[70]].value || null;
|
|
3206
|
+
option.__value = option_value_value = "\n " + /*choice*/ ctx[73] + "\n ";
|
|
2877
3207
|
option.value = option.__value;
|
|
2878
3208
|
},
|
|
2879
3209
|
m(target, anchor) {
|
|
@@ -2881,13 +3211,13 @@ function create_each_block_1(ctx) {
|
|
|
2881
3211
|
append(option, t);
|
|
2882
3212
|
},
|
|
2883
3213
|
p(ctx, dirty) {
|
|
2884
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
3214
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 98304 && t_value !== (t_value = /*choice*/ ctx[73] + "")) set_data(t, t_value);
|
|
2885
3215
|
|
|
2886
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
3216
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 98304 && option_selected_value !== (option_selected_value = /*choice*/ ctx[73] == /*allCurrentPropDefs*/ ctx[16][/*selectedName*/ ctx[70]].value || null)) {
|
|
2887
3217
|
option.selected = option_selected_value;
|
|
2888
3218
|
}
|
|
2889
3219
|
|
|
2890
|
-
if (dirty[0] & /*allCurrentPropDefs, propsByType*/
|
|
3220
|
+
if (dirty[0] & /*allCurrentPropDefs, propsByType*/ 98304 && option_value_value !== (option_value_value = "\n " + /*choice*/ ctx[73] + "\n ")) {
|
|
2891
3221
|
option.__value = option_value_value;
|
|
2892
3222
|
option.value = option.__value;
|
|
2893
3223
|
}
|
|
@@ -2898,37 +3228,39 @@ function create_each_block_1(ctx) {
|
|
|
2898
3228
|
};
|
|
2899
3229
|
}
|
|
2900
3230
|
|
|
2901
|
-
// (
|
|
3231
|
+
// (531:12) {#each propsByType as choices}
|
|
2902
3232
|
function create_each_block(ctx) {
|
|
2903
|
-
let
|
|
3233
|
+
let div1;
|
|
3234
|
+
let div0;
|
|
2904
3235
|
let t0;
|
|
2905
3236
|
let span;
|
|
2906
3237
|
let t2;
|
|
2907
3238
|
let current_block_type_index;
|
|
2908
3239
|
let if_block1;
|
|
3240
|
+
let div1_class_value;
|
|
2909
3241
|
let current;
|
|
2910
3242
|
let mounted;
|
|
2911
3243
|
let dispose;
|
|
2912
3244
|
|
|
2913
|
-
function
|
|
2914
|
-
if (/*choices*/ ctx[
|
|
2915
|
-
return
|
|
3245
|
+
function select_block_type_1(ctx, dirty) {
|
|
3246
|
+
if (/*choices*/ ctx[69].props.length > 1) return create_if_block_7;
|
|
3247
|
+
return create_else_block_1;
|
|
2916
3248
|
}
|
|
2917
3249
|
|
|
2918
|
-
let current_block_type =
|
|
3250
|
+
let current_block_type = select_block_type_1(ctx);
|
|
2919
3251
|
let if_block0 = current_block_type(ctx);
|
|
2920
3252
|
|
|
2921
3253
|
function click_handler_3() {
|
|
2922
|
-
return /*click_handler_3*/ ctx[
|
|
3254
|
+
return /*click_handler_3*/ ctx[44](/*selectedName*/ ctx[70]);
|
|
2923
3255
|
}
|
|
2924
3256
|
|
|
2925
3257
|
const if_block_creators = [create_if_block_3, create_if_block_4, create_if_block_6];
|
|
2926
3258
|
const if_blocks = [];
|
|
2927
3259
|
|
|
2928
|
-
function
|
|
2929
|
-
if (/*choices*/ ctx[
|
|
2930
|
-
if (/*choices*/ ctx[
|
|
2931
|
-
if (/*choices*/ ctx[
|
|
3260
|
+
function select_block_type_3(ctx, dirty) {
|
|
3261
|
+
if (/*choices*/ ctx[69].type === "slider") return 0;
|
|
3262
|
+
if (/*choices*/ ctx[69].type == "select") return 1;
|
|
3263
|
+
if (/*choices*/ ctx[69].type == "color") return 2;
|
|
2932
3264
|
return -1;
|
|
2933
3265
|
}
|
|
2934
3266
|
|
|
@@ -2937,13 +3269,14 @@ function create_each_block(ctx) {
|
|
|
2937
3269
|
return ctx;
|
|
2938
3270
|
}
|
|
2939
3271
|
|
|
2940
|
-
if (~(current_block_type_index =
|
|
3272
|
+
if (~(current_block_type_index = select_block_type_3(ctx))) {
|
|
2941
3273
|
if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](select_block_ctx(ctx, current_block_type_index));
|
|
2942
3274
|
}
|
|
2943
3275
|
|
|
2944
3276
|
return {
|
|
2945
3277
|
c() {
|
|
2946
|
-
|
|
3278
|
+
div1 = element("div");
|
|
3279
|
+
div0 = element("div");
|
|
2947
3280
|
if_block0.c();
|
|
2948
3281
|
t0 = space();
|
|
2949
3282
|
span = element("span");
|
|
@@ -2951,17 +3284,19 @@ function create_each_block(ctx) {
|
|
|
2951
3284
|
t2 = space();
|
|
2952
3285
|
if (if_block1) if_block1.c();
|
|
2953
3286
|
attr(span, "class", "delete");
|
|
2954
|
-
attr(
|
|
3287
|
+
attr(div0, "class", "prop-name");
|
|
3288
|
+
attr(div1, "class", div1_class_value = "prop-section " + /*choices*/ ctx[69].type);
|
|
2955
3289
|
},
|
|
2956
3290
|
m(target, anchor) {
|
|
2957
|
-
insert(target,
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
append(
|
|
2961
|
-
append(
|
|
3291
|
+
insert(target, div1, anchor);
|
|
3292
|
+
append(div1, div0);
|
|
3293
|
+
if_block0.m(div0, null);
|
|
3294
|
+
append(div0, t0);
|
|
3295
|
+
append(div0, span);
|
|
3296
|
+
append(div1, t2);
|
|
2962
3297
|
|
|
2963
3298
|
if (~current_block_type_index) {
|
|
2964
|
-
if_blocks[current_block_type_index].m(
|
|
3299
|
+
if_blocks[current_block_type_index].m(div1, null);
|
|
2965
3300
|
}
|
|
2966
3301
|
|
|
2967
3302
|
current = true;
|
|
@@ -2974,7 +3309,7 @@ function create_each_block(ctx) {
|
|
|
2974
3309
|
p(new_ctx, dirty) {
|
|
2975
3310
|
ctx = new_ctx;
|
|
2976
3311
|
|
|
2977
|
-
if (current_block_type === (current_block_type =
|
|
3312
|
+
if (current_block_type === (current_block_type = select_block_type_1(ctx)) && if_block0) {
|
|
2978
3313
|
if_block0.p(ctx, dirty);
|
|
2979
3314
|
} else {
|
|
2980
3315
|
if_block0.d(1);
|
|
@@ -2982,12 +3317,12 @@ function create_each_block(ctx) {
|
|
|
2982
3317
|
|
|
2983
3318
|
if (if_block0) {
|
|
2984
3319
|
if_block0.c();
|
|
2985
|
-
if_block0.m(
|
|
3320
|
+
if_block0.m(div0, t0);
|
|
2986
3321
|
}
|
|
2987
3322
|
}
|
|
2988
3323
|
|
|
2989
3324
|
let previous_block_index = current_block_type_index;
|
|
2990
|
-
current_block_type_index =
|
|
3325
|
+
current_block_type_index = select_block_type_3(ctx);
|
|
2991
3326
|
|
|
2992
3327
|
if (current_block_type_index === previous_block_index) {
|
|
2993
3328
|
if (~current_block_type_index) {
|
|
@@ -3015,11 +3350,15 @@ function create_each_block(ctx) {
|
|
|
3015
3350
|
}
|
|
3016
3351
|
|
|
3017
3352
|
transition_in(if_block1, 1);
|
|
3018
|
-
if_block1.m(
|
|
3353
|
+
if_block1.m(div1, null);
|
|
3019
3354
|
} else {
|
|
3020
3355
|
if_block1 = null;
|
|
3021
3356
|
}
|
|
3022
3357
|
}
|
|
3358
|
+
|
|
3359
|
+
if (!current || dirty[0] & /*propsByType*/ 32768 && div1_class_value !== (div1_class_value = "prop-section " + /*choices*/ ctx[69].type)) {
|
|
3360
|
+
attr(div1, "class", div1_class_value);
|
|
3361
|
+
}
|
|
3023
3362
|
},
|
|
3024
3363
|
i(local) {
|
|
3025
3364
|
if (current) return;
|
|
@@ -3031,7 +3370,7 @@ function create_each_block(ctx) {
|
|
|
3031
3370
|
current = false;
|
|
3032
3371
|
},
|
|
3033
3372
|
d(detaching) {
|
|
3034
|
-
if (detaching) detach(
|
|
3373
|
+
if (detaching) detach(div1);
|
|
3035
3374
|
if_block0.d();
|
|
3036
3375
|
|
|
3037
3376
|
if (~current_block_type_index) {
|
|
@@ -3044,7 +3383,7 @@ function create_each_block(ctx) {
|
|
|
3044
3383
|
};
|
|
3045
3384
|
}
|
|
3046
3385
|
|
|
3047
|
-
// (
|
|
3386
|
+
// (595:12) {#if currentRule === "inline" && bringableToFront[selectedElemIndex] !== null}
|
|
3048
3387
|
function create_if_block_2(ctx) {
|
|
3049
3388
|
let div;
|
|
3050
3389
|
let mounted;
|
|
@@ -3055,19 +3394,19 @@ function create_if_block_2(ctx) {
|
|
|
3055
3394
|
div = element("div");
|
|
3056
3395
|
div.textContent = "Bring to front";
|
|
3057
3396
|
attr(div, "class", "btn");
|
|
3058
|
-
toggle_class(div, "active", /*bringableToFront*/ ctx[
|
|
3397
|
+
toggle_class(div, "active", /*bringableToFront*/ ctx[17][/*selectedElemIndex*/ ctx[6]] === true);
|
|
3059
3398
|
},
|
|
3060
3399
|
m(target, anchor) {
|
|
3061
3400
|
insert(target, div, anchor);
|
|
3062
3401
|
|
|
3063
3402
|
if (!mounted) {
|
|
3064
|
-
dispose = listen(div, "click", /*bringToFront*/ ctx[
|
|
3403
|
+
dispose = listen(div, "click", /*bringToFront*/ ctx[24]);
|
|
3065
3404
|
mounted = true;
|
|
3066
3405
|
}
|
|
3067
3406
|
},
|
|
3068
3407
|
p(ctx, dirty) {
|
|
3069
|
-
if (dirty[0] & /*bringableToFront, selectedElemIndex*/
|
|
3070
|
-
toggle_class(div, "active", /*bringableToFront*/ ctx[
|
|
3408
|
+
if (dirty[0] & /*bringableToFront, selectedElemIndex*/ 131136) {
|
|
3409
|
+
toggle_class(div, "active", /*bringableToFront*/ ctx[17][/*selectedElemIndex*/ ctx[6]] === true);
|
|
3071
3410
|
}
|
|
3072
3411
|
},
|
|
3073
3412
|
d(detaching) {
|
|
@@ -3078,7 +3417,7 @@ function create_if_block_2(ctx) {
|
|
|
3078
3417
|
};
|
|
3079
3418
|
}
|
|
3080
3419
|
|
|
3081
|
-
// (
|
|
3420
|
+
// (600:12) {#if currentRule === "inline" && inlineDeletable(currentElement)}
|
|
3082
3421
|
function create_if_block_1(ctx) {
|
|
3083
3422
|
let div;
|
|
3084
3423
|
let mounted;
|
|
@@ -3094,7 +3433,7 @@ function create_if_block_1(ctx) {
|
|
|
3094
3433
|
insert(target, div, anchor);
|
|
3095
3434
|
|
|
3096
3435
|
if (!mounted) {
|
|
3097
|
-
dispose = listen(div, "click", /*deleteElem*/ ctx[
|
|
3436
|
+
dispose = listen(div, "click", /*deleteElem*/ ctx[25]);
|
|
3098
3437
|
mounted = true;
|
|
3099
3438
|
}
|
|
3100
3439
|
},
|
|
@@ -3124,6 +3463,7 @@ function create_fragment(ctx) {
|
|
|
3124
3463
|
let div2;
|
|
3125
3464
|
let b0;
|
|
3126
3465
|
let t6;
|
|
3466
|
+
let show_if;
|
|
3127
3467
|
let t7;
|
|
3128
3468
|
let div3;
|
|
3129
3469
|
let b1;
|
|
@@ -3132,22 +3472,25 @@ function create_fragment(ctx) {
|
|
|
3132
3472
|
let current;
|
|
3133
3473
|
let mounted;
|
|
3134
3474
|
let dispose;
|
|
3135
|
-
let if_block0 = /*targetsToSearch*/ ctx[
|
|
3136
|
-
let each_value_4 = getRuleNames(/*allRules*/ ctx[3][/*selectedElemIndex*/ ctx[5]]);
|
|
3137
|
-
let each_blocks_1 = [];
|
|
3475
|
+
let if_block0 = /*targetsToSearch*/ ctx[3].length > 1 && create_if_block_11(ctx);
|
|
3138
3476
|
|
|
3139
|
-
|
|
3140
|
-
|
|
3477
|
+
function select_block_type(ctx, dirty) {
|
|
3478
|
+
if (dirty[0] & /*allRules, selectedElemIndex*/ 80) show_if = null;
|
|
3479
|
+
if (show_if == null) show_if = !!(nbChars(/*getRuleNamesTransformed*/ ctx[21](/*allRules*/ ctx[4][/*selectedElemIndex*/ ctx[6]])) > 30);
|
|
3480
|
+
if (show_if) return create_if_block_10;
|
|
3481
|
+
return create_else_block_2;
|
|
3141
3482
|
}
|
|
3142
3483
|
|
|
3143
|
-
let
|
|
3484
|
+
let current_block_type = select_block_type(ctx, [-1, -1, -1]);
|
|
3485
|
+
let if_block1 = current_block_type(ctx);
|
|
3486
|
+
let each_value_3 = /*allTypes*/ ctx[5][/*selectedElemIndex*/ ctx[6]] || [];
|
|
3144
3487
|
let each_blocks = [];
|
|
3145
3488
|
|
|
3146
3489
|
for (let i = 0; i < each_value_3.length; i += 1) {
|
|
3147
3490
|
each_blocks[i] = create_each_block_3(get_each_context_3(ctx, each_value_3, i));
|
|
3148
3491
|
}
|
|
3149
3492
|
|
|
3150
|
-
let
|
|
3493
|
+
let if_block2 = /*allTypes*/ ctx[5][/*selectedElemIndex*/ ctx[6]] && create_if_block(ctx);
|
|
3151
3494
|
|
|
3152
3495
|
return {
|
|
3153
3496
|
c() {
|
|
@@ -3166,13 +3509,9 @@ function create_fragment(ctx) {
|
|
|
3166
3509
|
t4 = space();
|
|
3167
3510
|
div2 = element("div");
|
|
3168
3511
|
b0 = element("b");
|
|
3169
|
-
b0.textContent = "
|
|
3512
|
+
b0.textContent = "Applied to:";
|
|
3170
3513
|
t6 = space();
|
|
3171
|
-
|
|
3172
|
-
for (let i = 0; i < each_blocks_1.length; i += 1) {
|
|
3173
|
-
each_blocks_1[i].c();
|
|
3174
|
-
}
|
|
3175
|
-
|
|
3514
|
+
if_block1.c();
|
|
3176
3515
|
t7 = space();
|
|
3177
3516
|
div3 = element("div");
|
|
3178
3517
|
b1 = element("b");
|
|
@@ -3184,9 +3523,9 @@ function create_fragment(ctx) {
|
|
|
3184
3523
|
}
|
|
3185
3524
|
|
|
3186
3525
|
t10 = space();
|
|
3187
|
-
if (
|
|
3526
|
+
if (if_block2) if_block2.c();
|
|
3188
3527
|
set_style(div0, "position", "absolute");
|
|
3189
|
-
attr(path, "d", /*pathWithHoles*/ ctx[
|
|
3528
|
+
attr(path, "d", /*pathWithHoles*/ ctx[13]);
|
|
3190
3529
|
attr(clipPath, "id", "overlay-clip");
|
|
3191
3530
|
attr(clipPath, "clip-rule", "evenodd");
|
|
3192
3531
|
attr(rect, "y", "0");
|
|
@@ -3198,8 +3537,8 @@ function create_fragment(ctx) {
|
|
|
3198
3537
|
attr(svg, "version", "1.1");
|
|
3199
3538
|
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
3200
3539
|
attr(svg, "xmlns:xlink", "http://www.w3.org/1999/xlink");
|
|
3201
|
-
attr(svg, "width", svg_width_value = /*pageDimensions*/ ctx[
|
|
3202
|
-
attr(svg, "height", svg_height_value = /*pageDimensions*/ ctx[
|
|
3540
|
+
attr(svg, "width", svg_width_value = /*pageDimensions*/ ctx[14].width);
|
|
3541
|
+
attr(svg, "height", svg_height_value = /*pageDimensions*/ ctx[14].height);
|
|
3203
3542
|
attr(div1, "class", "close-button");
|
|
3204
3543
|
attr(div2, "class", "select-tab");
|
|
3205
3544
|
attr(div3, "class", "select-tab");
|
|
@@ -3207,13 +3546,13 @@ function create_fragment(ctx) {
|
|
|
3207
3546
|
},
|
|
3208
3547
|
m(target, anchor) {
|
|
3209
3548
|
insert(target, div0, anchor);
|
|
3210
|
-
/*div0_binding*/ ctx[
|
|
3549
|
+
/*div0_binding*/ ctx[37](div0);
|
|
3211
3550
|
insert(target, t0, anchor);
|
|
3212
3551
|
insert(target, svg, anchor);
|
|
3213
3552
|
append(svg, clipPath);
|
|
3214
3553
|
append(clipPath, path);
|
|
3215
3554
|
append(svg, rect);
|
|
3216
|
-
/*svg_binding*/ ctx[
|
|
3555
|
+
/*svg_binding*/ ctx[38](svg);
|
|
3217
3556
|
insert(target, t1, anchor);
|
|
3218
3557
|
insert(target, div4, anchor);
|
|
3219
3558
|
append(div4, div1);
|
|
@@ -3223,52 +3562,50 @@ function create_fragment(ctx) {
|
|
|
3223
3562
|
append(div4, div2);
|
|
3224
3563
|
append(div2, b0);
|
|
3225
3564
|
append(div2, t6);
|
|
3226
|
-
|
|
3227
|
-
for (let i = 0; i < each_blocks_1.length; i += 1) {
|
|
3228
|
-
each_blocks_1[i].m(div2, null);
|
|
3229
|
-
}
|
|
3230
|
-
|
|
3565
|
+
if_block1.m(div2, null);
|
|
3231
3566
|
append(div4, t7);
|
|
3232
3567
|
append(div4, div3);
|
|
3233
3568
|
append(div3, b1);
|
|
3234
3569
|
append(div3, t9);
|
|
3235
3570
|
|
|
3236
3571
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
3237
|
-
each_blocks[i]
|
|
3572
|
+
if (each_blocks[i]) {
|
|
3573
|
+
each_blocks[i].m(div3, null);
|
|
3574
|
+
}
|
|
3238
3575
|
}
|
|
3239
3576
|
|
|
3240
3577
|
append(div4, t10);
|
|
3241
|
-
if (
|
|
3242
|
-
/*div4_binding*/ ctx[
|
|
3578
|
+
if (if_block2) if_block2.m(div4, null);
|
|
3579
|
+
/*div4_binding*/ ctx[48](div4);
|
|
3243
3580
|
current = true;
|
|
3244
3581
|
|
|
3245
3582
|
if (!mounted) {
|
|
3246
3583
|
dispose = [
|
|
3247
|
-
listen(svg, "click", /*overlayClicked*/ ctx[
|
|
3248
|
-
listen(div1, "click", /*close*/ ctx[
|
|
3584
|
+
listen(svg, "click", /*overlayClicked*/ ctx[22]),
|
|
3585
|
+
listen(div1, "click", /*close*/ ctx[2])
|
|
3249
3586
|
];
|
|
3250
3587
|
|
|
3251
3588
|
mounted = true;
|
|
3252
3589
|
}
|
|
3253
3590
|
},
|
|
3254
3591
|
p(ctx, dirty) {
|
|
3255
|
-
if (!current || dirty[0] & /*pathWithHoles*/
|
|
3256
|
-
attr(path, "d", /*pathWithHoles*/ ctx[
|
|
3592
|
+
if (!current || dirty[0] & /*pathWithHoles*/ 8192) {
|
|
3593
|
+
attr(path, "d", /*pathWithHoles*/ ctx[13]);
|
|
3257
3594
|
}
|
|
3258
3595
|
|
|
3259
|
-
if (!current || dirty[0] & /*pageDimensions*/
|
|
3596
|
+
if (!current || dirty[0] & /*pageDimensions*/ 16384 && svg_width_value !== (svg_width_value = /*pageDimensions*/ ctx[14].width)) {
|
|
3260
3597
|
attr(svg, "width", svg_width_value);
|
|
3261
3598
|
}
|
|
3262
3599
|
|
|
3263
|
-
if (!current || dirty[0] & /*pageDimensions*/
|
|
3600
|
+
if (!current || dirty[0] & /*pageDimensions*/ 16384 && svg_height_value !== (svg_height_value = /*pageDimensions*/ ctx[14].height)) {
|
|
3264
3601
|
attr(svg, "height", svg_height_value);
|
|
3265
3602
|
}
|
|
3266
3603
|
|
|
3267
|
-
if (/*targetsToSearch*/ ctx[
|
|
3604
|
+
if (/*targetsToSearch*/ ctx[3].length > 1) {
|
|
3268
3605
|
if (if_block0) {
|
|
3269
3606
|
if_block0.p(ctx, dirty);
|
|
3270
3607
|
} else {
|
|
3271
|
-
if_block0 =
|
|
3608
|
+
if_block0 = create_if_block_11(ctx);
|
|
3272
3609
|
if_block0.c();
|
|
3273
3610
|
if_block0.m(div4, t4);
|
|
3274
3611
|
}
|
|
@@ -3277,31 +3614,20 @@ function create_fragment(ctx) {
|
|
|
3277
3614
|
if_block0 = null;
|
|
3278
3615
|
}
|
|
3279
3616
|
|
|
3280
|
-
if (
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
const child_ctx = get_each_context_4(ctx, each_value_4, i);
|
|
3286
|
-
|
|
3287
|
-
if (each_blocks_1[i]) {
|
|
3288
|
-
each_blocks_1[i].p(child_ctx, dirty);
|
|
3289
|
-
} else {
|
|
3290
|
-
each_blocks_1[i] = create_each_block_4(child_ctx);
|
|
3291
|
-
each_blocks_1[i].c();
|
|
3292
|
-
each_blocks_1[i].m(div2, null);
|
|
3293
|
-
}
|
|
3294
|
-
}
|
|
3617
|
+
if (current_block_type === (current_block_type = select_block_type(ctx, dirty)) && if_block1) {
|
|
3618
|
+
if_block1.p(ctx, dirty);
|
|
3619
|
+
} else {
|
|
3620
|
+
if_block1.d(1);
|
|
3621
|
+
if_block1 = current_block_type(ctx);
|
|
3295
3622
|
|
|
3296
|
-
|
|
3297
|
-
|
|
3623
|
+
if (if_block1) {
|
|
3624
|
+
if_block1.c();
|
|
3625
|
+
if_block1.m(div2, null);
|
|
3298
3626
|
}
|
|
3299
|
-
|
|
3300
|
-
each_blocks_1.length = each_value_4.length;
|
|
3301
3627
|
}
|
|
3302
3628
|
|
|
3303
|
-
if (dirty[0] & /*selectedTypeIndex, allTypes, selectedElemIndex, currentRule, hasDisplayedCustom*/
|
|
3304
|
-
each_value_3 = /*allTypes*/ ctx[
|
|
3629
|
+
if (dirty[0] & /*selectedTypeIndex, allTypes, selectedElemIndex, currentRule, hasDisplayedCustom*/ 786784) {
|
|
3630
|
+
each_value_3 = /*allTypes*/ ctx[5][/*selectedElemIndex*/ ctx[6]] || [];
|
|
3305
3631
|
let i;
|
|
3306
3632
|
|
|
3307
3633
|
for (i = 0; i < each_value_3.length; i += 1) {
|
|
@@ -3323,24 +3649,24 @@ function create_fragment(ctx) {
|
|
|
3323
3649
|
each_blocks.length = each_value_3.length;
|
|
3324
3650
|
}
|
|
3325
3651
|
|
|
3326
|
-
if (/*allTypes*/ ctx[
|
|
3327
|
-
if (
|
|
3328
|
-
|
|
3652
|
+
if (/*allTypes*/ ctx[5][/*selectedElemIndex*/ ctx[6]]) {
|
|
3653
|
+
if (if_block2) {
|
|
3654
|
+
if_block2.p(ctx, dirty);
|
|
3329
3655
|
|
|
3330
|
-
if (dirty[0] & /*allTypes, selectedElemIndex*/
|
|
3331
|
-
transition_in(
|
|
3656
|
+
if (dirty[0] & /*allTypes, selectedElemIndex*/ 96) {
|
|
3657
|
+
transition_in(if_block2, 1);
|
|
3332
3658
|
}
|
|
3333
3659
|
} else {
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
transition_in(
|
|
3337
|
-
|
|
3660
|
+
if_block2 = create_if_block(ctx);
|
|
3661
|
+
if_block2.c();
|
|
3662
|
+
transition_in(if_block2, 1);
|
|
3663
|
+
if_block2.m(div4, null);
|
|
3338
3664
|
}
|
|
3339
|
-
} else if (
|
|
3665
|
+
} else if (if_block2) {
|
|
3340
3666
|
group_outros();
|
|
3341
3667
|
|
|
3342
|
-
transition_out(
|
|
3343
|
-
|
|
3668
|
+
transition_out(if_block2, 1, 1, () => {
|
|
3669
|
+
if_block2 = null;
|
|
3344
3670
|
});
|
|
3345
3671
|
|
|
3346
3672
|
check_outros();
|
|
@@ -3348,26 +3674,26 @@ function create_fragment(ctx) {
|
|
|
3348
3674
|
},
|
|
3349
3675
|
i(local) {
|
|
3350
3676
|
if (current) return;
|
|
3351
|
-
transition_in(
|
|
3677
|
+
transition_in(if_block2);
|
|
3352
3678
|
current = true;
|
|
3353
3679
|
},
|
|
3354
3680
|
o(local) {
|
|
3355
|
-
transition_out(
|
|
3681
|
+
transition_out(if_block2);
|
|
3356
3682
|
current = false;
|
|
3357
3683
|
},
|
|
3358
3684
|
d(detaching) {
|
|
3359
3685
|
if (detaching) detach(div0);
|
|
3360
|
-
/*div0_binding*/ ctx[
|
|
3686
|
+
/*div0_binding*/ ctx[37](null);
|
|
3361
3687
|
if (detaching) detach(t0);
|
|
3362
3688
|
if (detaching) detach(svg);
|
|
3363
|
-
/*svg_binding*/ ctx[
|
|
3689
|
+
/*svg_binding*/ ctx[38](null);
|
|
3364
3690
|
if (detaching) detach(t1);
|
|
3365
3691
|
if (detaching) detach(div4);
|
|
3366
3692
|
if (if_block0) if_block0.d();
|
|
3367
|
-
|
|
3693
|
+
if_block1.d();
|
|
3368
3694
|
destroy_each(each_blocks, detaching);
|
|
3369
|
-
if (
|
|
3370
|
-
/*div4_binding*/ ctx[
|
|
3695
|
+
if (if_block2) if_block2.d();
|
|
3696
|
+
/*div4_binding*/ ctx[48](null);
|
|
3371
3697
|
mounted = false;
|
|
3372
3698
|
run_all(dispose);
|
|
3373
3699
|
}
|
|
@@ -3384,7 +3710,7 @@ function getRuleNames(rules) {
|
|
|
3384
3710
|
if (!rules) return [];
|
|
3385
3711
|
|
|
3386
3712
|
return rules.map((rule, i) => {
|
|
3387
|
-
if (rule ===
|
|
3713
|
+
if (rule === "inline") return "inline";
|
|
3388
3714
|
const cssSelector = rule.selectorText;
|
|
3389
3715
|
const title = rule.parentStyleSheet.title || `${i}`;
|
|
3390
3716
|
return `${title}: ${cssSelector}`;
|
|
@@ -3410,10 +3736,10 @@ function cssRgbToHex(rgbStr) {
|
|
|
3410
3736
|
|
|
3411
3737
|
return m.reduce(
|
|
3412
3738
|
(hexStr, cur, i) => {
|
|
3413
|
-
if (i === 3) hexStr += Math.round(cur * 255).toString(16).padStart(2,
|
|
3739
|
+
if (i === 3) hexStr += Math.round(cur * 255).toString(16).padStart(2, "0"); else hexStr += cur.toString(16).padStart(2, "0");
|
|
3414
3740
|
return hexStr;
|
|
3415
3741
|
},
|
|
3416
|
-
|
|
3742
|
+
"#"
|
|
3417
3743
|
);
|
|
3418
3744
|
}
|
|
3419
3745
|
|
|
@@ -3424,7 +3750,7 @@ function parsePropvalue(value, type = "number") {
|
|
|
3424
3750
|
|
|
3425
3751
|
if (type == "rgb") {
|
|
3426
3752
|
if (value === "none") return "#00000000";
|
|
3427
|
-
if (value.includes(
|
|
3753
|
+
if (value.includes("rgb") || value[0] == "#") return cssRgbToHex(value);
|
|
3428
3754
|
}
|
|
3429
3755
|
|
|
3430
3756
|
return value;
|
|
@@ -3459,16 +3785,16 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3459
3785
|
type: "slider",
|
|
3460
3786
|
min: 0,
|
|
3461
3787
|
max: 30,
|
|
3462
|
-
suffix:
|
|
3788
|
+
suffix: "px"
|
|
3463
3789
|
},
|
|
3464
3790
|
"border-width": {
|
|
3465
3791
|
type: "slider",
|
|
3466
3792
|
min: 0,
|
|
3467
3793
|
max: 30,
|
|
3468
|
-
suffix:
|
|
3794
|
+
suffix: "px"
|
|
3469
3795
|
},
|
|
3470
3796
|
"border-style": {
|
|
3471
|
-
type:
|
|
3797
|
+
type: "select",
|
|
3472
3798
|
choices: () => [
|
|
3473
3799
|
"none",
|
|
3474
3800
|
"dotted",
|
|
@@ -3482,33 +3808,33 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3482
3808
|
]
|
|
3483
3809
|
},
|
|
3484
3810
|
"border-color": { type: "color" },
|
|
3485
|
-
"font-family": { type:
|
|
3811
|
+
"font-family": { type: "select", choices: getFontFamilies },
|
|
3486
3812
|
"font-size": {
|
|
3487
3813
|
type: "slider",
|
|
3488
3814
|
min: 0,
|
|
3489
3815
|
max: 40,
|
|
3490
|
-
suffix:
|
|
3816
|
+
suffix: "px"
|
|
3491
3817
|
},
|
|
3492
3818
|
"font-weight": { type: "slider", min: 0, max: 800 },
|
|
3493
|
-
|
|
3819
|
+
color: { type: "color" },
|
|
3494
3820
|
"stroke-width": {
|
|
3495
3821
|
type: "slider",
|
|
3496
3822
|
min: 0,
|
|
3497
3823
|
max: 20,
|
|
3498
3824
|
step: 0.5,
|
|
3499
|
-
suffix:
|
|
3825
|
+
suffix: "px"
|
|
3500
3826
|
},
|
|
3501
|
-
|
|
3827
|
+
stroke: { type: "color" },
|
|
3502
3828
|
"stroke-linejoin": {
|
|
3503
|
-
type:
|
|
3829
|
+
type: "select",
|
|
3504
3830
|
choices: () => ["bevel", "miter", "round"]
|
|
3505
3831
|
},
|
|
3506
|
-
|
|
3832
|
+
fill: { type: "color" },
|
|
3507
3833
|
"stroke-dasharray": {
|
|
3508
3834
|
type: "slider",
|
|
3509
3835
|
min: 0,
|
|
3510
3836
|
max: 30,
|
|
3511
|
-
suffix:
|
|
3837
|
+
suffix: "px"
|
|
3512
3838
|
},
|
|
3513
3839
|
"background-color": { type: "color" }
|
|
3514
3840
|
};
|
|
@@ -3524,6 +3850,11 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3524
3850
|
let { inlineDeletable = () => true } = $$props;
|
|
3525
3851
|
let { cssRuleFilter = null } = $$props;
|
|
3526
3852
|
|
|
3853
|
+
let { getCssRuleName = (cssRuleName, element) => {
|
|
3854
|
+
if (cssRuleName === "inline") return "Selected element";
|
|
3855
|
+
return cssRuleName;
|
|
3856
|
+
} } = $$props;
|
|
3857
|
+
|
|
3527
3858
|
const propByType = {
|
|
3528
3859
|
[typeText]: fontProps,
|
|
3529
3860
|
[typeBorder]: borderProps,
|
|
@@ -3534,10 +3865,11 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3534
3865
|
|
|
3535
3866
|
const inputTypeOrder = { slider: 0, select: 1, color: 2 };
|
|
3536
3867
|
let elementToListen = null;
|
|
3868
|
+
let clickedElement = null;
|
|
3537
3869
|
let positionAnchor;
|
|
3538
3870
|
let self;
|
|
3539
3871
|
let helperElemWrapper;
|
|
3540
|
-
let pathWithHoles =
|
|
3872
|
+
let pathWithHoles = "";
|
|
3541
3873
|
let pageDimensions = { width: 0, height: 0 };
|
|
3542
3874
|
let targetsToSearch = [[]];
|
|
3543
3875
|
let allRules = []; // list of list of CSS rules, for every target element
|
|
@@ -3545,7 +3877,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3545
3877
|
let selectedElemIndex = 0;
|
|
3546
3878
|
let selectedRuleIndex = 0;
|
|
3547
3879
|
let selectedTypeIndex = 0;
|
|
3548
|
-
let propsByType; // propType -> {[props], selected}
|
|
3880
|
+
let propsByType; // propType -> {[props], selected}
|
|
3549
3881
|
let allCurrentPropDefs = {}; // propName => selectorDef
|
|
3550
3882
|
let bringableToFront = []; // null = not bringable, true = bringable, false = was bringed
|
|
3551
3883
|
let hasDisplayedCustom = false;
|
|
@@ -3553,7 +3885,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3553
3885
|
|
|
3554
3886
|
onMount(() => {
|
|
3555
3887
|
close();
|
|
3556
|
-
$$invalidate(
|
|
3888
|
+
$$invalidate(35, elementToListen = self.parentNode);
|
|
3557
3889
|
document.body.appendChild(self);
|
|
3558
3890
|
document.body.appendChild(helperElemWrapper);
|
|
3559
3891
|
document.body.appendChild(positionAnchor);
|
|
@@ -3567,12 +3899,12 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3567
3899
|
1000
|
|
3568
3900
|
);
|
|
3569
3901
|
|
|
3570
|
-
window.addEventListener(
|
|
3902
|
+
window.addEventListener("resize", udpatePageDimensions);
|
|
3571
3903
|
});
|
|
3572
3904
|
|
|
3573
3905
|
onDestroy(() => {
|
|
3574
|
-
window.removeEventListener(
|
|
3575
|
-
if (listenOnClick) elementToListen.removeEventListener("click",
|
|
3906
|
+
window.removeEventListener("resize", udpatePageDimensions);
|
|
3907
|
+
if (listenOnClick) elementToListen.removeEventListener("click", _open);
|
|
3576
3908
|
});
|
|
3577
3909
|
|
|
3578
3910
|
function getFontFamilies() {
|
|
@@ -3585,8 +3917,8 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3585
3917
|
|
|
3586
3918
|
Object.keys(_allCurrentPropDefs).forEach(key => {
|
|
3587
3919
|
const propSelectType = _allCurrentPropDefs[key].type;
|
|
3588
|
-
let retrieveType =
|
|
3589
|
-
if (propSelectType ===
|
|
3920
|
+
let retrieveType = "number";
|
|
3921
|
+
if (propSelectType === "color") retrieveType = "rgb"; else if (propSelectType === "select") retrieveType = "raw";
|
|
3590
3922
|
|
|
3591
3923
|
if (_allCurrentPropDefs[key].getter) {
|
|
3592
3924
|
const val = _allCurrentPropDefs[key].getter(currentElement);
|
|
@@ -3599,12 +3931,12 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3599
3931
|
_allCurrentPropDefs[key].value = val;
|
|
3600
3932
|
_allCurrentPropDefs[key].displayed = val;
|
|
3601
3933
|
} else {
|
|
3602
|
-
_allCurrentPropDefs[key].displayed = getComputedPropValue(currentElement, key,
|
|
3934
|
+
_allCurrentPropDefs[key].displayed = getComputedPropValue(currentElement, key, "raw");
|
|
3603
3935
|
_allCurrentPropDefs[key].value = getComputedPropValue(currentElement, key, retrieveType);
|
|
3604
3936
|
}
|
|
3605
3937
|
});
|
|
3606
3938
|
|
|
3607
|
-
$$invalidate(
|
|
3939
|
+
$$invalidate(15, propsByType = Object.entries(_allCurrentPropDefs).reduce(
|
|
3608
3940
|
(byType, [propName, selectorDef]) => {
|
|
3609
3941
|
const selectorType = selectorDef.type;
|
|
3610
3942
|
const existing = byType.find(x => x.type === selectorType);
|
|
@@ -3624,10 +3956,14 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3624
3956
|
return 0;
|
|
3625
3957
|
}));
|
|
3626
3958
|
|
|
3627
|
-
$$invalidate(
|
|
3959
|
+
$$invalidate(16, allCurrentPropDefs = _allCurrentPropDefs);
|
|
3628
3960
|
updateHelpers();
|
|
3629
3961
|
}
|
|
3630
3962
|
|
|
3963
|
+
function getRuleNamesTransformed(rules) {
|
|
3964
|
+
return getRuleNames(rules).map(name => getCssRuleName(name, clickedElement));
|
|
3965
|
+
}
|
|
3966
|
+
|
|
3631
3967
|
let warningDisplayed = new Set();
|
|
3632
3968
|
|
|
3633
3969
|
function getMatchedCSSRules(elems) {
|
|
@@ -3636,7 +3972,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3636
3972
|
return elems.reduce(
|
|
3637
3973
|
(matchedRulesByElem, elemDef) => {
|
|
3638
3974
|
const el = elemDef[0];
|
|
3639
|
-
const matchedRules = [
|
|
3975
|
+
const matchedRules = ["inline"];
|
|
3640
3976
|
|
|
3641
3977
|
for (let i in sheets) {
|
|
3642
3978
|
try {
|
|
@@ -3645,8 +3981,8 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3645
3981
|
for (let r in rules) {
|
|
3646
3982
|
let selectorText = rules[r].selectorText;
|
|
3647
3983
|
if (!selectorText || rules[r].selectorText.length > 50) continue; // skip selectors too long
|
|
3648
|
-
if (selectorText.split(
|
|
3649
|
-
if (selectorText.endsWith(
|
|
3984
|
+
if (selectorText.split(",").some(selector => selector === "*")) continue; // skip * selector
|
|
3985
|
+
if (selectorText.endsWith(":hover")) selectorText = selectorText.substring(0, selectorText.length - (":hover").length);
|
|
3650
3986
|
|
|
3651
3987
|
if (el.matches(selectorText)) {
|
|
3652
3988
|
if (cssRuleFilter !== null && !cssRuleFilter(el, rules[r].selectorText)) continue;
|
|
@@ -3655,7 +3991,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3655
3991
|
}
|
|
3656
3992
|
} catch(err) {
|
|
3657
3993
|
if (!warningDisplayed.has(i)) {
|
|
3658
|
-
console.warn(
|
|
3994
|
+
console.warn("Style editor: Not able to access", sheets[i].ownerNode, "sheet. Try CORS loading the sheet if you want to edit it.");
|
|
3659
3995
|
warningDisplayed.add(i);
|
|
3660
3996
|
}
|
|
3661
3997
|
}
|
|
@@ -3674,7 +4010,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3674
4010
|
const elem = elemDef[0];
|
|
3675
4011
|
const types = [];
|
|
3676
4012
|
|
|
3677
|
-
if (elem.firstChild && (elem.firstChild.nodeType === 3 || elem.firstChild.tagName ===
|
|
4013
|
+
if (elem.firstChild && (elem.firstChild.nodeType === 3 || elem.firstChild.tagName === "tspan")) {
|
|
3678
4014
|
// Node.TEXT_NODE
|
|
3679
4015
|
types.push(typeText);
|
|
3680
4016
|
}
|
|
@@ -3686,7 +4022,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3686
4022
|
types.push(typeStroke);
|
|
3687
4023
|
const parentTag = elem.parentElement.tagName.toLowerCase();
|
|
3688
4024
|
|
|
3689
|
-
if (parentTag ===
|
|
4025
|
+
if (parentTag === "g" && elem.previousElementSibling && elem.previousElementSibling.tagName.toLowerCase() == elemTagName) {
|
|
3690
4026
|
bringable = true;
|
|
3691
4027
|
}
|
|
3692
4028
|
} else {
|
|
@@ -3711,22 +4047,23 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3711
4047
|
}
|
|
3712
4048
|
|
|
3713
4049
|
async function open(el, x, y) {
|
|
4050
|
+
$$invalidate(9, clickedElement = el);
|
|
3714
4051
|
udpatePageDimensions();
|
|
3715
|
-
if (el.classList.contains(
|
|
3716
|
-
$$invalidate(
|
|
3717
|
-
$$invalidate(
|
|
3718
|
-
$$invalidate(
|
|
3719
|
-
$$invalidate(
|
|
3720
|
-
$$invalidate(
|
|
3721
|
-
$$invalidate(
|
|
3722
|
-
if (getElems) $$invalidate(
|
|
3723
|
-
$$invalidate(
|
|
3724
|
-
$$invalidate(
|
|
3725
|
-
$$invalidate(
|
|
4052
|
+
if (el.classList.contains("overlay-over")) return overlayClicked(); else if (self.contains(el)) return;
|
|
4053
|
+
$$invalidate(6, selectedElemIndex = 0);
|
|
4054
|
+
$$invalidate(7, selectedRuleIndex = 0);
|
|
4055
|
+
$$invalidate(8, selectedTypeIndex = 0);
|
|
4056
|
+
$$invalidate(17, bringableToFront = []);
|
|
4057
|
+
$$invalidate(5, allTypes = []);
|
|
4058
|
+
$$invalidate(4, allRules = []);
|
|
4059
|
+
if (getElems) $$invalidate(3, targetsToSearch = getElems(el)); else $$invalidate(3, targetsToSearch = [[el, "Clicked"]]);
|
|
4060
|
+
$$invalidate(5, allTypes = getEditableTypes(targetsToSearch));
|
|
4061
|
+
$$invalidate(18, hasDisplayedCustom = false);
|
|
4062
|
+
$$invalidate(4, allRules = getMatchedCSSRules(targetsToSearch));
|
|
3726
4063
|
|
|
3727
4064
|
for (let def of Object.values(customProps)) {
|
|
3728
4065
|
if (def.getter(el) !== null) {
|
|
3729
|
-
$$invalidate(
|
|
4066
|
+
$$invalidate(18, hasDisplayedCustom = true);
|
|
3730
4067
|
break;
|
|
3731
4068
|
}
|
|
3732
4069
|
}
|
|
@@ -3745,13 +4082,13 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3745
4082
|
}
|
|
3746
4083
|
|
|
3747
4084
|
function close() {
|
|
3748
|
-
$$invalidate(
|
|
3749
|
-
$$invalidate(
|
|
3750
|
-
$$invalidate(
|
|
4085
|
+
$$invalidate(11, self.style.display = "none", self);
|
|
4086
|
+
$$invalidate(12, helperElemWrapper.style.display = "none", helperElemWrapper);
|
|
4087
|
+
$$invalidate(13, pathWithHoles = "");
|
|
3751
4088
|
}
|
|
3752
4089
|
|
|
3753
4090
|
function isOpened() {
|
|
3754
|
-
return self.style.display ===
|
|
4091
|
+
return self.style.display === "block";
|
|
3755
4092
|
}
|
|
3756
4093
|
|
|
3757
4094
|
function overlayClicked() {
|
|
@@ -3759,8 +4096,8 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3759
4096
|
}
|
|
3760
4097
|
|
|
3761
4098
|
function show(x, y) {
|
|
3762
|
-
$$invalidate(
|
|
3763
|
-
$$invalidate(
|
|
4099
|
+
$$invalidate(11, self.style.display = "block", self);
|
|
4100
|
+
$$invalidate(11, self.style.opacity = 0, self);
|
|
3764
4101
|
const popupDimension = self.getBoundingClientRect();
|
|
3765
4102
|
|
|
3766
4103
|
x = x + popupDimension.width + 20 > pageDimensions.width
|
|
@@ -3772,10 +4109,10 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3772
4109
|
: y + 20;
|
|
3773
4110
|
|
|
3774
4111
|
y = Math.max(y, 0);
|
|
3775
|
-
$$invalidate(
|
|
3776
|
-
$$invalidate(
|
|
3777
|
-
$$invalidate(
|
|
3778
|
-
$$invalidate(
|
|
4112
|
+
$$invalidate(11, self.style.left = x + "px", self);
|
|
4113
|
+
$$invalidate(11, self.style.top = y + "px", self);
|
|
4114
|
+
$$invalidate(12, helperElemWrapper.style.display = "block", helperElemWrapper);
|
|
4115
|
+
$$invalidate(11, self.style.opacity = 1, self);
|
|
3779
4116
|
updateHelpers();
|
|
3780
4117
|
}
|
|
3781
4118
|
|
|
@@ -3784,19 +4121,19 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3784
4121
|
if (!currentRule) return;
|
|
3785
4122
|
let matching;
|
|
3786
4123
|
|
|
3787
|
-
if (currentRule ===
|
|
3788
|
-
const selector = currentRule.selectorText.replace(/(:hover)|:focus/g,
|
|
4124
|
+
if (currentRule === "inline") matching = [currentElement]; else {
|
|
4125
|
+
const selector = currentRule.selectorText.replace(/(:hover)|:focus/g, "");
|
|
3789
4126
|
matching = Array.from(document.querySelectorAll(selector));
|
|
3790
4127
|
}
|
|
3791
4128
|
|
|
3792
4129
|
const boundingBoxes = matching.map(el => getBoundingBoxInfos(el, 10));
|
|
3793
|
-
$$invalidate(
|
|
4130
|
+
$$invalidate(13, pathWithHoles = computeContours(boundingBoxes, pageDimensions));
|
|
3794
4131
|
}
|
|
3795
4132
|
|
|
3796
4133
|
function _updateProp(propName, val, suffix) {
|
|
3797
4134
|
const finalValue = suffix ? val + suffix : val;
|
|
3798
4135
|
|
|
3799
|
-
if (currentRule ===
|
|
4136
|
+
if (currentRule === "inline") {
|
|
3800
4137
|
if (allCurrentPropDefs[propName].setter) {
|
|
3801
4138
|
allCurrentPropDefs[propName].setter(currentElement, val);
|
|
3802
4139
|
} else {
|
|
@@ -3805,8 +4142,8 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3805
4142
|
}
|
|
3806
4143
|
} else currentRule.style.setProperty(propName, finalValue);
|
|
3807
4144
|
|
|
3808
|
-
$$invalidate(
|
|
3809
|
-
$$invalidate(
|
|
4145
|
+
$$invalidate(16, allCurrentPropDefs[propName].value = val, allCurrentPropDefs);
|
|
4146
|
+
$$invalidate(16, allCurrentPropDefs[propName].displayed = finalValue, allCurrentPropDefs);
|
|
3810
4147
|
onStyleChanged(currentElement, currentRule, propName, finalValue);
|
|
3811
4148
|
updateHelpers();
|
|
3812
4149
|
}
|
|
@@ -3820,7 +4157,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3820
4157
|
const marginTop = parseInt(bodyStyle.marginTop);
|
|
3821
4158
|
const marginBottom = parseInt(bodyStyle.marginBottom);
|
|
3822
4159
|
|
|
3823
|
-
$$invalidate(
|
|
4160
|
+
$$invalidate(14, pageDimensions = {
|
|
3824
4161
|
width: document.body.offsetWidth + marginLeft + marginRight,
|
|
3825
4162
|
height: document.body.offsetHeight + marginTop + marginBottom
|
|
3826
4163
|
});
|
|
@@ -3838,9 +4175,9 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3838
4175
|
}
|
|
3839
4176
|
|
|
3840
4177
|
function bringToFront() {
|
|
3841
|
-
$$invalidate(
|
|
4178
|
+
$$invalidate(17, bringableToFront[selectedElemIndex] = false, bringableToFront);
|
|
3842
4179
|
currentElement.parentNode.appendChild(currentElement);
|
|
3843
|
-
onStyleChanged(currentElement, currentRule,
|
|
4180
|
+
onStyleChanged(currentElement, currentRule, "bringtofront", null);
|
|
3844
4181
|
}
|
|
3845
4182
|
|
|
3846
4183
|
function deleteElem() {
|
|
@@ -3849,7 +4186,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3849
4186
|
}
|
|
3850
4187
|
|
|
3851
4188
|
function deleteProp(propName) {
|
|
3852
|
-
if (currentRule ===
|
|
4189
|
+
if (currentRule === "inline") {
|
|
3853
4190
|
currentElement.style.removeProperty(propName);
|
|
3854
4191
|
} else {
|
|
3855
4192
|
currentRule.style.removeProperty(propName);
|
|
@@ -3860,70 +4197,74 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3860
4197
|
}
|
|
3861
4198
|
|
|
3862
4199
|
function selectRule(ruleIndex) {
|
|
4200
|
+
console.log("selectrule", ruleIndex);
|
|
3863
4201
|
const newRule = allRules[selectedElemIndex]?.[ruleIndex];
|
|
3864
4202
|
|
|
3865
|
-
if (newRule !==
|
|
3866
|
-
$$invalidate(
|
|
4203
|
+
if (newRule !== "inline" && selectedTypeIndex === allTypes[selectedElemIndex].length - 1) {
|
|
4204
|
+
$$invalidate(8, selectedTypeIndex = 0);
|
|
3867
4205
|
}
|
|
3868
4206
|
|
|
3869
|
-
$$invalidate(
|
|
4207
|
+
$$invalidate(7, selectedRuleIndex = ruleIndex);
|
|
3870
4208
|
}
|
|
3871
4209
|
|
|
3872
4210
|
function div0_binding($$value) {
|
|
3873
4211
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
3874
4212
|
positionAnchor = $$value;
|
|
3875
|
-
$$invalidate(
|
|
4213
|
+
$$invalidate(10, positionAnchor);
|
|
3876
4214
|
});
|
|
3877
4215
|
}
|
|
3878
4216
|
|
|
3879
4217
|
function svg_binding($$value) {
|
|
3880
4218
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
3881
4219
|
helperElemWrapper = $$value;
|
|
3882
|
-
$$invalidate(
|
|
4220
|
+
$$invalidate(12, helperElemWrapper);
|
|
3883
4221
|
});
|
|
3884
4222
|
}
|
|
3885
4223
|
|
|
3886
4224
|
const click_handler = elemIndex => {
|
|
3887
|
-
$$invalidate(
|
|
3888
|
-
$$invalidate(
|
|
4225
|
+
$$invalidate(6, selectedElemIndex = elemIndex);
|
|
4226
|
+
$$invalidate(7, selectedRuleIndex = 0);
|
|
3889
4227
|
};
|
|
3890
4228
|
|
|
4229
|
+
const change_handler = e => selectRule(e.target.value);
|
|
4230
|
+
|
|
3891
4231
|
const click_handler_1 = ruleIndex => {
|
|
3892
4232
|
selectRule(ruleIndex);
|
|
3893
4233
|
};
|
|
3894
4234
|
|
|
3895
4235
|
const click_handler_2 = typeIndex => {
|
|
3896
|
-
$$invalidate(
|
|
4236
|
+
$$invalidate(8, selectedTypeIndex = typeIndex);
|
|
3897
4237
|
};
|
|
3898
4238
|
|
|
3899
|
-
const
|
|
3900
|
-
$$invalidate(
|
|
4239
|
+
const change_handler_1 = async (choices, each_value, choices_index, e) => {
|
|
4240
|
+
$$invalidate(15, each_value[choices_index].selected = e.target.value, propsByType);
|
|
3901
4241
|
await tick();
|
|
3902
4242
|
};
|
|
3903
4243
|
|
|
3904
4244
|
const click_handler_3 = selectedName => deleteProp(selectedName);
|
|
3905
|
-
const
|
|
3906
|
-
const
|
|
4245
|
+
const change_handler_2 = (selectedName, e) => updateProp(selectedName, e.target.value, allCurrentPropDefs[selectedName].suffix, e.target);
|
|
4246
|
+
const change_handler_3 = (selectedName, e) => updateProp(selectedName, e.target.value);
|
|
3907
4247
|
const func = (selectedName, color) => updateProp(selectedName, color);
|
|
3908
4248
|
|
|
3909
4249
|
function div4_binding($$value) {
|
|
3910
4250
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
3911
4251
|
self = $$value;
|
|
3912
|
-
$$invalidate(
|
|
4252
|
+
$$invalidate(11, self);
|
|
3913
4253
|
});
|
|
3914
4254
|
}
|
|
3915
4255
|
|
|
3916
4256
|
$$self.$$set = $$props => {
|
|
3917
|
-
if ('getElems' in $$props) $$invalidate(
|
|
3918
|
-
if ('listenOnClick' in $$props) $$invalidate(
|
|
3919
|
-
if ('onStyleChanged' in $$props) $$invalidate(
|
|
3920
|
-
if ('customProps' in $$props) $$invalidate(
|
|
4257
|
+
if ('getElems' in $$props) $$invalidate(28, getElems = $$props.getElems);
|
|
4258
|
+
if ('listenOnClick' in $$props) $$invalidate(29, listenOnClick = $$props.listenOnClick);
|
|
4259
|
+
if ('onStyleChanged' in $$props) $$invalidate(30, onStyleChanged = $$props.onStyleChanged);
|
|
4260
|
+
if ('customProps' in $$props) $$invalidate(31, customProps = $$props.customProps);
|
|
3921
4261
|
if ('inlineDeletable' in $$props) $$invalidate(0, inlineDeletable = $$props.inlineDeletable);
|
|
3922
|
-
if ('cssRuleFilter' in $$props) $$invalidate(
|
|
4262
|
+
if ('cssRuleFilter' in $$props) $$invalidate(32, cssRuleFilter = $$props.cssRuleFilter);
|
|
4263
|
+
if ('getCssRuleName' in $$props) $$invalidate(1, getCssRuleName = $$props.getCssRuleName);
|
|
3923
4264
|
};
|
|
3924
4265
|
|
|
3925
4266
|
$$self.$$.update = () => {
|
|
3926
|
-
if ($$self.$$.dirty[1] & /*elementToListen*/
|
|
4267
|
+
if ($$self.$$.dirty[1] & /*elementToListen*/ 16) {
|
|
3927
4268
|
{
|
|
3928
4269
|
if (elementToListen !== null) {
|
|
3929
4270
|
init();
|
|
@@ -3931,23 +4272,23 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3931
4272
|
}
|
|
3932
4273
|
}
|
|
3933
4274
|
|
|
3934
|
-
if ($$self.$$.dirty[0] & /*targetsToSearch, selectedElemIndex*/
|
|
3935
|
-
$$invalidate(
|
|
4275
|
+
if ($$self.$$.dirty[0] & /*targetsToSearch, selectedElemIndex*/ 72) {
|
|
4276
|
+
$$invalidate(20, currentElement = targetsToSearch[selectedElemIndex][0]);
|
|
3936
4277
|
}
|
|
3937
4278
|
|
|
3938
|
-
if ($$self.$$.dirty[0] & /*allRules, selectedElemIndex, selectedRuleIndex*/
|
|
3939
|
-
$$invalidate(
|
|
4279
|
+
if ($$self.$$.dirty[0] & /*allRules, selectedElemIndex, selectedRuleIndex*/ 208) {
|
|
4280
|
+
$$invalidate(19, currentRule = allRules[selectedElemIndex]?.[selectedRuleIndex]);
|
|
3940
4281
|
}
|
|
3941
4282
|
|
|
3942
|
-
if ($$self.$$.dirty[0] & /*allTypes, selectedElemIndex, selectedTypeIndex*/
|
|
4283
|
+
if ($$self.$$.dirty[0] & /*allTypes, selectedElemIndex, selectedTypeIndex*/ 352 | $$self.$$.dirty[1] & /*curType*/ 32) {
|
|
3943
4284
|
{
|
|
3944
4285
|
if (allTypes[selectedElemIndex]?.[selectedTypeIndex] !== curType) {
|
|
3945
|
-
$$invalidate(
|
|
4286
|
+
$$invalidate(36, curType = allTypes[selectedElemIndex]?.[selectedTypeIndex]);
|
|
3946
4287
|
}
|
|
3947
4288
|
}
|
|
3948
4289
|
}
|
|
3949
4290
|
|
|
3950
|
-
if ($$self.$$.dirty[0] & /*selectedRuleIndex, selectedElemIndex*/
|
|
4291
|
+
if ($$self.$$.dirty[0] & /*selectedRuleIndex, selectedElemIndex*/ 192 | $$self.$$.dirty[1] & /*curType*/ 32) {
|
|
3951
4292
|
{
|
|
3952
4293
|
if (curType || selectedRuleIndex || selectedElemIndex) {
|
|
3953
4294
|
initAndGroup();
|
|
@@ -3958,6 +4299,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3958
4299
|
|
|
3959
4300
|
return [
|
|
3960
4301
|
inlineDeletable,
|
|
4302
|
+
getCssRuleName,
|
|
3961
4303
|
close,
|
|
3962
4304
|
targetsToSearch,
|
|
3963
4305
|
allRules,
|
|
@@ -3965,6 +4307,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3965
4307
|
selectedElemIndex,
|
|
3966
4308
|
selectedRuleIndex,
|
|
3967
4309
|
selectedTypeIndex,
|
|
4310
|
+
clickedElement,
|
|
3968
4311
|
positionAnchor,
|
|
3969
4312
|
self,
|
|
3970
4313
|
helperElemWrapper,
|
|
@@ -3976,6 +4319,7 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3976
4319
|
hasDisplayedCustom,
|
|
3977
4320
|
currentRule,
|
|
3978
4321
|
currentElement,
|
|
4322
|
+
getRuleNamesTransformed,
|
|
3979
4323
|
overlayClicked,
|
|
3980
4324
|
updateProp,
|
|
3981
4325
|
bringToFront,
|
|
@@ -3994,18 +4338,19 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
3994
4338
|
div0_binding,
|
|
3995
4339
|
svg_binding,
|
|
3996
4340
|
click_handler,
|
|
4341
|
+
change_handler,
|
|
3997
4342
|
click_handler_1,
|
|
3998
4343
|
click_handler_2,
|
|
3999
|
-
change_handler,
|
|
4000
|
-
click_handler_3,
|
|
4001
4344
|
change_handler_1,
|
|
4345
|
+
click_handler_3,
|
|
4002
4346
|
change_handler_2,
|
|
4347
|
+
change_handler_3,
|
|
4003
4348
|
func,
|
|
4004
4349
|
div4_binding
|
|
4005
4350
|
];
|
|
4006
4351
|
}
|
|
4007
4352
|
|
|
4008
|
-
|
|
4353
|
+
let InlineStyleEditor$1 = class InlineStyleEditor extends SvelteComponent {
|
|
4009
4354
|
constructor(options) {
|
|
4010
4355
|
super();
|
|
4011
4356
|
|
|
@@ -4016,15 +4361,16 @@ class InlineStyleEditor$1 extends SvelteComponent {
|
|
|
4016
4361
|
create_fragment,
|
|
4017
4362
|
safe_not_equal,
|
|
4018
4363
|
{
|
|
4019
|
-
getElems:
|
|
4020
|
-
listenOnClick:
|
|
4021
|
-
onStyleChanged:
|
|
4022
|
-
customProps:
|
|
4364
|
+
getElems: 28,
|
|
4365
|
+
listenOnClick: 29,
|
|
4366
|
+
onStyleChanged: 30,
|
|
4367
|
+
customProps: 31,
|
|
4023
4368
|
inlineDeletable: 0,
|
|
4024
|
-
cssRuleFilter:
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4369
|
+
cssRuleFilter: 32,
|
|
4370
|
+
getCssRuleName: 1,
|
|
4371
|
+
open: 33,
|
|
4372
|
+
close: 2,
|
|
4373
|
+
isOpened: 34
|
|
4028
4374
|
},
|
|
4029
4375
|
null,
|
|
4030
4376
|
[-1, -1, -1]
|
|
@@ -4032,24 +4378,23 @@ class InlineStyleEditor$1 extends SvelteComponent {
|
|
|
4032
4378
|
}
|
|
4033
4379
|
|
|
4034
4380
|
get open() {
|
|
4035
|
-
return this.$$.ctx[
|
|
4381
|
+
return this.$$.ctx[33];
|
|
4036
4382
|
}
|
|
4037
4383
|
|
|
4038
4384
|
get close() {
|
|
4039
|
-
return this.$$.ctx[
|
|
4385
|
+
return this.$$.ctx[2];
|
|
4040
4386
|
}
|
|
4041
4387
|
|
|
4042
4388
|
get isOpened() {
|
|
4043
|
-
return this.$$.ctx[
|
|
4389
|
+
return this.$$.ctx[34];
|
|
4044
4390
|
}
|
|
4045
|
-
}
|
|
4046
|
-
|
|
4047
|
-
var StyleEditor = InlineStyleEditor$1;
|
|
4391
|
+
};
|
|
4048
4392
|
|
|
4049
4393
|
class InlineStyleEditor {
|
|
4050
4394
|
constructor(options) {
|
|
4051
|
-
return new
|
|
4395
|
+
return new InlineStyleEditor$1({target: document.body, props: options});
|
|
4052
4396
|
}
|
|
4053
4397
|
}
|
|
4054
4398
|
|
|
4055
4399
|
export { InlineStyleEditor as default };
|
|
4400
|
+
//# sourceMappingURL=inline-style-editor.mjs.map
|