@netless/fastboard-ui 0.3.21 → 0.3.22-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/full.d.ts +178 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +668 -464
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +668 -464
- package/dist/index.mjs.map +1 -1
- package/dist/index.svelte.mjs +669 -461
- package/dist/index.svelte.mjs.map +1 -1
- package/dist/lite.d.ts +3 -1
- package/package.json +3 -3
- package/src/components/Fastboard/Fastboard.svelte +23 -1
- package/src/components/Toolbar/Toolbar.svelte +3 -1
- package/src/components/Toolbar/components/Contents.svelte +5 -4
- package/src/components/Toolbar/components/StrokeColor.svelte +12 -7
- package/src/components/Toolbar/components/TextColor.svelte +12 -7
- package/src/components/Toolbar/components/constants.ts +4 -2
- package/src/components/Toolbar/components/helper.ts +23 -1
- package/src/helpers/index.ts +33 -1
- package/src/typings.ts +4 -0
package/dist/index.mjs
CHANGED
|
@@ -358,10 +358,6 @@ function transition_out(block, local, detach2, callback) {
|
|
|
358
358
|
callback();
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
function destroy_block(block, lookup) {
|
|
362
|
-
block.d(1);
|
|
363
|
-
lookup.delete(block.key);
|
|
364
|
-
}
|
|
365
361
|
function outro_and_destroy_block(block, lookup) {
|
|
366
362
|
transition_out(block, 1, 1, () => {
|
|
367
363
|
lookup.delete(block.key);
|
|
@@ -7074,6 +7070,7 @@ var colors = {
|
|
|
7074
7070
|
"#B620E0": [182, 32, 224],
|
|
7075
7071
|
"#6D7278": [109, 114, 120]
|
|
7076
7072
|
};
|
|
7073
|
+
var default_colors = Object.values(colors);
|
|
7077
7074
|
var shapes = [
|
|
7078
7075
|
"rectangle",
|
|
7079
7076
|
"ellipse",
|
|
@@ -7131,7 +7128,6 @@ var i18n4 = {
|
|
|
7131
7128
|
laserPointer: "\u6FC0\u5149\u7B14"
|
|
7132
7129
|
}
|
|
7133
7130
|
};
|
|
7134
|
-
var colorKeys = Object.keys(colors);
|
|
7135
7131
|
|
|
7136
7132
|
// src/actions/scroll.ts
|
|
7137
7133
|
var scrollTop = function(node, value) {
|
|
@@ -7254,6 +7250,20 @@ function tooltip(text2, hotkey) {
|
|
|
7254
7250
|
append(outer, hotkey_span);
|
|
7255
7251
|
return outer;
|
|
7256
7252
|
}
|
|
7253
|
+
function rgbToHex(r, g, b) {
|
|
7254
|
+
const hex = ((r << 16) + (g << 8) + b).toString(16).padStart(6, "0");
|
|
7255
|
+
return "#" + hex;
|
|
7256
|
+
}
|
|
7257
|
+
function hexToRgb(hex) {
|
|
7258
|
+
hex = hex.replace(/^#/, "");
|
|
7259
|
+
if (hex.length !== 6) {
|
|
7260
|
+
throw new Error("Invalid hex color");
|
|
7261
|
+
}
|
|
7262
|
+
const r = parseInt(hex.slice(0, 2), 16);
|
|
7263
|
+
const g = parseInt(hex.slice(2, 4), 16);
|
|
7264
|
+
const b = parseInt(hex.slice(4, 6), 16);
|
|
7265
|
+
return [r, g, b];
|
|
7266
|
+
}
|
|
7257
7267
|
|
|
7258
7268
|
// src/components/Toolbar/components/Slider.svelte
|
|
7259
7269
|
function create_fragment53(ctx) {
|
|
@@ -7669,70 +7679,93 @@ var StrokeWidth_default = StrokeWidth;
|
|
|
7669
7679
|
// src/components/Toolbar/components/StrokeColor.svelte
|
|
7670
7680
|
function get_each_context(ctx, list, i) {
|
|
7671
7681
|
const child_ctx = ctx.slice();
|
|
7672
|
-
child_ctx[
|
|
7682
|
+
child_ctx[8] = list[i];
|
|
7673
7683
|
return child_ctx;
|
|
7674
7684
|
}
|
|
7675
|
-
function create_each_block(
|
|
7685
|
+
function create_each_block(ctx) {
|
|
7676
7686
|
let button;
|
|
7677
7687
|
let span;
|
|
7678
7688
|
let t;
|
|
7679
7689
|
let button_class_value;
|
|
7690
|
+
let button_data_color_key_value;
|
|
7680
7691
|
return {
|
|
7681
|
-
key: key_1,
|
|
7682
|
-
first: null,
|
|
7683
7692
|
c() {
|
|
7684
7693
|
button = element("button");
|
|
7685
7694
|
span = element("span");
|
|
7686
7695
|
t = space();
|
|
7687
7696
|
attr(span, "class", "fastboard-toolbar-color-item");
|
|
7688
|
-
set_style(
|
|
7689
|
-
|
|
7690
|
-
|
|
7691
|
-
/*
|
|
7692
|
-
ctx[
|
|
7693
|
-
|
|
7697
|
+
set_style(span, "background-color", rgbToHex(
|
|
7698
|
+
/*color*/
|
|
7699
|
+
ctx[8][0],
|
|
7700
|
+
/*color*/
|
|
7701
|
+
ctx[8][1],
|
|
7702
|
+
/*color*/
|
|
7703
|
+
ctx[8][2]
|
|
7704
|
+
));
|
|
7694
7705
|
attr(button, "class", button_class_value = "fastboard-toolbar-btn fastboard-toolbar-color-btn " + /*theme*/
|
|
7695
7706
|
ctx[0]);
|
|
7696
|
-
attr(button, "data-color-key",
|
|
7697
|
-
|
|
7707
|
+
attr(button, "data-color-key", button_data_color_key_value = rgbToHex(
|
|
7708
|
+
/*color*/
|
|
7709
|
+
ctx[8][0],
|
|
7710
|
+
/*color*/
|
|
7711
|
+
ctx[8][1],
|
|
7712
|
+
/*color*/
|
|
7713
|
+
ctx[8][2]
|
|
7714
|
+
));
|
|
7698
7715
|
button.disabled = /*disabled*/
|
|
7699
7716
|
ctx[1];
|
|
7700
7717
|
toggle_class(button, "is-active", is_equal_color(
|
|
7701
7718
|
/*strokeColor*/
|
|
7702
|
-
ctx[
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
ctx[7]
|
|
7706
|
-
]
|
|
7719
|
+
ctx[3],
|
|
7720
|
+
/*color*/
|
|
7721
|
+
ctx[8]
|
|
7707
7722
|
));
|
|
7708
|
-
this.first = button;
|
|
7709
7723
|
},
|
|
7710
7724
|
m(target, anchor) {
|
|
7711
7725
|
insert(target, button, anchor);
|
|
7712
7726
|
append(button, span);
|
|
7713
7727
|
append(button, t);
|
|
7714
7728
|
},
|
|
7715
|
-
p(
|
|
7716
|
-
|
|
7729
|
+
p(ctx2, dirty) {
|
|
7730
|
+
if (dirty & /*colors*/
|
|
7731
|
+
4) {
|
|
7732
|
+
set_style(span, "background-color", rgbToHex(
|
|
7733
|
+
/*color*/
|
|
7734
|
+
ctx2[8][0],
|
|
7735
|
+
/*color*/
|
|
7736
|
+
ctx2[8][1],
|
|
7737
|
+
/*color*/
|
|
7738
|
+
ctx2[8][2]
|
|
7739
|
+
));
|
|
7740
|
+
}
|
|
7717
7741
|
if (dirty & /*theme*/
|
|
7718
7742
|
1 && button_class_value !== (button_class_value = "fastboard-toolbar-btn fastboard-toolbar-color-btn " + /*theme*/
|
|
7719
|
-
|
|
7743
|
+
ctx2[0])) {
|
|
7720
7744
|
attr(button, "class", button_class_value);
|
|
7721
7745
|
}
|
|
7746
|
+
if (dirty & /*colors*/
|
|
7747
|
+
4 && button_data_color_key_value !== (button_data_color_key_value = rgbToHex(
|
|
7748
|
+
/*color*/
|
|
7749
|
+
ctx2[8][0],
|
|
7750
|
+
/*color*/
|
|
7751
|
+
ctx2[8][1],
|
|
7752
|
+
/*color*/
|
|
7753
|
+
ctx2[8][2]
|
|
7754
|
+
))) {
|
|
7755
|
+
attr(button, "data-color-key", button_data_color_key_value);
|
|
7756
|
+
}
|
|
7722
7757
|
if (dirty & /*disabled*/
|
|
7723
7758
|
2) {
|
|
7724
7759
|
button.disabled = /*disabled*/
|
|
7725
|
-
|
|
7760
|
+
ctx2[1];
|
|
7726
7761
|
}
|
|
7727
|
-
if (dirty & /*theme, is_equal_color, strokeColor, colors
|
|
7728
|
-
|
|
7762
|
+
if (dirty & /*theme, is_equal_color, strokeColor, colors*/
|
|
7763
|
+
13) {
|
|
7729
7764
|
toggle_class(button, "is-active", is_equal_color(
|
|
7730
7765
|
/*strokeColor*/
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
ctx[7]
|
|
7735
|
-
]
|
|
7766
|
+
ctx2[3],
|
|
7767
|
+
/*color*/
|
|
7768
|
+
ctx2[8]
|
|
7736
7769
|
));
|
|
7737
7770
|
}
|
|
7738
7771
|
},
|
|
@@ -7744,20 +7777,16 @@ function create_each_block(key_1, ctx) {
|
|
|
7744
7777
|
}
|
|
7745
7778
|
function create_fragment55(ctx) {
|
|
7746
7779
|
let div;
|
|
7747
|
-
let each_blocks = [];
|
|
7748
|
-
let each_1_lookup = /* @__PURE__ */ new Map();
|
|
7749
7780
|
let div_class_value;
|
|
7750
7781
|
let mounted;
|
|
7751
7782
|
let dispose;
|
|
7752
|
-
let each_value =
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
ctx2[7]
|
|
7783
|
+
let each_value = (
|
|
7784
|
+
/*colors*/
|
|
7785
|
+
ctx[2]
|
|
7756
7786
|
);
|
|
7787
|
+
let each_blocks = [];
|
|
7757
7788
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
7758
|
-
|
|
7759
|
-
let key = get_key(child_ctx);
|
|
7760
|
-
each_1_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx));
|
|
7789
|
+
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
7761
7790
|
}
|
|
7762
7791
|
return {
|
|
7763
7792
|
c() {
|
|
@@ -7780,16 +7809,31 @@ function create_fragment55(ctx) {
|
|
|
7780
7809
|
div,
|
|
7781
7810
|
"click",
|
|
7782
7811
|
/*set_stroke_color*/
|
|
7783
|
-
ctx[
|
|
7812
|
+
ctx[5]
|
|
7784
7813
|
);
|
|
7785
7814
|
mounted = true;
|
|
7786
7815
|
}
|
|
7787
7816
|
},
|
|
7788
7817
|
p(ctx2, [dirty]) {
|
|
7789
|
-
if (dirty & /*theme,
|
|
7790
|
-
|
|
7791
|
-
each_value =
|
|
7792
|
-
|
|
7818
|
+
if (dirty & /*theme, rgbToHex, colors, disabled, is_equal_color, strokeColor*/
|
|
7819
|
+
15) {
|
|
7820
|
+
each_value = /*colors*/
|
|
7821
|
+
ctx2[2];
|
|
7822
|
+
let i;
|
|
7823
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
7824
|
+
const child_ctx = get_each_context(ctx2, each_value, i);
|
|
7825
|
+
if (each_blocks[i]) {
|
|
7826
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
7827
|
+
} else {
|
|
7828
|
+
each_blocks[i] = create_each_block(child_ctx);
|
|
7829
|
+
each_blocks[i].c();
|
|
7830
|
+
each_blocks[i].m(div, null);
|
|
7831
|
+
}
|
|
7832
|
+
}
|
|
7833
|
+
for (; i < each_blocks.length; i += 1) {
|
|
7834
|
+
each_blocks[i].d(1);
|
|
7835
|
+
}
|
|
7836
|
+
each_blocks.length = each_value.length;
|
|
7793
7837
|
}
|
|
7794
7838
|
if (dirty & /*theme*/
|
|
7795
7839
|
1 && div_class_value !== (div_class_value = "fastboard-toolbar-colors " + /*theme*/
|
|
@@ -7802,9 +7846,7 @@ function create_fragment55(ctx) {
|
|
|
7802
7846
|
d(detaching) {
|
|
7803
7847
|
if (detaching)
|
|
7804
7848
|
detach(div);
|
|
7805
|
-
|
|
7806
|
-
each_blocks[i].d();
|
|
7807
|
-
}
|
|
7849
|
+
destroy_each(each_blocks, detaching);
|
|
7808
7850
|
mounted = false;
|
|
7809
7851
|
dispose();
|
|
7810
7852
|
}
|
|
@@ -7816,44 +7858,56 @@ function is_equal_color(a, b) {
|
|
|
7816
7858
|
function instance55($$self, $$props, $$invalidate) {
|
|
7817
7859
|
let memberState;
|
|
7818
7860
|
let strokeColor;
|
|
7819
|
-
let $memberState, $$unsubscribe_memberState = noop, $$subscribe_memberState = () => ($$unsubscribe_memberState(), $$unsubscribe_memberState = subscribe(memberState, ($$value) => $$invalidate(
|
|
7861
|
+
let $memberState, $$unsubscribe_memberState = noop, $$subscribe_memberState = () => ($$unsubscribe_memberState(), $$unsubscribe_memberState = subscribe(memberState, ($$value) => $$invalidate(7, $memberState = $$value)), memberState);
|
|
7820
7862
|
$$self.$$.on_destroy.push(() => $$unsubscribe_memberState());
|
|
7821
7863
|
let { app = null } = $$props;
|
|
7822
7864
|
let { theme = "light" } = $$props;
|
|
7823
7865
|
let { disabled = false } = $$props;
|
|
7866
|
+
let { colors: colors2 = default_colors } = $$props;
|
|
7824
7867
|
function set_stroke_color(ev) {
|
|
7825
7868
|
let button = ev.target;
|
|
7826
7869
|
if (button && button.dataset.colorKey) {
|
|
7827
|
-
let color =
|
|
7870
|
+
let color = button.dataset.colorKey;
|
|
7828
7871
|
if (color && app) {
|
|
7829
|
-
app.setStrokeColor(color);
|
|
7872
|
+
app.setStrokeColor(hexToRgb(color));
|
|
7830
7873
|
}
|
|
7831
7874
|
}
|
|
7832
7875
|
}
|
|
7833
7876
|
$$self.$$set = ($$props2) => {
|
|
7834
7877
|
if ("app" in $$props2)
|
|
7835
|
-
$$invalidate(
|
|
7878
|
+
$$invalidate(6, app = $$props2.app);
|
|
7836
7879
|
if ("theme" in $$props2)
|
|
7837
7880
|
$$invalidate(0, theme = $$props2.theme);
|
|
7838
7881
|
if ("disabled" in $$props2)
|
|
7839
7882
|
$$invalidate(1, disabled = $$props2.disabled);
|
|
7883
|
+
if ("colors" in $$props2)
|
|
7884
|
+
$$invalidate(2, colors2 = $$props2.colors);
|
|
7840
7885
|
};
|
|
7841
7886
|
$$self.$$.update = () => {
|
|
7842
7887
|
if ($$self.$$.dirty & /*app*/
|
|
7843
|
-
|
|
7844
|
-
$$subscribe_memberState($$invalidate(
|
|
7888
|
+
64) {
|
|
7889
|
+
$$subscribe_memberState($$invalidate(4, memberState = app == null ? void 0 : app.memberState));
|
|
7845
7890
|
}
|
|
7846
7891
|
if ($$self.$$.dirty & /*$memberState*/
|
|
7847
|
-
|
|
7848
|
-
$$invalidate(
|
|
7892
|
+
128) {
|
|
7893
|
+
$$invalidate(3, strokeColor = $memberState == null ? void 0 : $memberState.strokeColor);
|
|
7849
7894
|
}
|
|
7850
7895
|
};
|
|
7851
|
-
return [
|
|
7896
|
+
return [
|
|
7897
|
+
theme,
|
|
7898
|
+
disabled,
|
|
7899
|
+
colors2,
|
|
7900
|
+
strokeColor,
|
|
7901
|
+
memberState,
|
|
7902
|
+
set_stroke_color,
|
|
7903
|
+
app,
|
|
7904
|
+
$memberState
|
|
7905
|
+
];
|
|
7852
7906
|
}
|
|
7853
7907
|
var StrokeColor = class extends SvelteComponent {
|
|
7854
7908
|
constructor(options) {
|
|
7855
7909
|
super();
|
|
7856
|
-
init(this, options, instance55, create_fragment55, safe_not_equal, { app:
|
|
7910
|
+
init(this, options, instance55, create_fragment55, safe_not_equal, { app: 6, theme: 0, disabled: 1, colors: 2 });
|
|
7857
7911
|
}
|
|
7858
7912
|
};
|
|
7859
7913
|
var StrokeColor_default = StrokeColor;
|
|
@@ -7861,70 +7915,93 @@ var StrokeColor_default = StrokeColor;
|
|
|
7861
7915
|
// src/components/Toolbar/components/TextColor.svelte
|
|
7862
7916
|
function get_each_context2(ctx, list, i) {
|
|
7863
7917
|
const child_ctx = ctx.slice();
|
|
7864
|
-
child_ctx[
|
|
7918
|
+
child_ctx[8] = list[i];
|
|
7865
7919
|
return child_ctx;
|
|
7866
7920
|
}
|
|
7867
|
-
function create_each_block2(
|
|
7921
|
+
function create_each_block2(ctx) {
|
|
7868
7922
|
let button;
|
|
7869
7923
|
let span;
|
|
7870
7924
|
let t;
|
|
7871
7925
|
let button_class_value;
|
|
7926
|
+
let button_data_color_key_value;
|
|
7872
7927
|
return {
|
|
7873
|
-
key: key_1,
|
|
7874
|
-
first: null,
|
|
7875
7928
|
c() {
|
|
7876
7929
|
button = element("button");
|
|
7877
7930
|
span = element("span");
|
|
7878
7931
|
t = space();
|
|
7879
7932
|
attr(span, "class", "fastboard-toolbar-color-item");
|
|
7880
|
-
set_style(
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
/*
|
|
7884
|
-
ctx[
|
|
7885
|
-
|
|
7933
|
+
set_style(span, "background-color", rgbToHex(
|
|
7934
|
+
/*color*/
|
|
7935
|
+
ctx[8][0],
|
|
7936
|
+
/*color*/
|
|
7937
|
+
ctx[8][1],
|
|
7938
|
+
/*color*/
|
|
7939
|
+
ctx[8][2]
|
|
7940
|
+
));
|
|
7886
7941
|
attr(button, "class", button_class_value = "fastboard-toolbar-btn fastboard-toolbar-color-btn " + /*theme*/
|
|
7887
7942
|
ctx[0]);
|
|
7888
|
-
attr(button, "data-color-key",
|
|
7889
|
-
|
|
7943
|
+
attr(button, "data-color-key", button_data_color_key_value = rgbToHex(
|
|
7944
|
+
/*color*/
|
|
7945
|
+
ctx[8][0],
|
|
7946
|
+
/*color*/
|
|
7947
|
+
ctx[8][1],
|
|
7948
|
+
/*color*/
|
|
7949
|
+
ctx[8][2]
|
|
7950
|
+
));
|
|
7890
7951
|
button.disabled = /*disabled*/
|
|
7891
7952
|
ctx[1];
|
|
7892
7953
|
toggle_class(button, "is-active", is_equal_color2(
|
|
7893
7954
|
/*textColor*/
|
|
7894
|
-
ctx[
|
|
7895
|
-
|
|
7896
|
-
|
|
7897
|
-
ctx[7]
|
|
7898
|
-
]
|
|
7955
|
+
ctx[3],
|
|
7956
|
+
/*color*/
|
|
7957
|
+
ctx[8]
|
|
7899
7958
|
));
|
|
7900
|
-
this.first = button;
|
|
7901
7959
|
},
|
|
7902
7960
|
m(target, anchor) {
|
|
7903
7961
|
insert(target, button, anchor);
|
|
7904
7962
|
append(button, span);
|
|
7905
7963
|
append(button, t);
|
|
7906
7964
|
},
|
|
7907
|
-
p(
|
|
7908
|
-
|
|
7965
|
+
p(ctx2, dirty) {
|
|
7966
|
+
if (dirty & /*colors*/
|
|
7967
|
+
4) {
|
|
7968
|
+
set_style(span, "background-color", rgbToHex(
|
|
7969
|
+
/*color*/
|
|
7970
|
+
ctx2[8][0],
|
|
7971
|
+
/*color*/
|
|
7972
|
+
ctx2[8][1],
|
|
7973
|
+
/*color*/
|
|
7974
|
+
ctx2[8][2]
|
|
7975
|
+
));
|
|
7976
|
+
}
|
|
7909
7977
|
if (dirty & /*theme*/
|
|
7910
7978
|
1 && button_class_value !== (button_class_value = "fastboard-toolbar-btn fastboard-toolbar-color-btn " + /*theme*/
|
|
7911
|
-
|
|
7979
|
+
ctx2[0])) {
|
|
7912
7980
|
attr(button, "class", button_class_value);
|
|
7913
7981
|
}
|
|
7982
|
+
if (dirty & /*colors*/
|
|
7983
|
+
4 && button_data_color_key_value !== (button_data_color_key_value = rgbToHex(
|
|
7984
|
+
/*color*/
|
|
7985
|
+
ctx2[8][0],
|
|
7986
|
+
/*color*/
|
|
7987
|
+
ctx2[8][1],
|
|
7988
|
+
/*color*/
|
|
7989
|
+
ctx2[8][2]
|
|
7990
|
+
))) {
|
|
7991
|
+
attr(button, "data-color-key", button_data_color_key_value);
|
|
7992
|
+
}
|
|
7914
7993
|
if (dirty & /*disabled*/
|
|
7915
7994
|
2) {
|
|
7916
7995
|
button.disabled = /*disabled*/
|
|
7917
|
-
|
|
7996
|
+
ctx2[1];
|
|
7918
7997
|
}
|
|
7919
|
-
if (dirty & /*theme, is_equal_color, textColor, colors
|
|
7920
|
-
|
|
7998
|
+
if (dirty & /*theme, is_equal_color, textColor, colors*/
|
|
7999
|
+
13) {
|
|
7921
8000
|
toggle_class(button, "is-active", is_equal_color2(
|
|
7922
8001
|
/*textColor*/
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
ctx[7]
|
|
7927
|
-
]
|
|
8002
|
+
ctx2[3],
|
|
8003
|
+
/*color*/
|
|
8004
|
+
ctx2[8]
|
|
7928
8005
|
));
|
|
7929
8006
|
}
|
|
7930
8007
|
},
|
|
@@ -7936,20 +8013,16 @@ function create_each_block2(key_1, ctx) {
|
|
|
7936
8013
|
}
|
|
7937
8014
|
function create_fragment56(ctx) {
|
|
7938
8015
|
let div;
|
|
7939
|
-
let each_blocks = [];
|
|
7940
|
-
let each_1_lookup = /* @__PURE__ */ new Map();
|
|
7941
8016
|
let div_class_value;
|
|
7942
8017
|
let mounted;
|
|
7943
8018
|
let dispose;
|
|
7944
|
-
let each_value =
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
ctx2[7]
|
|
8019
|
+
let each_value = (
|
|
8020
|
+
/*colors*/
|
|
8021
|
+
ctx[2]
|
|
7948
8022
|
);
|
|
8023
|
+
let each_blocks = [];
|
|
7949
8024
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
7950
|
-
|
|
7951
|
-
let key = get_key(child_ctx);
|
|
7952
|
-
each_1_lookup.set(key, each_blocks[i] = create_each_block2(key, child_ctx));
|
|
8025
|
+
each_blocks[i] = create_each_block2(get_each_context2(ctx, each_value, i));
|
|
7953
8026
|
}
|
|
7954
8027
|
return {
|
|
7955
8028
|
c() {
|
|
@@ -7972,16 +8045,31 @@ function create_fragment56(ctx) {
|
|
|
7972
8045
|
div,
|
|
7973
8046
|
"click",
|
|
7974
8047
|
/*set_stroke_color*/
|
|
7975
|
-
ctx[
|
|
8048
|
+
ctx[5]
|
|
7976
8049
|
);
|
|
7977
8050
|
mounted = true;
|
|
7978
8051
|
}
|
|
7979
8052
|
},
|
|
7980
8053
|
p(ctx2, [dirty]) {
|
|
7981
|
-
if (dirty & /*theme,
|
|
7982
|
-
|
|
7983
|
-
each_value =
|
|
7984
|
-
|
|
8054
|
+
if (dirty & /*theme, rgbToHex, colors, disabled, is_equal_color, textColor*/
|
|
8055
|
+
15) {
|
|
8056
|
+
each_value = /*colors*/
|
|
8057
|
+
ctx2[2];
|
|
8058
|
+
let i;
|
|
8059
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
8060
|
+
const child_ctx = get_each_context2(ctx2, each_value, i);
|
|
8061
|
+
if (each_blocks[i]) {
|
|
8062
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
8063
|
+
} else {
|
|
8064
|
+
each_blocks[i] = create_each_block2(child_ctx);
|
|
8065
|
+
each_blocks[i].c();
|
|
8066
|
+
each_blocks[i].m(div, null);
|
|
8067
|
+
}
|
|
8068
|
+
}
|
|
8069
|
+
for (; i < each_blocks.length; i += 1) {
|
|
8070
|
+
each_blocks[i].d(1);
|
|
8071
|
+
}
|
|
8072
|
+
each_blocks.length = each_value.length;
|
|
7985
8073
|
}
|
|
7986
8074
|
if (dirty & /*theme*/
|
|
7987
8075
|
1 && div_class_value !== (div_class_value = "fastboard-toolbar-colors " + /*theme*/
|
|
@@ -7994,9 +8082,7 @@ function create_fragment56(ctx) {
|
|
|
7994
8082
|
d(detaching) {
|
|
7995
8083
|
if (detaching)
|
|
7996
8084
|
detach(div);
|
|
7997
|
-
|
|
7998
|
-
each_blocks[i].d();
|
|
7999
|
-
}
|
|
8085
|
+
destroy_each(each_blocks, detaching);
|
|
8000
8086
|
mounted = false;
|
|
8001
8087
|
dispose();
|
|
8002
8088
|
}
|
|
@@ -8008,44 +8094,56 @@ function is_equal_color2(a, b) {
|
|
|
8008
8094
|
function instance56($$self, $$props, $$invalidate) {
|
|
8009
8095
|
let memberState;
|
|
8010
8096
|
let textColor;
|
|
8011
|
-
let $memberState, $$unsubscribe_memberState = noop, $$subscribe_memberState = () => ($$unsubscribe_memberState(), $$unsubscribe_memberState = subscribe(memberState, ($$value) => $$invalidate(
|
|
8097
|
+
let $memberState, $$unsubscribe_memberState = noop, $$subscribe_memberState = () => ($$unsubscribe_memberState(), $$unsubscribe_memberState = subscribe(memberState, ($$value) => $$invalidate(7, $memberState = $$value)), memberState);
|
|
8012
8098
|
$$self.$$.on_destroy.push(() => $$unsubscribe_memberState());
|
|
8013
8099
|
let { app = null } = $$props;
|
|
8014
8100
|
let { theme = "light" } = $$props;
|
|
8015
8101
|
let { disabled = false } = $$props;
|
|
8102
|
+
let { colors: colors2 = default_colors } = $$props;
|
|
8016
8103
|
function set_stroke_color(ev) {
|
|
8017
8104
|
let button = ev.target;
|
|
8018
8105
|
if (button && button.dataset.colorKey) {
|
|
8019
|
-
let color =
|
|
8106
|
+
let color = button.dataset.colorKey;
|
|
8020
8107
|
if (color && app) {
|
|
8021
|
-
app.setTextColor(color);
|
|
8108
|
+
app.setTextColor(hexToRgb(color));
|
|
8022
8109
|
}
|
|
8023
8110
|
}
|
|
8024
8111
|
}
|
|
8025
8112
|
$$self.$$set = ($$props2) => {
|
|
8026
8113
|
if ("app" in $$props2)
|
|
8027
|
-
$$invalidate(
|
|
8114
|
+
$$invalidate(6, app = $$props2.app);
|
|
8028
8115
|
if ("theme" in $$props2)
|
|
8029
8116
|
$$invalidate(0, theme = $$props2.theme);
|
|
8030
8117
|
if ("disabled" in $$props2)
|
|
8031
8118
|
$$invalidate(1, disabled = $$props2.disabled);
|
|
8119
|
+
if ("colors" in $$props2)
|
|
8120
|
+
$$invalidate(2, colors2 = $$props2.colors);
|
|
8032
8121
|
};
|
|
8033
8122
|
$$self.$$.update = () => {
|
|
8034
8123
|
if ($$self.$$.dirty & /*app*/
|
|
8035
|
-
|
|
8036
|
-
$$subscribe_memberState($$invalidate(
|
|
8124
|
+
64) {
|
|
8125
|
+
$$subscribe_memberState($$invalidate(4, memberState = app == null ? void 0 : app.memberState));
|
|
8037
8126
|
}
|
|
8038
8127
|
if ($$self.$$.dirty & /*$memberState*/
|
|
8039
|
-
|
|
8040
|
-
$$invalidate(
|
|
8128
|
+
128) {
|
|
8129
|
+
$$invalidate(3, textColor = $memberState == null ? void 0 : $memberState.textColor);
|
|
8041
8130
|
}
|
|
8042
8131
|
};
|
|
8043
|
-
return [
|
|
8132
|
+
return [
|
|
8133
|
+
theme,
|
|
8134
|
+
disabled,
|
|
8135
|
+
colors2,
|
|
8136
|
+
textColor,
|
|
8137
|
+
memberState,
|
|
8138
|
+
set_stroke_color,
|
|
8139
|
+
app,
|
|
8140
|
+
$memberState
|
|
8141
|
+
];
|
|
8044
8142
|
}
|
|
8045
8143
|
var TextColor = class extends SvelteComponent {
|
|
8046
8144
|
constructor(options) {
|
|
8047
8145
|
super();
|
|
8048
|
-
init(this, options, instance56, create_fragment56, safe_not_equal, { app:
|
|
8146
|
+
init(this, options, instance56, create_fragment56, safe_not_equal, { app: 6, theme: 0, disabled: 1, colors: 2 });
|
|
8049
8147
|
}
|
|
8050
8148
|
};
|
|
8051
8149
|
var TextColor_default = TextColor;
|
|
@@ -10863,39 +10961,39 @@ var Laser_default2 = Laser2;
|
|
|
10863
10961
|
// src/components/Toolbar/components/Contents.svelte
|
|
10864
10962
|
function get_each_context4(ctx, list, i) {
|
|
10865
10963
|
const child_ctx = ctx.slice();
|
|
10866
|
-
child_ctx[
|
|
10964
|
+
child_ctx[44] = list[i];
|
|
10867
10965
|
const constants_0 = (
|
|
10868
10966
|
/*netless_app*/
|
|
10869
|
-
child_ctx[
|
|
10967
|
+
child_ctx[44]
|
|
10870
10968
|
);
|
|
10871
|
-
child_ctx[
|
|
10872
|
-
child_ctx[
|
|
10873
|
-
child_ctx[
|
|
10874
|
-
child_ctx[
|
|
10969
|
+
child_ctx[45] = constants_0.icon;
|
|
10970
|
+
child_ctx[46] = constants_0.label;
|
|
10971
|
+
child_ctx[47] = constants_0.kind;
|
|
10972
|
+
child_ctx[48] = constants_0.onClick;
|
|
10875
10973
|
const constants_1 = (
|
|
10876
10974
|
/*$status*/
|
|
10877
|
-
child_ctx[
|
|
10878
|
-
child_ctx[
|
|
10975
|
+
child_ctx[21] && /*$status*/
|
|
10976
|
+
child_ctx[21][
|
|
10879
10977
|
/*kind*/
|
|
10880
|
-
child_ctx[
|
|
10978
|
+
child_ctx[47]
|
|
10881
10979
|
]
|
|
10882
10980
|
);
|
|
10883
|
-
child_ctx[
|
|
10981
|
+
child_ctx[49] = constants_1;
|
|
10884
10982
|
const constants_2 = function func() {
|
|
10885
10983
|
return (
|
|
10886
10984
|
/*func*/
|
|
10887
|
-
ctx[
|
|
10985
|
+
ctx[40](
|
|
10888
10986
|
/*onClick*/
|
|
10889
|
-
child_ctx[
|
|
10987
|
+
child_ctx[48]
|
|
10890
10988
|
)
|
|
10891
10989
|
);
|
|
10892
10990
|
};
|
|
10893
|
-
child_ctx[
|
|
10991
|
+
child_ctx[50] = constants_2;
|
|
10894
10992
|
return child_ctx;
|
|
10895
10993
|
}
|
|
10896
10994
|
function get_each_context_1(ctx, list, i) {
|
|
10897
10995
|
const child_ctx = ctx.slice();
|
|
10898
|
-
child_ctx[
|
|
10996
|
+
child_ctx[53] = list[i];
|
|
10899
10997
|
return child_ctx;
|
|
10900
10998
|
}
|
|
10901
10999
|
function create_if_block_11(ctx) {
|
|
@@ -10904,7 +11002,7 @@ function create_if_block_11(ctx) {
|
|
|
10904
11002
|
const button_spread_levels = [
|
|
10905
11003
|
{ class: "scroll-up" },
|
|
10906
11004
|
/*btn_props*/
|
|
10907
|
-
ctx[
|
|
11005
|
+
ctx[15]
|
|
10908
11006
|
];
|
|
10909
11007
|
let button_props = {
|
|
10910
11008
|
$$slots: { default: [create_default_slot_24] },
|
|
@@ -10917,7 +11015,7 @@ function create_if_block_11(ctx) {
|
|
|
10917
11015
|
button.$on(
|
|
10918
11016
|
"click",
|
|
10919
11017
|
/*scroll_up*/
|
|
10920
|
-
ctx[
|
|
11018
|
+
ctx[23]
|
|
10921
11019
|
);
|
|
10922
11020
|
return {
|
|
10923
11021
|
c() {
|
|
@@ -10929,13 +11027,13 @@ function create_if_block_11(ctx) {
|
|
|
10929
11027
|
},
|
|
10930
11028
|
p(ctx2, dirty) {
|
|
10931
11029
|
const button_changes = dirty[0] & /*btn_props*/
|
|
10932
|
-
|
|
11030
|
+
32768 ? get_spread_update(button_spread_levels, [button_spread_levels[0], get_spread_object(
|
|
10933
11031
|
/*btn_props*/
|
|
10934
|
-
ctx2[
|
|
11032
|
+
ctx2[15]
|
|
10935
11033
|
)]) : {};
|
|
10936
11034
|
if (dirty[0] & /*theme*/
|
|
10937
11035
|
2 | dirty[1] & /*$$scope*/
|
|
10938
|
-
|
|
11036
|
+
33554432) {
|
|
10939
11037
|
button_changes.$$scope = { dirty, ctx: ctx2 };
|
|
10940
11038
|
}
|
|
10941
11039
|
button.$set(button_changes);
|
|
@@ -11000,7 +11098,7 @@ function create_if_block_10(ctx) {
|
|
|
11000
11098
|
props: {
|
|
11001
11099
|
appliance: (
|
|
11002
11100
|
/*appliance*/
|
|
11003
|
-
ctx[
|
|
11101
|
+
ctx[17]
|
|
11004
11102
|
),
|
|
11005
11103
|
theme: (
|
|
11006
11104
|
/*theme*/
|
|
@@ -11008,18 +11106,18 @@ function create_if_block_10(ctx) {
|
|
|
11008
11106
|
),
|
|
11009
11107
|
btn_props: (
|
|
11010
11108
|
/*btn_props*/
|
|
11011
|
-
ctx[
|
|
11109
|
+
ctx[15]
|
|
11012
11110
|
),
|
|
11013
11111
|
content: (
|
|
11014
11112
|
/*c*/
|
|
11015
|
-
ctx[
|
|
11113
|
+
ctx[19].laserPointer
|
|
11016
11114
|
)
|
|
11017
11115
|
}
|
|
11018
11116
|
});
|
|
11019
11117
|
laser.$on(
|
|
11020
11118
|
"click",
|
|
11021
11119
|
/*laserPointer*/
|
|
11022
|
-
ctx[
|
|
11120
|
+
ctx[31]
|
|
11023
11121
|
);
|
|
11024
11122
|
return {
|
|
11025
11123
|
c() {
|
|
@@ -11032,21 +11130,21 @@ function create_if_block_10(ctx) {
|
|
|
11032
11130
|
p(ctx2, dirty) {
|
|
11033
11131
|
const laser_changes = {};
|
|
11034
11132
|
if (dirty[0] & /*appliance*/
|
|
11035
|
-
|
|
11133
|
+
131072)
|
|
11036
11134
|
laser_changes.appliance = /*appliance*/
|
|
11037
|
-
ctx2[
|
|
11135
|
+
ctx2[17];
|
|
11038
11136
|
if (dirty[0] & /*theme*/
|
|
11039
11137
|
2)
|
|
11040
11138
|
laser_changes.theme = /*theme*/
|
|
11041
11139
|
ctx2[1];
|
|
11042
11140
|
if (dirty[0] & /*btn_props*/
|
|
11043
|
-
|
|
11141
|
+
32768)
|
|
11044
11142
|
laser_changes.btn_props = /*btn_props*/
|
|
11045
|
-
ctx2[
|
|
11143
|
+
ctx2[15];
|
|
11046
11144
|
if (dirty[0] & /*c*/
|
|
11047
|
-
|
|
11145
|
+
524288)
|
|
11048
11146
|
laser_changes.content = /*c*/
|
|
11049
|
-
ctx2[
|
|
11147
|
+
ctx2[19].laserPointer;
|
|
11050
11148
|
laser.$set(laser_changes);
|
|
11051
11149
|
},
|
|
11052
11150
|
i(local) {
|
|
@@ -11071,7 +11169,7 @@ function create_if_block_9(ctx) {
|
|
|
11071
11169
|
props: {
|
|
11072
11170
|
appliance: (
|
|
11073
11171
|
/*appliance*/
|
|
11074
|
-
ctx[
|
|
11172
|
+
ctx[17]
|
|
11075
11173
|
),
|
|
11076
11174
|
theme: (
|
|
11077
11175
|
/*theme*/
|
|
@@ -11079,18 +11177,18 @@ function create_if_block_9(ctx) {
|
|
|
11079
11177
|
),
|
|
11080
11178
|
btn_props: (
|
|
11081
11179
|
/*btn_props*/
|
|
11082
|
-
ctx[
|
|
11180
|
+
ctx[15]
|
|
11083
11181
|
),
|
|
11084
11182
|
content: (
|
|
11085
11183
|
/*c*/
|
|
11086
|
-
ctx[
|
|
11184
|
+
ctx[19].hand
|
|
11087
11185
|
)
|
|
11088
11186
|
}
|
|
11089
11187
|
});
|
|
11090
11188
|
hand_1.$on(
|
|
11091
11189
|
"click",
|
|
11092
11190
|
/*hand*/
|
|
11093
|
-
ctx[
|
|
11191
|
+
ctx[30]
|
|
11094
11192
|
);
|
|
11095
11193
|
return {
|
|
11096
11194
|
c() {
|
|
@@ -11103,21 +11201,21 @@ function create_if_block_9(ctx) {
|
|
|
11103
11201
|
p(ctx2, dirty) {
|
|
11104
11202
|
const hand_1_changes = {};
|
|
11105
11203
|
if (dirty[0] & /*appliance*/
|
|
11106
|
-
|
|
11204
|
+
131072)
|
|
11107
11205
|
hand_1_changes.appliance = /*appliance*/
|
|
11108
|
-
ctx2[
|
|
11206
|
+
ctx2[17];
|
|
11109
11207
|
if (dirty[0] & /*theme*/
|
|
11110
11208
|
2)
|
|
11111
11209
|
hand_1_changes.theme = /*theme*/
|
|
11112
11210
|
ctx2[1];
|
|
11113
11211
|
if (dirty[0] & /*btn_props*/
|
|
11114
|
-
|
|
11212
|
+
32768)
|
|
11115
11213
|
hand_1_changes.btn_props = /*btn_props*/
|
|
11116
|
-
ctx2[
|
|
11214
|
+
ctx2[15];
|
|
11117
11215
|
if (dirty[0] & /*c*/
|
|
11118
|
-
|
|
11216
|
+
524288)
|
|
11119
11217
|
hand_1_changes.content = /*c*/
|
|
11120
|
-
ctx2[
|
|
11218
|
+
ctx2[19].hand;
|
|
11121
11219
|
hand_1.$set(hand_1_changes);
|
|
11122
11220
|
},
|
|
11123
11221
|
i(local) {
|
|
@@ -11146,18 +11244,18 @@ function create_if_block_8(ctx) {
|
|
|
11146
11244
|
),
|
|
11147
11245
|
btn_props: (
|
|
11148
11246
|
/*btn_props*/
|
|
11149
|
-
ctx[
|
|
11247
|
+
ctx[15]
|
|
11150
11248
|
),
|
|
11151
11249
|
content: (
|
|
11152
11250
|
/*t*/
|
|
11153
|
-
ctx[
|
|
11251
|
+
ctx[10].clear
|
|
11154
11252
|
)
|
|
11155
11253
|
}
|
|
11156
11254
|
});
|
|
11157
11255
|
clear_1.$on(
|
|
11158
11256
|
"click",
|
|
11159
11257
|
/*clear*/
|
|
11160
|
-
ctx[
|
|
11258
|
+
ctx[32]
|
|
11161
11259
|
);
|
|
11162
11260
|
return {
|
|
11163
11261
|
c() {
|
|
@@ -11174,13 +11272,13 @@ function create_if_block_8(ctx) {
|
|
|
11174
11272
|
clear_1_changes.theme = /*theme*/
|
|
11175
11273
|
ctx2[1];
|
|
11176
11274
|
if (dirty[0] & /*btn_props*/
|
|
11177
|
-
|
|
11275
|
+
32768)
|
|
11178
11276
|
clear_1_changes.btn_props = /*btn_props*/
|
|
11179
|
-
ctx2[
|
|
11277
|
+
ctx2[15];
|
|
11180
11278
|
if (dirty[0] & /*t*/
|
|
11181
|
-
|
|
11279
|
+
1024)
|
|
11182
11280
|
clear_1_changes.content = /*t*/
|
|
11183
|
-
ctx2[
|
|
11281
|
+
ctx2[10].clear;
|
|
11184
11282
|
clear_1.$set(clear_1_changes);
|
|
11185
11283
|
},
|
|
11186
11284
|
i(local) {
|
|
@@ -11205,7 +11303,7 @@ function create_if_block_7(ctx) {
|
|
|
11205
11303
|
props: {
|
|
11206
11304
|
appliance: (
|
|
11207
11305
|
/*appliance*/
|
|
11208
|
-
ctx[
|
|
11306
|
+
ctx[17]
|
|
11209
11307
|
),
|
|
11210
11308
|
theme: (
|
|
11211
11309
|
/*theme*/
|
|
@@ -11213,18 +11311,18 @@ function create_if_block_7(ctx) {
|
|
|
11213
11311
|
),
|
|
11214
11312
|
btn_props: (
|
|
11215
11313
|
/*btn_props*/
|
|
11216
|
-
ctx[
|
|
11314
|
+
ctx[15]
|
|
11217
11315
|
),
|
|
11218
11316
|
content: (
|
|
11219
11317
|
/*c*/
|
|
11220
|
-
ctx[
|
|
11318
|
+
ctx[19].eraser
|
|
11221
11319
|
)
|
|
11222
11320
|
}
|
|
11223
11321
|
});
|
|
11224
11322
|
eraser_1.$on(
|
|
11225
11323
|
"click",
|
|
11226
11324
|
/*eraser*/
|
|
11227
|
-
ctx[
|
|
11325
|
+
ctx[29]
|
|
11228
11326
|
);
|
|
11229
11327
|
return {
|
|
11230
11328
|
c() {
|
|
@@ -11237,21 +11335,21 @@ function create_if_block_7(ctx) {
|
|
|
11237
11335
|
p(ctx2, dirty) {
|
|
11238
11336
|
const eraser_1_changes = {};
|
|
11239
11337
|
if (dirty[0] & /*appliance*/
|
|
11240
|
-
|
|
11338
|
+
131072)
|
|
11241
11339
|
eraser_1_changes.appliance = /*appliance*/
|
|
11242
|
-
ctx2[
|
|
11340
|
+
ctx2[17];
|
|
11243
11341
|
if (dirty[0] & /*theme*/
|
|
11244
11342
|
2)
|
|
11245
11343
|
eraser_1_changes.theme = /*theme*/
|
|
11246
11344
|
ctx2[1];
|
|
11247
11345
|
if (dirty[0] & /*btn_props*/
|
|
11248
|
-
|
|
11346
|
+
32768)
|
|
11249
11347
|
eraser_1_changes.btn_props = /*btn_props*/
|
|
11250
|
-
ctx2[
|
|
11348
|
+
ctx2[15];
|
|
11251
11349
|
if (dirty[0] & /*c*/
|
|
11252
|
-
|
|
11350
|
+
524288)
|
|
11253
11351
|
eraser_1_changes.content = /*c*/
|
|
11254
|
-
ctx2[
|
|
11352
|
+
ctx2[19].eraser;
|
|
11255
11353
|
eraser_1.$set(eraser_1_changes);
|
|
11256
11354
|
},
|
|
11257
11355
|
i(local) {
|
|
@@ -11280,7 +11378,7 @@ function create_if_block_6(ctx) {
|
|
|
11280
11378
|
),
|
|
11281
11379
|
appliance: (
|
|
11282
11380
|
/*appliance*/
|
|
11283
|
-
ctx[
|
|
11381
|
+
ctx[17]
|
|
11284
11382
|
),
|
|
11285
11383
|
theme: (
|
|
11286
11384
|
/*theme*/
|
|
@@ -11288,15 +11386,15 @@ function create_if_block_6(ctx) {
|
|
|
11288
11386
|
),
|
|
11289
11387
|
btn_props: (
|
|
11290
11388
|
/*btn_props*/
|
|
11291
|
-
ctx[
|
|
11389
|
+
ctx[15]
|
|
11292
11390
|
),
|
|
11293
11391
|
content: (
|
|
11294
11392
|
/*t*/
|
|
11295
|
-
ctx[
|
|
11393
|
+
ctx[10].shapes
|
|
11296
11394
|
),
|
|
11297
11395
|
menu: (
|
|
11298
11396
|
/*shapes_panel*/
|
|
11299
|
-
ctx[
|
|
11397
|
+
ctx[13]
|
|
11300
11398
|
)
|
|
11301
11399
|
}
|
|
11302
11400
|
});
|
|
@@ -11315,25 +11413,25 @@ function create_if_block_6(ctx) {
|
|
|
11315
11413
|
shapes_changes.app = /*app*/
|
|
11316
11414
|
ctx2[0];
|
|
11317
11415
|
if (dirty[0] & /*appliance*/
|
|
11318
|
-
|
|
11416
|
+
131072)
|
|
11319
11417
|
shapes_changes.appliance = /*appliance*/
|
|
11320
|
-
ctx2[
|
|
11418
|
+
ctx2[17];
|
|
11321
11419
|
if (dirty[0] & /*theme*/
|
|
11322
11420
|
2)
|
|
11323
11421
|
shapes_changes.theme = /*theme*/
|
|
11324
11422
|
ctx2[1];
|
|
11325
11423
|
if (dirty[0] & /*btn_props*/
|
|
11326
|
-
|
|
11424
|
+
32768)
|
|
11327
11425
|
shapes_changes.btn_props = /*btn_props*/
|
|
11328
|
-
ctx2[
|
|
11426
|
+
ctx2[15];
|
|
11329
11427
|
if (dirty[0] & /*t*/
|
|
11330
|
-
|
|
11428
|
+
1024)
|
|
11331
11429
|
shapes_changes.content = /*t*/
|
|
11332
|
-
ctx2[
|
|
11430
|
+
ctx2[10].shapes;
|
|
11333
11431
|
if (dirty[0] & /*shapes_panel*/
|
|
11334
|
-
|
|
11432
|
+
8192)
|
|
11335
11433
|
shapes_changes.menu = /*shapes_panel*/
|
|
11336
|
-
ctx2[
|
|
11434
|
+
ctx2[13];
|
|
11337
11435
|
shapes2.$set(shapes_changes);
|
|
11338
11436
|
},
|
|
11339
11437
|
i(local) {
|
|
@@ -11358,7 +11456,7 @@ function create_if_block_5(ctx) {
|
|
|
11358
11456
|
props: {
|
|
11359
11457
|
appliance: (
|
|
11360
11458
|
/*appliance*/
|
|
11361
|
-
ctx[
|
|
11459
|
+
ctx[17]
|
|
11362
11460
|
),
|
|
11363
11461
|
theme: (
|
|
11364
11462
|
/*theme*/
|
|
@@ -11366,22 +11464,22 @@ function create_if_block_5(ctx) {
|
|
|
11366
11464
|
),
|
|
11367
11465
|
btn_props: (
|
|
11368
11466
|
/*btn_props*/
|
|
11369
|
-
ctx[
|
|
11467
|
+
ctx[15]
|
|
11370
11468
|
),
|
|
11371
11469
|
content: (
|
|
11372
11470
|
/*c*/
|
|
11373
|
-
ctx[
|
|
11471
|
+
ctx[19].text
|
|
11374
11472
|
),
|
|
11375
11473
|
menu: (
|
|
11376
11474
|
/*text_panel*/
|
|
11377
|
-
ctx[
|
|
11475
|
+
ctx[12]
|
|
11378
11476
|
)
|
|
11379
11477
|
}
|
|
11380
11478
|
});
|
|
11381
11479
|
text_1.$on(
|
|
11382
11480
|
"click",
|
|
11383
11481
|
/*text*/
|
|
11384
|
-
ctx[
|
|
11482
|
+
ctx[28]
|
|
11385
11483
|
);
|
|
11386
11484
|
return {
|
|
11387
11485
|
c() {
|
|
@@ -11394,25 +11492,25 @@ function create_if_block_5(ctx) {
|
|
|
11394
11492
|
p(ctx2, dirty) {
|
|
11395
11493
|
const text_1_changes = {};
|
|
11396
11494
|
if (dirty[0] & /*appliance*/
|
|
11397
|
-
|
|
11495
|
+
131072)
|
|
11398
11496
|
text_1_changes.appliance = /*appliance*/
|
|
11399
|
-
ctx2[
|
|
11497
|
+
ctx2[17];
|
|
11400
11498
|
if (dirty[0] & /*theme*/
|
|
11401
11499
|
2)
|
|
11402
11500
|
text_1_changes.theme = /*theme*/
|
|
11403
11501
|
ctx2[1];
|
|
11404
11502
|
if (dirty[0] & /*btn_props*/
|
|
11405
|
-
|
|
11503
|
+
32768)
|
|
11406
11504
|
text_1_changes.btn_props = /*btn_props*/
|
|
11407
|
-
ctx2[
|
|
11505
|
+
ctx2[15];
|
|
11408
11506
|
if (dirty[0] & /*c*/
|
|
11409
|
-
|
|
11507
|
+
524288)
|
|
11410
11508
|
text_1_changes.content = /*c*/
|
|
11411
|
-
ctx2[
|
|
11509
|
+
ctx2[19].text;
|
|
11412
11510
|
if (dirty[0] & /*text_panel*/
|
|
11413
|
-
|
|
11511
|
+
4096)
|
|
11414
11512
|
text_1_changes.menu = /*text_panel*/
|
|
11415
|
-
ctx2[
|
|
11513
|
+
ctx2[12];
|
|
11416
11514
|
text_1.$set(text_1_changes);
|
|
11417
11515
|
},
|
|
11418
11516
|
i(local) {
|
|
@@ -11437,7 +11535,7 @@ function create_if_block_4(ctx) {
|
|
|
11437
11535
|
props: {
|
|
11438
11536
|
appliance: (
|
|
11439
11537
|
/*appliance*/
|
|
11440
|
-
ctx[
|
|
11538
|
+
ctx[17]
|
|
11441
11539
|
),
|
|
11442
11540
|
theme: (
|
|
11443
11541
|
/*theme*/
|
|
@@ -11445,22 +11543,22 @@ function create_if_block_4(ctx) {
|
|
|
11445
11543
|
),
|
|
11446
11544
|
btn_props: (
|
|
11447
11545
|
/*btn_props*/
|
|
11448
|
-
ctx[
|
|
11546
|
+
ctx[15]
|
|
11449
11547
|
),
|
|
11450
11548
|
content: (
|
|
11451
11549
|
/*c*/
|
|
11452
|
-
ctx[
|
|
11550
|
+
ctx[19].pencil
|
|
11453
11551
|
),
|
|
11454
11552
|
menu: (
|
|
11455
11553
|
/*pencil_panel*/
|
|
11456
|
-
ctx[
|
|
11554
|
+
ctx[11]
|
|
11457
11555
|
)
|
|
11458
11556
|
}
|
|
11459
11557
|
});
|
|
11460
11558
|
pencil_1.$on(
|
|
11461
11559
|
"click",
|
|
11462
11560
|
/*pencil*/
|
|
11463
|
-
ctx[
|
|
11561
|
+
ctx[27]
|
|
11464
11562
|
);
|
|
11465
11563
|
return {
|
|
11466
11564
|
c() {
|
|
@@ -11473,25 +11571,25 @@ function create_if_block_4(ctx) {
|
|
|
11473
11571
|
p(ctx2, dirty) {
|
|
11474
11572
|
const pencil_1_changes = {};
|
|
11475
11573
|
if (dirty[0] & /*appliance*/
|
|
11476
|
-
|
|
11574
|
+
131072)
|
|
11477
11575
|
pencil_1_changes.appliance = /*appliance*/
|
|
11478
|
-
ctx2[
|
|
11576
|
+
ctx2[17];
|
|
11479
11577
|
if (dirty[0] & /*theme*/
|
|
11480
11578
|
2)
|
|
11481
11579
|
pencil_1_changes.theme = /*theme*/
|
|
11482
11580
|
ctx2[1];
|
|
11483
11581
|
if (dirty[0] & /*btn_props*/
|
|
11484
|
-
|
|
11582
|
+
32768)
|
|
11485
11583
|
pencil_1_changes.btn_props = /*btn_props*/
|
|
11486
|
-
ctx2[
|
|
11584
|
+
ctx2[15];
|
|
11487
11585
|
if (dirty[0] & /*c*/
|
|
11488
|
-
|
|
11586
|
+
524288)
|
|
11489
11587
|
pencil_1_changes.content = /*c*/
|
|
11490
|
-
ctx2[
|
|
11588
|
+
ctx2[19].pencil;
|
|
11491
11589
|
if (dirty[0] & /*pencil_panel*/
|
|
11492
|
-
|
|
11590
|
+
2048)
|
|
11493
11591
|
pencil_1_changes.menu = /*pencil_panel*/
|
|
11494
|
-
ctx2[
|
|
11592
|
+
ctx2[11];
|
|
11495
11593
|
pencil_1.$set(pencil_1_changes);
|
|
11496
11594
|
},
|
|
11497
11595
|
i(local) {
|
|
@@ -11516,7 +11614,7 @@ function create_if_block_3(ctx) {
|
|
|
11516
11614
|
props: {
|
|
11517
11615
|
appliance: (
|
|
11518
11616
|
/*appliance*/
|
|
11519
|
-
ctx[
|
|
11617
|
+
ctx[17]
|
|
11520
11618
|
),
|
|
11521
11619
|
theme: (
|
|
11522
11620
|
/*theme*/
|
|
@@ -11524,18 +11622,18 @@ function create_if_block_3(ctx) {
|
|
|
11524
11622
|
),
|
|
11525
11623
|
btn_props: (
|
|
11526
11624
|
/*btn_props*/
|
|
11527
|
-
ctx[
|
|
11625
|
+
ctx[15]
|
|
11528
11626
|
),
|
|
11529
11627
|
content: (
|
|
11530
11628
|
/*c*/
|
|
11531
|
-
ctx[
|
|
11629
|
+
ctx[19].selector
|
|
11532
11630
|
)
|
|
11533
11631
|
}
|
|
11534
11632
|
});
|
|
11535
11633
|
selector_1.$on(
|
|
11536
11634
|
"click",
|
|
11537
11635
|
/*selector*/
|
|
11538
|
-
ctx[
|
|
11636
|
+
ctx[26]
|
|
11539
11637
|
);
|
|
11540
11638
|
return {
|
|
11541
11639
|
c() {
|
|
@@ -11548,21 +11646,21 @@ function create_if_block_3(ctx) {
|
|
|
11548
11646
|
p(ctx2, dirty) {
|
|
11549
11647
|
const selector_1_changes = {};
|
|
11550
11648
|
if (dirty[0] & /*appliance*/
|
|
11551
|
-
|
|
11649
|
+
131072)
|
|
11552
11650
|
selector_1_changes.appliance = /*appliance*/
|
|
11553
|
-
ctx2[
|
|
11651
|
+
ctx2[17];
|
|
11554
11652
|
if (dirty[0] & /*theme*/
|
|
11555
11653
|
2)
|
|
11556
11654
|
selector_1_changes.theme = /*theme*/
|
|
11557
11655
|
ctx2[1];
|
|
11558
11656
|
if (dirty[0] & /*btn_props*/
|
|
11559
|
-
|
|
11657
|
+
32768)
|
|
11560
11658
|
selector_1_changes.btn_props = /*btn_props*/
|
|
11561
|
-
ctx2[
|
|
11659
|
+
ctx2[15];
|
|
11562
11660
|
if (dirty[0] & /*c*/
|
|
11563
|
-
|
|
11661
|
+
524288)
|
|
11564
11662
|
selector_1_changes.content = /*c*/
|
|
11565
|
-
ctx2[
|
|
11663
|
+
ctx2[19].selector;
|
|
11566
11664
|
selector_1.$set(selector_1_changes);
|
|
11567
11665
|
},
|
|
11568
11666
|
i(local) {
|
|
@@ -11587,7 +11685,7 @@ function create_if_block_2(ctx) {
|
|
|
11587
11685
|
props: {
|
|
11588
11686
|
appliance: (
|
|
11589
11687
|
/*appliance*/
|
|
11590
|
-
ctx[
|
|
11688
|
+
ctx[17]
|
|
11591
11689
|
),
|
|
11592
11690
|
theme: (
|
|
11593
11691
|
/*theme*/
|
|
@@ -11595,18 +11693,18 @@ function create_if_block_2(ctx) {
|
|
|
11595
11693
|
),
|
|
11596
11694
|
btn_props: (
|
|
11597
11695
|
/*btn_props*/
|
|
11598
|
-
ctx[
|
|
11696
|
+
ctx[15]
|
|
11599
11697
|
),
|
|
11600
11698
|
content: (
|
|
11601
11699
|
/*c*/
|
|
11602
|
-
ctx[
|
|
11700
|
+
ctx[19].clicker
|
|
11603
11701
|
)
|
|
11604
11702
|
}
|
|
11605
11703
|
});
|
|
11606
11704
|
clicker_1.$on(
|
|
11607
11705
|
"click",
|
|
11608
11706
|
/*clicker*/
|
|
11609
|
-
ctx[
|
|
11707
|
+
ctx[25]
|
|
11610
11708
|
);
|
|
11611
11709
|
return {
|
|
11612
11710
|
c() {
|
|
@@ -11619,21 +11717,21 @@ function create_if_block_2(ctx) {
|
|
|
11619
11717
|
p(ctx2, dirty) {
|
|
11620
11718
|
const clicker_1_changes = {};
|
|
11621
11719
|
if (dirty[0] & /*appliance*/
|
|
11622
|
-
|
|
11720
|
+
131072)
|
|
11623
11721
|
clicker_1_changes.appliance = /*appliance*/
|
|
11624
|
-
ctx2[
|
|
11722
|
+
ctx2[17];
|
|
11625
11723
|
if (dirty[0] & /*theme*/
|
|
11626
11724
|
2)
|
|
11627
11725
|
clicker_1_changes.theme = /*theme*/
|
|
11628
11726
|
ctx2[1];
|
|
11629
11727
|
if (dirty[0] & /*btn_props*/
|
|
11630
|
-
|
|
11728
|
+
32768)
|
|
11631
11729
|
clicker_1_changes.btn_props = /*btn_props*/
|
|
11632
|
-
ctx2[
|
|
11730
|
+
ctx2[15];
|
|
11633
11731
|
if (dirty[0] & /*c*/
|
|
11634
|
-
|
|
11732
|
+
524288)
|
|
11635
11733
|
clicker_1_changes.content = /*c*/
|
|
11636
|
-
ctx2[
|
|
11734
|
+
ctx2[19].clicker;
|
|
11637
11735
|
clicker_1.$set(clicker_1_changes);
|
|
11638
11736
|
},
|
|
11639
11737
|
i(local) {
|
|
@@ -11671,47 +11769,47 @@ function create_each_block_1(ctx) {
|
|
|
11671
11769
|
function select_block_type(ctx2, dirty) {
|
|
11672
11770
|
if (
|
|
11673
11771
|
/*item*/
|
|
11674
|
-
ctx2[
|
|
11772
|
+
ctx2[53] === "clicker"
|
|
11675
11773
|
)
|
|
11676
11774
|
return 0;
|
|
11677
11775
|
if (
|
|
11678
11776
|
/*item*/
|
|
11679
|
-
ctx2[
|
|
11777
|
+
ctx2[53] === "selector"
|
|
11680
11778
|
)
|
|
11681
11779
|
return 1;
|
|
11682
11780
|
if (
|
|
11683
11781
|
/*item*/
|
|
11684
|
-
ctx2[
|
|
11782
|
+
ctx2[53] === "pencil"
|
|
11685
11783
|
)
|
|
11686
11784
|
return 2;
|
|
11687
11785
|
if (
|
|
11688
11786
|
/*item*/
|
|
11689
|
-
ctx2[
|
|
11787
|
+
ctx2[53] === "text"
|
|
11690
11788
|
)
|
|
11691
11789
|
return 3;
|
|
11692
11790
|
if (
|
|
11693
11791
|
/*item*/
|
|
11694
|
-
ctx2[
|
|
11792
|
+
ctx2[53] === "shapes"
|
|
11695
11793
|
)
|
|
11696
11794
|
return 4;
|
|
11697
11795
|
if (
|
|
11698
11796
|
/*item*/
|
|
11699
|
-
ctx2[
|
|
11797
|
+
ctx2[53] === "eraser"
|
|
11700
11798
|
)
|
|
11701
11799
|
return 5;
|
|
11702
11800
|
if (
|
|
11703
11801
|
/*item*/
|
|
11704
|
-
ctx2[
|
|
11802
|
+
ctx2[53] === "clear"
|
|
11705
11803
|
)
|
|
11706
11804
|
return 6;
|
|
11707
11805
|
if (
|
|
11708
11806
|
/*item*/
|
|
11709
|
-
ctx2[
|
|
11807
|
+
ctx2[53] === "hand"
|
|
11710
11808
|
)
|
|
11711
11809
|
return 7;
|
|
11712
11810
|
if (
|
|
11713
11811
|
/*item*/
|
|
11714
|
-
ctx2[
|
|
11812
|
+
ctx2[53] === "laserPointer"
|
|
11715
11813
|
)
|
|
11716
11814
|
return 8;
|
|
11717
11815
|
return -1;
|
|
@@ -11787,14 +11885,14 @@ function create_if_block_12(ctx) {
|
|
|
11787
11885
|
const button_spread_levels = [
|
|
11788
11886
|
{ class: "apps" },
|
|
11789
11887
|
/*btn_props*/
|
|
11790
|
-
ctx[
|
|
11888
|
+
ctx[15],
|
|
11791
11889
|
{ content: (
|
|
11792
11890
|
/*t*/
|
|
11793
|
-
ctx[
|
|
11891
|
+
ctx[10].apps
|
|
11794
11892
|
) },
|
|
11795
11893
|
{ menu: (
|
|
11796
11894
|
/*apps_panel*/
|
|
11797
|
-
ctx[
|
|
11895
|
+
ctx[14]
|
|
11798
11896
|
) },
|
|
11799
11897
|
{
|
|
11800
11898
|
menu_placement: (
|
|
@@ -11821,22 +11919,22 @@ function create_if_block_12(ctx) {
|
|
|
11821
11919
|
},
|
|
11822
11920
|
p(ctx2, dirty) {
|
|
11823
11921
|
const button_changes = dirty[0] & /*btn_props, t, apps_panel, placement*/
|
|
11824
|
-
|
|
11922
|
+
50240 ? get_spread_update(button_spread_levels, [
|
|
11825
11923
|
button_spread_levels[0],
|
|
11826
11924
|
dirty[0] & /*btn_props*/
|
|
11827
|
-
|
|
11925
|
+
32768 && get_spread_object(
|
|
11828
11926
|
/*btn_props*/
|
|
11829
|
-
ctx2[
|
|
11927
|
+
ctx2[15]
|
|
11830
11928
|
),
|
|
11831
11929
|
dirty[0] & /*t*/
|
|
11832
|
-
|
|
11930
|
+
1024 && { content: (
|
|
11833
11931
|
/*t*/
|
|
11834
|
-
ctx2[
|
|
11932
|
+
ctx2[10].apps
|
|
11835
11933
|
) },
|
|
11836
11934
|
dirty[0] & /*apps_panel*/
|
|
11837
|
-
|
|
11935
|
+
16384 && { menu: (
|
|
11838
11936
|
/*apps_panel*/
|
|
11839
|
-
ctx2[
|
|
11937
|
+
ctx2[14]
|
|
11840
11938
|
) },
|
|
11841
11939
|
dirty[0] & /*placement*/
|
|
11842
11940
|
64 && {
|
|
@@ -11848,7 +11946,7 @@ function create_if_block_12(ctx) {
|
|
|
11848
11946
|
]) : {};
|
|
11849
11947
|
if (dirty[0] & /*theme*/
|
|
11850
11948
|
2 | dirty[1] & /*$$scope*/
|
|
11851
|
-
|
|
11949
|
+
33554432) {
|
|
11852
11950
|
button_changes.$$scope = { dirty, ctx: ctx2 };
|
|
11853
11951
|
}
|
|
11854
11952
|
button.$set(button_changes);
|
|
@@ -11928,7 +12026,7 @@ function create_if_block14(ctx) {
|
|
|
11928
12026
|
button.$on(
|
|
11929
12027
|
"click",
|
|
11930
12028
|
/*scroll_down*/
|
|
11931
|
-
ctx[
|
|
12029
|
+
ctx[24]
|
|
11932
12030
|
);
|
|
11933
12031
|
return {
|
|
11934
12032
|
c() {
|
|
@@ -11950,7 +12048,7 @@ function create_if_block14(ctx) {
|
|
|
11950
12048
|
ctx2[3];
|
|
11951
12049
|
if (dirty[0] & /*theme*/
|
|
11952
12050
|
2 | dirty[1] & /*$$scope*/
|
|
11953
|
-
|
|
12051
|
+
33554432) {
|
|
11954
12052
|
button_changes.$$scope = { dirty, ctx: ctx2 };
|
|
11955
12053
|
}
|
|
11956
12054
|
button.$set(button_changes);
|
|
@@ -12019,7 +12117,7 @@ function create_each_block4(ctx) {
|
|
|
12019
12117
|
let span;
|
|
12020
12118
|
let t1_value = (
|
|
12021
12119
|
/*label*/
|
|
12022
|
-
ctx[
|
|
12120
|
+
ctx[46] + ""
|
|
12023
12121
|
);
|
|
12024
12122
|
let t1;
|
|
12025
12123
|
let span_class_value;
|
|
@@ -12041,40 +12139,40 @@ function create_each_block4(ctx) {
|
|
|
12041
12139
|
attr(img, "class", img_class_value = name5 + "-app-btn-icon " + /*theme*/
|
|
12042
12140
|
ctx[1]);
|
|
12043
12141
|
if (!src_url_equal(img.src, img_src_value = /*icon*/
|
|
12044
|
-
ctx[
|
|
12142
|
+
ctx[45]))
|
|
12045
12143
|
attr(img, "src", img_src_value);
|
|
12046
12144
|
attr(img, "alt", img_alt_value = /*kind*/
|
|
12047
|
-
ctx[
|
|
12145
|
+
ctx[47]);
|
|
12048
12146
|
attr(img, "title", img_title_value = /*label*/
|
|
12049
|
-
ctx[
|
|
12147
|
+
ctx[46]);
|
|
12050
12148
|
attr(span, "class", span_class_value = name5 + "-app-btn-text " + /*theme*/
|
|
12051
12149
|
ctx[1]);
|
|
12052
12150
|
attr(button, "class", button_class_value = name5 + "-app-btn " + /*kind*/
|
|
12053
|
-
ctx[
|
|
12151
|
+
ctx[47] + " " + /*theme*/
|
|
12054
12152
|
ctx[1]);
|
|
12055
12153
|
attr(button, "title", button_title_value = /*label*/
|
|
12056
|
-
ctx[
|
|
12057
|
-
(ctx[
|
|
12058
|
-
ctx[
|
|
12059
|
-
ctx[
|
|
12154
|
+
ctx[46] + /*state*/
|
|
12155
|
+
(ctx[49] && /*state*/
|
|
12156
|
+
ctx[49].reason ? ": " + /*state*/
|
|
12157
|
+
ctx[49].reason : ""));
|
|
12060
12158
|
attr(button, "data-app-kind", button_data_app_kind_value = /*netless_app*/
|
|
12061
|
-
ctx[
|
|
12159
|
+
ctx[44].kind);
|
|
12062
12160
|
button.disabled = button_disabled_value = /*state*/
|
|
12063
|
-
ctx[
|
|
12064
|
-
ctx[
|
|
12161
|
+
ctx[49] && /*state*/
|
|
12162
|
+
ctx[49].status !== "idle";
|
|
12065
12163
|
toggle_class(
|
|
12066
12164
|
button,
|
|
12067
12165
|
"is-loading",
|
|
12068
12166
|
/*state*/
|
|
12069
|
-
ctx[
|
|
12070
|
-
ctx[
|
|
12167
|
+
ctx[49] && /*state*/
|
|
12168
|
+
ctx[49].status === "loading"
|
|
12071
12169
|
);
|
|
12072
12170
|
toggle_class(
|
|
12073
12171
|
button,
|
|
12074
12172
|
"is-failed",
|
|
12075
12173
|
/*state*/
|
|
12076
|
-
ctx[
|
|
12077
|
-
ctx[
|
|
12174
|
+
ctx[49] && /*state*/
|
|
12175
|
+
ctx[49].status === "failed"
|
|
12078
12176
|
);
|
|
12079
12177
|
},
|
|
12080
12178
|
m(target, anchor) {
|
|
@@ -12088,9 +12186,9 @@ function create_each_block4(ctx) {
|
|
|
12088
12186
|
dispose = listen(button, "click", function() {
|
|
12089
12187
|
if (is_function(
|
|
12090
12188
|
/*on_click*/
|
|
12091
|
-
ctx[
|
|
12189
|
+
ctx[50]
|
|
12092
12190
|
))
|
|
12093
|
-
ctx[
|
|
12191
|
+
ctx[50].apply(this, arguments);
|
|
12094
12192
|
});
|
|
12095
12193
|
mounted = true;
|
|
12096
12194
|
}
|
|
@@ -12103,23 +12201,23 @@ function create_each_block4(ctx) {
|
|
|
12103
12201
|
attr(img, "class", img_class_value);
|
|
12104
12202
|
}
|
|
12105
12203
|
if (dirty[0] & /*$apps*/
|
|
12106
|
-
|
|
12107
|
-
ctx[
|
|
12204
|
+
1048576 && !src_url_equal(img.src, img_src_value = /*icon*/
|
|
12205
|
+
ctx[45])) {
|
|
12108
12206
|
attr(img, "src", img_src_value);
|
|
12109
12207
|
}
|
|
12110
12208
|
if (dirty[0] & /*$apps*/
|
|
12111
|
-
|
|
12112
|
-
ctx[
|
|
12209
|
+
1048576 && img_alt_value !== (img_alt_value = /*kind*/
|
|
12210
|
+
ctx[47])) {
|
|
12113
12211
|
attr(img, "alt", img_alt_value);
|
|
12114
12212
|
}
|
|
12115
12213
|
if (dirty[0] & /*$apps*/
|
|
12116
|
-
|
|
12117
|
-
ctx[
|
|
12214
|
+
1048576 && img_title_value !== (img_title_value = /*label*/
|
|
12215
|
+
ctx[46])) {
|
|
12118
12216
|
attr(img, "title", img_title_value);
|
|
12119
12217
|
}
|
|
12120
12218
|
if (dirty[0] & /*$apps*/
|
|
12121
|
-
|
|
12122
|
-
ctx[
|
|
12219
|
+
1048576 && t1_value !== (t1_value = /*label*/
|
|
12220
|
+
ctx[46] + ""))
|
|
12123
12221
|
set_data(t1, t1_value);
|
|
12124
12222
|
if (dirty[0] & /*theme*/
|
|
12125
12223
|
2 && span_class_value !== (span_class_value = name5 + "-app-btn-text " + /*theme*/
|
|
@@ -12127,48 +12225,48 @@ function create_each_block4(ctx) {
|
|
|
12127
12225
|
attr(span, "class", span_class_value);
|
|
12128
12226
|
}
|
|
12129
12227
|
if (dirty[0] & /*$apps, theme*/
|
|
12130
|
-
|
|
12131
|
-
ctx[
|
|
12228
|
+
1048578 && button_class_value !== (button_class_value = name5 + "-app-btn " + /*kind*/
|
|
12229
|
+
ctx[47] + " " + /*theme*/
|
|
12132
12230
|
ctx[1])) {
|
|
12133
12231
|
attr(button, "class", button_class_value);
|
|
12134
12232
|
}
|
|
12135
12233
|
if (dirty[0] & /*$apps, $status*/
|
|
12136
|
-
|
|
12137
|
-
ctx[
|
|
12138
|
-
(ctx[
|
|
12139
|
-
ctx[
|
|
12140
|
-
ctx[
|
|
12234
|
+
3145728 && button_title_value !== (button_title_value = /*label*/
|
|
12235
|
+
ctx[46] + /*state*/
|
|
12236
|
+
(ctx[49] && /*state*/
|
|
12237
|
+
ctx[49].reason ? ": " + /*state*/
|
|
12238
|
+
ctx[49].reason : ""))) {
|
|
12141
12239
|
attr(button, "title", button_title_value);
|
|
12142
12240
|
}
|
|
12143
12241
|
if (dirty[0] & /*$apps*/
|
|
12144
|
-
|
|
12145
|
-
ctx[
|
|
12242
|
+
1048576 && button_data_app_kind_value !== (button_data_app_kind_value = /*netless_app*/
|
|
12243
|
+
ctx[44].kind)) {
|
|
12146
12244
|
attr(button, "data-app-kind", button_data_app_kind_value);
|
|
12147
12245
|
}
|
|
12148
12246
|
if (dirty[0] & /*$status, $apps*/
|
|
12149
|
-
|
|
12150
|
-
ctx[
|
|
12151
|
-
ctx[
|
|
12247
|
+
3145728 && button_disabled_value !== (button_disabled_value = /*state*/
|
|
12248
|
+
ctx[49] && /*state*/
|
|
12249
|
+
ctx[49].status !== "idle")) {
|
|
12152
12250
|
button.disabled = button_disabled_value;
|
|
12153
12251
|
}
|
|
12154
12252
|
if (dirty[0] & /*$apps, theme, $status, $apps*/
|
|
12155
|
-
|
|
12253
|
+
3145730) {
|
|
12156
12254
|
toggle_class(
|
|
12157
12255
|
button,
|
|
12158
12256
|
"is-loading",
|
|
12159
12257
|
/*state*/
|
|
12160
|
-
ctx[
|
|
12161
|
-
ctx[
|
|
12258
|
+
ctx[49] && /*state*/
|
|
12259
|
+
ctx[49].status === "loading"
|
|
12162
12260
|
);
|
|
12163
12261
|
}
|
|
12164
12262
|
if (dirty[0] & /*$apps, theme, $status, $apps*/
|
|
12165
|
-
|
|
12263
|
+
3145730) {
|
|
12166
12264
|
toggle_class(
|
|
12167
12265
|
button,
|
|
12168
12266
|
"is-failed",
|
|
12169
12267
|
/*state*/
|
|
12170
|
-
ctx[
|
|
12171
|
-
ctx[
|
|
12268
|
+
ctx[49] && /*state*/
|
|
12269
|
+
ctx[49].status === "failed"
|
|
12172
12270
|
);
|
|
12173
12271
|
}
|
|
12174
12272
|
},
|
|
@@ -12263,6 +12361,10 @@ function create_fragment67(ctx) {
|
|
|
12263
12361
|
disabled: (
|
|
12264
12362
|
/*disabled*/
|
|
12265
12363
|
ctx[3]
|
|
12364
|
+
),
|
|
12365
|
+
colors: (
|
|
12366
|
+
/*colors*/
|
|
12367
|
+
ctx[9]
|
|
12266
12368
|
)
|
|
12267
12369
|
}
|
|
12268
12370
|
});
|
|
@@ -12279,6 +12381,10 @@ function create_fragment67(ctx) {
|
|
|
12279
12381
|
disabled: (
|
|
12280
12382
|
/*disabled*/
|
|
12281
12383
|
ctx[3]
|
|
12384
|
+
),
|
|
12385
|
+
colors: (
|
|
12386
|
+
/*colors*/
|
|
12387
|
+
ctx[9]
|
|
12282
12388
|
)
|
|
12283
12389
|
}
|
|
12284
12390
|
});
|
|
@@ -12331,12 +12437,16 @@ function create_fragment67(ctx) {
|
|
|
12331
12437
|
disabled: (
|
|
12332
12438
|
/*disabled*/
|
|
12333
12439
|
ctx[3]
|
|
12440
|
+
),
|
|
12441
|
+
colors: (
|
|
12442
|
+
/*colors*/
|
|
12443
|
+
ctx[9]
|
|
12334
12444
|
)
|
|
12335
12445
|
}
|
|
12336
12446
|
});
|
|
12337
12447
|
let each_value = (
|
|
12338
12448
|
/*$apps*/
|
|
12339
|
-
ctx[
|
|
12449
|
+
ctx[20]
|
|
12340
12450
|
);
|
|
12341
12451
|
let each_blocks = [];
|
|
12342
12452
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
@@ -12402,7 +12512,7 @@ function create_fragment67(ctx) {
|
|
|
12402
12512
|
div7,
|
|
12403
12513
|
"--n",
|
|
12404
12514
|
/*$apps*/
|
|
12405
|
-
ctx[
|
|
12515
|
+
ctx[20].length
|
|
12406
12516
|
);
|
|
12407
12517
|
attr(div8, "class", name5 + "-panel-wrapper");
|
|
12408
12518
|
set_style(div8, "display", "none");
|
|
@@ -12431,11 +12541,11 @@ function create_fragment67(ctx) {
|
|
|
12431
12541
|
append(div2, div1);
|
|
12432
12542
|
append(div2, t5);
|
|
12433
12543
|
mount_component(strokecolor0, div2, null);
|
|
12434
|
-
ctx[
|
|
12544
|
+
ctx[37](div2);
|
|
12435
12545
|
append(div8, t6);
|
|
12436
12546
|
append(div8, div3);
|
|
12437
12547
|
mount_component(textcolor, div3, null);
|
|
12438
|
-
ctx[
|
|
12548
|
+
ctx[38](div3);
|
|
12439
12549
|
append(div8, t7);
|
|
12440
12550
|
append(div8, div6);
|
|
12441
12551
|
mount_component(selectshapes, div6, null);
|
|
@@ -12447,7 +12557,7 @@ function create_fragment67(ctx) {
|
|
|
12447
12557
|
append(div6, div5);
|
|
12448
12558
|
append(div6, t11);
|
|
12449
12559
|
mount_component(strokecolor1, div6, null);
|
|
12450
|
-
ctx[
|
|
12560
|
+
ctx[39](div6);
|
|
12451
12561
|
append(div8, t12);
|
|
12452
12562
|
append(div8, div7);
|
|
12453
12563
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
@@ -12455,7 +12565,7 @@ function create_fragment67(ctx) {
|
|
|
12455
12565
|
each_blocks[i].m(div7, null);
|
|
12456
12566
|
}
|
|
12457
12567
|
}
|
|
12458
|
-
ctx[
|
|
12568
|
+
ctx[41](div7);
|
|
12459
12569
|
current = true;
|
|
12460
12570
|
if (!mounted) {
|
|
12461
12571
|
dispose = [
|
|
@@ -12469,7 +12579,7 @@ function create_fragment67(ctx) {
|
|
|
12469
12579
|
null,
|
|
12470
12580
|
div0,
|
|
12471
12581
|
/*top*/
|
|
12472
|
-
ctx[
|
|
12582
|
+
ctx[22]
|
|
12473
12583
|
))
|
|
12474
12584
|
];
|
|
12475
12585
|
mounted = true;
|
|
@@ -12499,9 +12609,9 @@ function create_fragment67(ctx) {
|
|
|
12499
12609
|
});
|
|
12500
12610
|
check_outros();
|
|
12501
12611
|
}
|
|
12502
|
-
if (dirty[0] & /*appliance, theme, btn_props, c, clicker, items, selector, pencil_panel, pencil, text_panel, text, app, t, shapes_panel, eraser, hand
|
|
12503
|
-
|
|
12504
|
-
|
|
12612
|
+
if (dirty[0] & /*appliance, theme, btn_props, c, clicker, items, selector, pencil_panel, pencil, text_panel, text, app, t, shapes_panel, eraser, hand*/
|
|
12613
|
+
2114632835 | dirty[1] & /*clear, laserPointer*/
|
|
12614
|
+
3) {
|
|
12505
12615
|
each_value_1 = /*items*/
|
|
12506
12616
|
ctx2[7];
|
|
12507
12617
|
let i;
|
|
@@ -12610,6 +12720,10 @@ function create_fragment67(ctx) {
|
|
|
12610
12720
|
8)
|
|
12611
12721
|
strokecolor0_changes.disabled = /*disabled*/
|
|
12612
12722
|
ctx2[3];
|
|
12723
|
+
if (dirty[0] & /*colors*/
|
|
12724
|
+
512)
|
|
12725
|
+
strokecolor0_changes.colors = /*colors*/
|
|
12726
|
+
ctx2[9];
|
|
12613
12727
|
strokecolor0.$set(strokecolor0_changes);
|
|
12614
12728
|
const textcolor_changes = {};
|
|
12615
12729
|
if (dirty[0] & /*app*/
|
|
@@ -12624,6 +12738,10 @@ function create_fragment67(ctx) {
|
|
|
12624
12738
|
8)
|
|
12625
12739
|
textcolor_changes.disabled = /*disabled*/
|
|
12626
12740
|
ctx2[3];
|
|
12741
|
+
if (dirty[0] & /*colors*/
|
|
12742
|
+
512)
|
|
12743
|
+
textcolor_changes.colors = /*colors*/
|
|
12744
|
+
ctx2[9];
|
|
12627
12745
|
textcolor.$set(textcolor_changes);
|
|
12628
12746
|
const selectshapes_changes = {};
|
|
12629
12747
|
if (dirty[0] & /*app*/
|
|
@@ -12670,11 +12788,15 @@ function create_fragment67(ctx) {
|
|
|
12670
12788
|
8)
|
|
12671
12789
|
strokecolor1_changes.disabled = /*disabled*/
|
|
12672
12790
|
ctx2[3];
|
|
12791
|
+
if (dirty[0] & /*colors*/
|
|
12792
|
+
512)
|
|
12793
|
+
strokecolor1_changes.colors = /*colors*/
|
|
12794
|
+
ctx2[9];
|
|
12673
12795
|
strokecolor1.$set(strokecolor1_changes);
|
|
12674
12796
|
if (dirty[0] & /*$apps, theme, $status, app*/
|
|
12675
|
-
|
|
12797
|
+
3145731) {
|
|
12676
12798
|
each_value = /*$apps*/
|
|
12677
|
-
ctx2[
|
|
12799
|
+
ctx2[20];
|
|
12678
12800
|
let i;
|
|
12679
12801
|
for (i = 0; i < each_value.length; i += 1) {
|
|
12680
12802
|
const child_ctx = get_each_context4(ctx2, each_value, i);
|
|
@@ -12692,12 +12814,12 @@ function create_fragment67(ctx) {
|
|
|
12692
12814
|
each_blocks.length = each_value.length;
|
|
12693
12815
|
}
|
|
12694
12816
|
if (!current || dirty[0] & /*$apps*/
|
|
12695
|
-
|
|
12817
|
+
1048576) {
|
|
12696
12818
|
set_style(
|
|
12697
12819
|
div7,
|
|
12698
12820
|
"--n",
|
|
12699
12821
|
/*$apps*/
|
|
12700
|
-
ctx2[
|
|
12822
|
+
ctx2[20].length
|
|
12701
12823
|
);
|
|
12702
12824
|
}
|
|
12703
12825
|
},
|
|
@@ -12754,15 +12876,15 @@ function create_fragment67(ctx) {
|
|
|
12754
12876
|
detach(div8);
|
|
12755
12877
|
destroy_component(strokewidth0);
|
|
12756
12878
|
destroy_component(strokecolor0);
|
|
12757
|
-
ctx[36](null);
|
|
12758
|
-
destroy_component(textcolor);
|
|
12759
12879
|
ctx[37](null);
|
|
12880
|
+
destroy_component(textcolor);
|
|
12881
|
+
ctx[38](null);
|
|
12760
12882
|
destroy_component(selectshapes);
|
|
12761
12883
|
destroy_component(strokewidth1);
|
|
12762
12884
|
destroy_component(strokecolor1);
|
|
12763
|
-
ctx[
|
|
12885
|
+
ctx[39](null);
|
|
12764
12886
|
destroy_each(each_blocks, detaching);
|
|
12765
|
-
ctx[
|
|
12887
|
+
ctx[41](null);
|
|
12766
12888
|
mounted = false;
|
|
12767
12889
|
run_all(dispose);
|
|
12768
12890
|
}
|
|
@@ -12778,11 +12900,11 @@ function instance67($$self, $$props, $$invalidate) {
|
|
|
12778
12900
|
let status;
|
|
12779
12901
|
let max_scroll;
|
|
12780
12902
|
let $top;
|
|
12781
|
-
let $scroll_height, $$unsubscribe_scroll_height = noop, $$subscribe_scroll_height = () => ($$unsubscribe_scroll_height(), $$unsubscribe_scroll_height = subscribe(scroll_height, ($$value) => $$invalidate(
|
|
12782
|
-
let $memberState, $$unsubscribe_memberState = noop, $$subscribe_memberState = () => ($$unsubscribe_memberState(), $$unsubscribe_memberState = subscribe(memberState, ($$value) => $$invalidate(
|
|
12903
|
+
let $scroll_height, $$unsubscribe_scroll_height = noop, $$subscribe_scroll_height = () => ($$unsubscribe_scroll_height(), $$unsubscribe_scroll_height = subscribe(scroll_height, ($$value) => $$invalidate(35, $scroll_height = $$value)), scroll_height);
|
|
12904
|
+
let $memberState, $$unsubscribe_memberState = noop, $$subscribe_memberState = () => ($$unsubscribe_memberState(), $$unsubscribe_memberState = subscribe(memberState, ($$value) => $$invalidate(36, $memberState = $$value)), memberState);
|
|
12783
12905
|
let $apps;
|
|
12784
|
-
let $status, $$unsubscribe_status = noop, $$subscribe_status = () => ($$unsubscribe_status(), $$unsubscribe_status = subscribe(status, ($$value) => $$invalidate(
|
|
12785
|
-
component_subscribe($$self, apps, ($$value) => $$invalidate(
|
|
12906
|
+
let $status, $$unsubscribe_status = noop, $$subscribe_status = () => ($$unsubscribe_status(), $$unsubscribe_status = subscribe(status, ($$value) => $$invalidate(21, $status = $$value)), status);
|
|
12907
|
+
component_subscribe($$self, apps, ($$value) => $$invalidate(20, $apps = $$value));
|
|
12786
12908
|
$$self.$$.on_destroy.push(() => $$unsubscribe_scroll_height());
|
|
12787
12909
|
$$self.$$.on_destroy.push(() => $$unsubscribe_memberState());
|
|
12788
12910
|
$$self.$$.on_destroy.push(() => $$unsubscribe_status());
|
|
@@ -12797,13 +12919,14 @@ function instance67($$self, $$props, $$invalidate) {
|
|
|
12797
12919
|
let { placement = "left" } = $$props;
|
|
12798
12920
|
let { items = default_items } = $$props;
|
|
12799
12921
|
let { hide_apps = false } = $$props;
|
|
12922
|
+
let { colors: colors2 = default_colors } = $$props;
|
|
12800
12923
|
let pencil_panel;
|
|
12801
12924
|
let text_panel;
|
|
12802
12925
|
let shapes_panel;
|
|
12803
12926
|
let apps_panel;
|
|
12804
12927
|
let btn_props;
|
|
12805
12928
|
let top = writable(0);
|
|
12806
|
-
component_subscribe($$self, top, (value) => $$invalidate(
|
|
12929
|
+
component_subscribe($$self, top, (value) => $$invalidate(43, $top = value));
|
|
12807
12930
|
function scroll_up() {
|
|
12808
12931
|
set_store_value(top, $top = clamp($top - 32 - 4, 0, max_scroll), $top);
|
|
12809
12932
|
}
|
|
@@ -12837,19 +12960,19 @@ function instance67($$self, $$props, $$invalidate) {
|
|
|
12837
12960
|
function div2_binding($$value) {
|
|
12838
12961
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
12839
12962
|
pencil_panel = $$value;
|
|
12840
|
-
$$invalidate(
|
|
12963
|
+
$$invalidate(11, pencil_panel);
|
|
12841
12964
|
});
|
|
12842
12965
|
}
|
|
12843
12966
|
function div3_binding($$value) {
|
|
12844
12967
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
12845
12968
|
text_panel = $$value;
|
|
12846
|
-
$$invalidate(
|
|
12969
|
+
$$invalidate(12, text_panel);
|
|
12847
12970
|
});
|
|
12848
12971
|
}
|
|
12849
12972
|
function div6_binding($$value) {
|
|
12850
12973
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
12851
12974
|
shapes_panel = $$value;
|
|
12852
|
-
$$invalidate(
|
|
12975
|
+
$$invalidate(13, shapes_panel);
|
|
12853
12976
|
});
|
|
12854
12977
|
}
|
|
12855
12978
|
const func = (onClick) => {
|
|
@@ -12859,7 +12982,7 @@ function instance67($$self, $$props, $$invalidate) {
|
|
|
12859
12982
|
function div7_binding($$value) {
|
|
12860
12983
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
12861
12984
|
apps_panel = $$value;
|
|
12862
|
-
$$invalidate(
|
|
12985
|
+
$$invalidate(14, apps_panel);
|
|
12863
12986
|
});
|
|
12864
12987
|
}
|
|
12865
12988
|
$$self.$$set = ($$props2) => {
|
|
@@ -12874,7 +12997,7 @@ function instance67($$self, $$props, $$invalidate) {
|
|
|
12874
12997
|
if ("scroll_height" in $$props2)
|
|
12875
12998
|
$$subscribe_scroll_height($$invalidate(4, scroll_height = $$props2.scroll_height));
|
|
12876
12999
|
if ("computed_height" in $$props2)
|
|
12877
|
-
$$invalidate(
|
|
13000
|
+
$$invalidate(33, computed_height = $$props2.computed_height);
|
|
12878
13001
|
if ("scrollable" in $$props2)
|
|
12879
13002
|
$$invalidate(5, scrollable = $$props2.scrollable);
|
|
12880
13003
|
if ("placement" in $$props2)
|
|
@@ -12883,11 +13006,13 @@ function instance67($$self, $$props, $$invalidate) {
|
|
|
12883
13006
|
$$invalidate(7, items = $$props2.items);
|
|
12884
13007
|
if ("hide_apps" in $$props2)
|
|
12885
13008
|
$$invalidate(8, hide_apps = $$props2.hide_apps);
|
|
13009
|
+
if ("colors" in $$props2)
|
|
13010
|
+
$$invalidate(9, colors2 = $$props2.colors);
|
|
12886
13011
|
};
|
|
12887
13012
|
$$self.$$.update = () => {
|
|
12888
13013
|
if ($$self.$$.dirty[0] & /*theme, disabled, placement*/
|
|
12889
13014
|
74) {
|
|
12890
|
-
$$invalidate(
|
|
13015
|
+
$$invalidate(15, btn_props = {
|
|
12891
13016
|
name: name5,
|
|
12892
13017
|
theme,
|
|
12893
13018
|
disabled,
|
|
@@ -12897,16 +13022,16 @@ function instance67($$self, $$props, $$invalidate) {
|
|
|
12897
13022
|
}
|
|
12898
13023
|
if ($$self.$$.dirty[0] & /*language*/
|
|
12899
13024
|
4) {
|
|
12900
|
-
$$invalidate(
|
|
13025
|
+
$$invalidate(10, t = i18n4[language]);
|
|
12901
13026
|
}
|
|
12902
13027
|
if ($$self.$$.dirty[0] & /*app*/
|
|
12903
13028
|
1) {
|
|
12904
|
-
$$invalidate(
|
|
13029
|
+
$$invalidate(34, hotkeys = app == null ? void 0 : app.hotKeys);
|
|
12905
13030
|
}
|
|
12906
13031
|
if ($$self.$$.dirty[0] & /*t*/
|
|
12907
|
-
|
|
12908
|
-
|
|
12909
|
-
$$invalidate(
|
|
13032
|
+
1024 | $$self.$$.dirty[1] & /*hotkeys*/
|
|
13033
|
+
8) {
|
|
13034
|
+
$$invalidate(19, c = {
|
|
12910
13035
|
clicker: tooltip(t.clicker, hotkeys == null ? void 0 : hotkeys.changeToClick),
|
|
12911
13036
|
selector: tooltip(t.selector, hotkeys == null ? void 0 : hotkeys.changeToSelector),
|
|
12912
13037
|
pencil: tooltip(t.pencil, hotkeys == null ? void 0 : hotkeys.changeToPencil),
|
|
@@ -12918,19 +13043,19 @@ function instance67($$self, $$props, $$invalidate) {
|
|
|
12918
13043
|
}
|
|
12919
13044
|
if ($$self.$$.dirty[0] & /*app*/
|
|
12920
13045
|
1) {
|
|
12921
|
-
$$subscribe_memberState($$invalidate(
|
|
13046
|
+
$$subscribe_memberState($$invalidate(18, memberState = app == null ? void 0 : app.memberState));
|
|
12922
13047
|
}
|
|
12923
13048
|
if ($$self.$$.dirty[1] & /*$memberState*/
|
|
12924
|
-
|
|
12925
|
-
$$invalidate(
|
|
13049
|
+
32) {
|
|
13050
|
+
$$invalidate(17, appliance = $memberState == null ? void 0 : $memberState.currentApplianceName);
|
|
12926
13051
|
}
|
|
12927
13052
|
if ($$self.$$.dirty[0] & /*app*/
|
|
12928
13053
|
1) {
|
|
12929
|
-
$$subscribe_status($$invalidate(
|
|
13054
|
+
$$subscribe_status($$invalidate(16, status = app == null ? void 0 : app.appsStatus));
|
|
12930
13055
|
}
|
|
12931
13056
|
if ($$self.$$.dirty[0] & /*scrollable*/
|
|
12932
13057
|
32 | $$self.$$.dirty[1] & /*$scroll_height, computed_height*/
|
|
12933
|
-
|
|
13058
|
+
20) {
|
|
12934
13059
|
max_scroll = scrollable ? $scroll_height + (32 + 8) * 2 - computed_height : 0;
|
|
12935
13060
|
}
|
|
12936
13061
|
};
|
|
@@ -12944,6 +13069,7 @@ function instance67($$self, $$props, $$invalidate) {
|
|
|
12944
13069
|
placement,
|
|
12945
13070
|
items,
|
|
12946
13071
|
hide_apps,
|
|
13072
|
+
colors2,
|
|
12947
13073
|
t,
|
|
12948
13074
|
pencil_panel,
|
|
12949
13075
|
text_panel,
|
|
@@ -12993,11 +13119,12 @@ var Contents = class extends SvelteComponent {
|
|
|
12993
13119
|
language: 2,
|
|
12994
13120
|
disabled: 3,
|
|
12995
13121
|
scroll_height: 4,
|
|
12996
|
-
computed_height:
|
|
13122
|
+
computed_height: 33,
|
|
12997
13123
|
scrollable: 5,
|
|
12998
13124
|
placement: 6,
|
|
12999
13125
|
items: 7,
|
|
13000
|
-
hide_apps: 8
|
|
13126
|
+
hide_apps: 8,
|
|
13127
|
+
colors: 9
|
|
13001
13128
|
},
|
|
13002
13129
|
null,
|
|
13003
13130
|
[-1, -1]
|
|
@@ -13096,30 +13223,34 @@ function create_fragment68(ctx) {
|
|
|
13096
13223
|
),
|
|
13097
13224
|
disabled: (
|
|
13098
13225
|
/*disabled*/
|
|
13099
|
-
ctx[
|
|
13226
|
+
ctx[10]
|
|
13100
13227
|
),
|
|
13101
13228
|
scroll_height: (
|
|
13102
13229
|
/*scroll_height*/
|
|
13103
|
-
ctx[
|
|
13230
|
+
ctx[14]
|
|
13104
13231
|
),
|
|
13105
13232
|
computed_height: (
|
|
13106
13233
|
/*computed_height*/
|
|
13107
|
-
ctx[
|
|
13234
|
+
ctx[9]
|
|
13108
13235
|
),
|
|
13109
13236
|
scrollable: (
|
|
13110
13237
|
/*scrollable*/
|
|
13111
|
-
ctx[
|
|
13238
|
+
ctx[8]
|
|
13112
13239
|
),
|
|
13113
13240
|
placement: (
|
|
13114
13241
|
/*placement*/
|
|
13115
|
-
ctx[
|
|
13242
|
+
ctx[7]
|
|
13116
13243
|
),
|
|
13117
13244
|
items: (
|
|
13118
13245
|
/*items*/
|
|
13119
|
-
ctx[
|
|
13246
|
+
ctx[6]
|
|
13120
13247
|
),
|
|
13121
13248
|
hide_apps: (
|
|
13122
13249
|
/*hide_apps*/
|
|
13250
|
+
ctx[5]
|
|
13251
|
+
),
|
|
13252
|
+
colors: (
|
|
13253
|
+
/*colors*/
|
|
13123
13254
|
ctx[4]
|
|
13124
13255
|
)
|
|
13125
13256
|
}
|
|
@@ -13153,9 +13284,9 @@ function create_fragment68(ctx) {
|
|
|
13153
13284
|
div0,
|
|
13154
13285
|
"height",
|
|
13155
13286
|
/*scrollable*/
|
|
13156
|
-
ctx[
|
|
13287
|
+
ctx[8] ? (
|
|
13157
13288
|
/*computed_height*/
|
|
13158
|
-
ctx[
|
|
13289
|
+
ctx[9] + "px"
|
|
13159
13290
|
) : "auto"
|
|
13160
13291
|
);
|
|
13161
13292
|
attr(input, "type", "checkbox");
|
|
@@ -13201,13 +13332,13 @@ function create_fragment68(ctx) {
|
|
|
13201
13332
|
input,
|
|
13202
13333
|
"change",
|
|
13203
13334
|
/*input_change_handler*/
|
|
13204
|
-
ctx[
|
|
13335
|
+
ctx[20]
|
|
13205
13336
|
),
|
|
13206
13337
|
action_destroyer(height.call(
|
|
13207
13338
|
null,
|
|
13208
13339
|
div1,
|
|
13209
13340
|
/*container_height*/
|
|
13210
|
-
ctx[
|
|
13341
|
+
ctx[13]
|
|
13211
13342
|
))
|
|
13212
13343
|
];
|
|
13213
13344
|
mounted = true;
|
|
@@ -13228,28 +13359,32 @@ function create_fragment68(ctx) {
|
|
|
13228
13359
|
contents_changes.language = /*language*/
|
|
13229
13360
|
ctx2[2];
|
|
13230
13361
|
if (dirty & /*disabled*/
|
|
13231
|
-
|
|
13362
|
+
1024)
|
|
13232
13363
|
contents_changes.disabled = /*disabled*/
|
|
13233
|
-
ctx2[
|
|
13364
|
+
ctx2[10];
|
|
13234
13365
|
if (dirty & /*computed_height*/
|
|
13235
|
-
|
|
13366
|
+
512)
|
|
13236
13367
|
contents_changes.computed_height = /*computed_height*/
|
|
13237
|
-
ctx2[
|
|
13368
|
+
ctx2[9];
|
|
13238
13369
|
if (dirty & /*scrollable*/
|
|
13239
|
-
|
|
13370
|
+
256)
|
|
13240
13371
|
contents_changes.scrollable = /*scrollable*/
|
|
13241
|
-
ctx2[
|
|
13372
|
+
ctx2[8];
|
|
13242
13373
|
if (dirty & /*placement*/
|
|
13243
|
-
|
|
13374
|
+
128)
|
|
13244
13375
|
contents_changes.placement = /*placement*/
|
|
13245
|
-
ctx2[
|
|
13376
|
+
ctx2[7];
|
|
13246
13377
|
if (dirty & /*items*/
|
|
13247
|
-
|
|
13378
|
+
64)
|
|
13248
13379
|
contents_changes.items = /*items*/
|
|
13249
|
-
ctx2[
|
|
13380
|
+
ctx2[6];
|
|
13250
13381
|
if (dirty & /*hide_apps*/
|
|
13251
|
-
|
|
13382
|
+
32)
|
|
13252
13383
|
contents_changes.hide_apps = /*hide_apps*/
|
|
13384
|
+
ctx2[5];
|
|
13385
|
+
if (dirty & /*colors*/
|
|
13386
|
+
16)
|
|
13387
|
+
contents_changes.colors = /*colors*/
|
|
13253
13388
|
ctx2[4];
|
|
13254
13389
|
contents.$set(contents_changes);
|
|
13255
13390
|
if (!current || dirty & /*theme*/
|
|
@@ -13258,14 +13393,14 @@ function create_fragment68(ctx) {
|
|
|
13258
13393
|
attr(div0, "class", div0_class_value);
|
|
13259
13394
|
}
|
|
13260
13395
|
if (dirty & /*scrollable, computed_height*/
|
|
13261
|
-
|
|
13396
|
+
768) {
|
|
13262
13397
|
set_style(
|
|
13263
13398
|
div0,
|
|
13264
13399
|
"height",
|
|
13265
13400
|
/*scrollable*/
|
|
13266
|
-
ctx2[
|
|
13401
|
+
ctx2[8] ? (
|
|
13267
13402
|
/*computed_height*/
|
|
13268
|
-
ctx2[
|
|
13403
|
+
ctx2[9] + "px"
|
|
13269
13404
|
) : "auto"
|
|
13270
13405
|
);
|
|
13271
13406
|
}
|
|
@@ -13334,10 +13469,11 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
13334
13469
|
let placement;
|
|
13335
13470
|
let items;
|
|
13336
13471
|
let hide_apps;
|
|
13472
|
+
let colors2;
|
|
13337
13473
|
let $container_height;
|
|
13338
13474
|
let $scroll_height;
|
|
13339
|
-
let $phase, $$unsubscribe_phase = noop, $$subscribe_phase = () => ($$unsubscribe_phase(), $$unsubscribe_phase = subscribe(phase, ($$value) => $$invalidate(
|
|
13340
|
-
let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(
|
|
13475
|
+
let $phase, $$unsubscribe_phase = noop, $$subscribe_phase = () => ($$unsubscribe_phase(), $$unsubscribe_phase = subscribe(phase, ($$value) => $$invalidate(18, $phase = $$value)), phase);
|
|
13476
|
+
let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(19, $writable = $$value)), writable2);
|
|
13341
13477
|
$$self.$$.on_destroy.push(() => $$unsubscribe_phase());
|
|
13342
13478
|
$$self.$$.on_destroy.push(() => $$unsubscribe_writable());
|
|
13343
13479
|
let { app = null } = $$props;
|
|
@@ -13347,9 +13483,9 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
13347
13483
|
const extra_height = (32 + 4 + 4) * 2;
|
|
13348
13484
|
let collapsed = config.collapsed;
|
|
13349
13485
|
let container_height = writable(0);
|
|
13350
|
-
component_subscribe($$self, container_height, (value) => $$invalidate(
|
|
13486
|
+
component_subscribe($$self, container_height, (value) => $$invalidate(16, $container_height = value));
|
|
13351
13487
|
let scroll_height = writable(0);
|
|
13352
|
-
component_subscribe($$self, scroll_height, (value) => $$invalidate(
|
|
13488
|
+
component_subscribe($$self, scroll_height, (value) => $$invalidate(17, $scroll_height = value));
|
|
13353
13489
|
function input_change_handler() {
|
|
13354
13490
|
collapsed = this.checked;
|
|
13355
13491
|
$$invalidate(3, collapsed);
|
|
@@ -13362,41 +13498,45 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
13362
13498
|
if ("language" in $$props2)
|
|
13363
13499
|
$$invalidate(2, language = $$props2.language);
|
|
13364
13500
|
if ("config" in $$props2)
|
|
13365
|
-
$$invalidate(
|
|
13501
|
+
$$invalidate(15, config = $$props2.config);
|
|
13366
13502
|
};
|
|
13367
13503
|
$$self.$$.update = () => {
|
|
13368
13504
|
var _a;
|
|
13369
13505
|
if ($$self.$$.dirty & /*app*/
|
|
13370
13506
|
1) {
|
|
13371
|
-
$$subscribe_writable($$invalidate(
|
|
13507
|
+
$$subscribe_writable($$invalidate(12, writable2 = app == null ? void 0 : app.writable));
|
|
13372
13508
|
}
|
|
13373
13509
|
if ($$self.$$.dirty & /*app*/
|
|
13374
13510
|
1) {
|
|
13375
|
-
$$subscribe_phase($$invalidate(
|
|
13511
|
+
$$subscribe_phase($$invalidate(11, phase = app == null ? void 0 : app.phase));
|
|
13376
13512
|
}
|
|
13377
13513
|
if ($$self.$$.dirty & /*$writable, $phase*/
|
|
13378
|
-
|
|
13379
|
-
$$invalidate(
|
|
13514
|
+
786432) {
|
|
13515
|
+
$$invalidate(10, disabled = !($writable && $phase === "connected"));
|
|
13380
13516
|
}
|
|
13381
13517
|
if ($$self.$$.dirty & /*$container_height, $scroll_height*/
|
|
13382
|
-
|
|
13383
|
-
$$invalidate(
|
|
13518
|
+
196608) {
|
|
13519
|
+
$$invalidate(9, computed_height = clamp($container_height, extra_height, $scroll_height + extra_height));
|
|
13384
13520
|
}
|
|
13385
13521
|
if ($$self.$$.dirty & /*$scroll_height, $container_height*/
|
|
13386
|
-
|
|
13387
|
-
$$invalidate(
|
|
13522
|
+
196608) {
|
|
13523
|
+
$$invalidate(8, scrollable = $scroll_height + extra_height > $container_height);
|
|
13388
13524
|
}
|
|
13389
13525
|
if ($$self.$$.dirty & /*config*/
|
|
13390
|
-
|
|
13391
|
-
$$invalidate(
|
|
13526
|
+
32768) {
|
|
13527
|
+
$$invalidate(7, placement = config.placement || "left");
|
|
13392
13528
|
}
|
|
13393
13529
|
if ($$self.$$.dirty & /*config*/
|
|
13394
|
-
|
|
13395
|
-
$$invalidate(
|
|
13530
|
+
32768) {
|
|
13531
|
+
$$invalidate(6, items = config.items || default_items);
|
|
13396
13532
|
}
|
|
13397
13533
|
if ($$self.$$.dirty & /*config*/
|
|
13398
|
-
|
|
13399
|
-
$$invalidate(
|
|
13534
|
+
32768) {
|
|
13535
|
+
$$invalidate(5, hide_apps = ((_a = config.apps) == null ? void 0 : _a.enable) === false);
|
|
13536
|
+
}
|
|
13537
|
+
if ($$self.$$.dirty & /*config*/
|
|
13538
|
+
32768) {
|
|
13539
|
+
$$invalidate(4, colors2 = (config == null ? void 0 : config.colors) && config.colors.length && config.colors || default_colors);
|
|
13400
13540
|
}
|
|
13401
13541
|
};
|
|
13402
13542
|
return [
|
|
@@ -13404,6 +13544,7 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
13404
13544
|
theme,
|
|
13405
13545
|
language,
|
|
13406
13546
|
collapsed,
|
|
13547
|
+
colors2,
|
|
13407
13548
|
hide_apps,
|
|
13408
13549
|
items,
|
|
13409
13550
|
placement,
|
|
@@ -13429,7 +13570,7 @@ var Toolbar = class extends SvelteComponent {
|
|
|
13429
13570
|
app: 0,
|
|
13430
13571
|
theme: 1,
|
|
13431
13572
|
language: 2,
|
|
13432
|
-
config:
|
|
13573
|
+
config: 15
|
|
13433
13574
|
});
|
|
13434
13575
|
}
|
|
13435
13576
|
};
|
|
@@ -14797,19 +14938,19 @@ function create_if_block_32(ctx) {
|
|
|
14797
14938
|
props: {
|
|
14798
14939
|
app: (
|
|
14799
14940
|
/*app*/
|
|
14800
|
-
ctx[
|
|
14941
|
+
ctx[1]
|
|
14801
14942
|
),
|
|
14802
14943
|
theme: (
|
|
14803
14944
|
/*theme*/
|
|
14804
|
-
ctx[
|
|
14945
|
+
ctx[2]
|
|
14805
14946
|
),
|
|
14806
14947
|
language: (
|
|
14807
14948
|
/*language*/
|
|
14808
|
-
ctx[
|
|
14949
|
+
ctx[3]
|
|
14809
14950
|
),
|
|
14810
14951
|
config: (
|
|
14811
14952
|
/*config*/
|
|
14812
|
-
ctx[
|
|
14953
|
+
ctx[0].toolbar || {}
|
|
14813
14954
|
)
|
|
14814
14955
|
}
|
|
14815
14956
|
});
|
|
@@ -14824,21 +14965,21 @@ function create_if_block_32(ctx) {
|
|
|
14824
14965
|
p(ctx2, dirty) {
|
|
14825
14966
|
const toolbar_changes = {};
|
|
14826
14967
|
if (dirty & /*app*/
|
|
14827
|
-
|
|
14968
|
+
2)
|
|
14828
14969
|
toolbar_changes.app = /*app*/
|
|
14829
|
-
ctx2[
|
|
14970
|
+
ctx2[1];
|
|
14830
14971
|
if (dirty & /*theme*/
|
|
14831
|
-
|
|
14972
|
+
4)
|
|
14832
14973
|
toolbar_changes.theme = /*theme*/
|
|
14833
|
-
ctx2[
|
|
14974
|
+
ctx2[2];
|
|
14834
14975
|
if (dirty & /*language*/
|
|
14835
|
-
|
|
14976
|
+
8)
|
|
14836
14977
|
toolbar_changes.language = /*language*/
|
|
14837
|
-
ctx2[
|
|
14978
|
+
ctx2[3];
|
|
14838
14979
|
if (dirty & /*config*/
|
|
14839
|
-
|
|
14980
|
+
1)
|
|
14840
14981
|
toolbar_changes.config = /*config*/
|
|
14841
|
-
ctx2[
|
|
14982
|
+
ctx2[0].toolbar || {};
|
|
14842
14983
|
toolbar.$set(toolbar_changes);
|
|
14843
14984
|
},
|
|
14844
14985
|
i(local) {
|
|
@@ -14863,15 +15004,15 @@ function create_if_block_23(ctx) {
|
|
|
14863
15004
|
props: {
|
|
14864
15005
|
app: (
|
|
14865
15006
|
/*app*/
|
|
14866
|
-
ctx[
|
|
15007
|
+
ctx[1]
|
|
14867
15008
|
),
|
|
14868
15009
|
theme: (
|
|
14869
15010
|
/*theme*/
|
|
14870
|
-
ctx[
|
|
15011
|
+
ctx[2]
|
|
14871
15012
|
),
|
|
14872
15013
|
language: (
|
|
14873
15014
|
/*language*/
|
|
14874
|
-
ctx[
|
|
15015
|
+
ctx[3]
|
|
14875
15016
|
)
|
|
14876
15017
|
}
|
|
14877
15018
|
});
|
|
@@ -14886,17 +15027,17 @@ function create_if_block_23(ctx) {
|
|
|
14886
15027
|
p(ctx2, dirty) {
|
|
14887
15028
|
const redoundo_changes = {};
|
|
14888
15029
|
if (dirty & /*app*/
|
|
14889
|
-
|
|
15030
|
+
2)
|
|
14890
15031
|
redoundo_changes.app = /*app*/
|
|
14891
|
-
ctx2[
|
|
15032
|
+
ctx2[1];
|
|
14892
15033
|
if (dirty & /*theme*/
|
|
14893
|
-
|
|
15034
|
+
4)
|
|
14894
15035
|
redoundo_changes.theme = /*theme*/
|
|
14895
|
-
ctx2[
|
|
15036
|
+
ctx2[2];
|
|
14896
15037
|
if (dirty & /*language*/
|
|
14897
|
-
|
|
15038
|
+
8)
|
|
14898
15039
|
redoundo_changes.language = /*language*/
|
|
14899
|
-
ctx2[
|
|
15040
|
+
ctx2[3];
|
|
14900
15041
|
redoundo.$set(redoundo_changes);
|
|
14901
15042
|
},
|
|
14902
15043
|
i(local) {
|
|
@@ -14921,15 +15062,15 @@ function create_if_block_14(ctx) {
|
|
|
14921
15062
|
props: {
|
|
14922
15063
|
app: (
|
|
14923
15064
|
/*app*/
|
|
14924
|
-
ctx[
|
|
15065
|
+
ctx[1]
|
|
14925
15066
|
),
|
|
14926
15067
|
theme: (
|
|
14927
15068
|
/*theme*/
|
|
14928
|
-
ctx[
|
|
15069
|
+
ctx[2]
|
|
14929
15070
|
),
|
|
14930
15071
|
language: (
|
|
14931
15072
|
/*language*/
|
|
14932
|
-
ctx[
|
|
15073
|
+
ctx[3]
|
|
14933
15074
|
)
|
|
14934
15075
|
}
|
|
14935
15076
|
});
|
|
@@ -14944,17 +15085,17 @@ function create_if_block_14(ctx) {
|
|
|
14944
15085
|
p(ctx2, dirty) {
|
|
14945
15086
|
const zoomcontrol_changes = {};
|
|
14946
15087
|
if (dirty & /*app*/
|
|
14947
|
-
|
|
15088
|
+
2)
|
|
14948
15089
|
zoomcontrol_changes.app = /*app*/
|
|
14949
|
-
ctx2[
|
|
15090
|
+
ctx2[1];
|
|
14950
15091
|
if (dirty & /*theme*/
|
|
14951
|
-
|
|
15092
|
+
4)
|
|
14952
15093
|
zoomcontrol_changes.theme = /*theme*/
|
|
14953
|
-
ctx2[
|
|
15094
|
+
ctx2[2];
|
|
14954
15095
|
if (dirty & /*language*/
|
|
14955
|
-
|
|
15096
|
+
8)
|
|
14956
15097
|
zoomcontrol_changes.language = /*language*/
|
|
14957
|
-
ctx2[
|
|
15098
|
+
ctx2[3];
|
|
14958
15099
|
zoomcontrol.$set(zoomcontrol_changes);
|
|
14959
15100
|
},
|
|
14960
15101
|
i(local) {
|
|
@@ -14979,15 +15120,15 @@ function create_if_block18(ctx) {
|
|
|
14979
15120
|
props: {
|
|
14980
15121
|
app: (
|
|
14981
15122
|
/*app*/
|
|
14982
|
-
ctx[
|
|
15123
|
+
ctx[1]
|
|
14983
15124
|
),
|
|
14984
15125
|
theme: (
|
|
14985
15126
|
/*theme*/
|
|
14986
|
-
ctx[
|
|
15127
|
+
ctx[2]
|
|
14987
15128
|
),
|
|
14988
15129
|
language: (
|
|
14989
15130
|
/*language*/
|
|
14990
|
-
ctx[
|
|
15131
|
+
ctx[3]
|
|
14991
15132
|
)
|
|
14992
15133
|
}
|
|
14993
15134
|
});
|
|
@@ -15002,17 +15143,17 @@ function create_if_block18(ctx) {
|
|
|
15002
15143
|
p(ctx2, dirty) {
|
|
15003
15144
|
const pagecontrol_changes = {};
|
|
15004
15145
|
if (dirty & /*app*/
|
|
15005
|
-
|
|
15146
|
+
2)
|
|
15006
15147
|
pagecontrol_changes.app = /*app*/
|
|
15007
|
-
ctx2[
|
|
15148
|
+
ctx2[1];
|
|
15008
15149
|
if (dirty & /*theme*/
|
|
15009
|
-
|
|
15150
|
+
4)
|
|
15010
15151
|
pagecontrol_changes.theme = /*theme*/
|
|
15011
|
-
ctx2[
|
|
15152
|
+
ctx2[2];
|
|
15012
15153
|
if (dirty & /*language*/
|
|
15013
|
-
|
|
15154
|
+
8)
|
|
15014
15155
|
pagecontrol_changes.language = /*language*/
|
|
15015
|
-
ctx2[
|
|
15156
|
+
ctx2[3];
|
|
15016
15157
|
pagecontrol.$set(pagecontrol_changes);
|
|
15017
15158
|
},
|
|
15018
15159
|
i(local) {
|
|
@@ -15047,19 +15188,19 @@ function create_fragment71(ctx) {
|
|
|
15047
15188
|
let dispose;
|
|
15048
15189
|
let if_block0 = (
|
|
15049
15190
|
/*config*/
|
|
15050
|
-
((_a = ctx[
|
|
15191
|
+
((_a = ctx[0].toolbar) == null ? void 0 : _a.enable) !== false && create_if_block_32(ctx)
|
|
15051
15192
|
);
|
|
15052
15193
|
let if_block1 = (
|
|
15053
15194
|
/*config*/
|
|
15054
|
-
((_b = ctx[
|
|
15195
|
+
((_b = ctx[0].redo_undo) == null ? void 0 : _b.enable) !== false && create_if_block_23(ctx)
|
|
15055
15196
|
);
|
|
15056
15197
|
let if_block2 = (
|
|
15057
15198
|
/*config*/
|
|
15058
|
-
((_c = ctx[
|
|
15199
|
+
((_c = ctx[0].zoom_control) == null ? void 0 : _c.enable) !== false && create_if_block_14(ctx)
|
|
15059
15200
|
);
|
|
15060
15201
|
let if_block3 = (
|
|
15061
15202
|
/*config*/
|
|
15062
|
-
((_d = ctx[
|
|
15203
|
+
((_d = ctx[0].page_control) == null ? void 0 : _d.enable) !== false && create_if_block18(ctx)
|
|
15063
15204
|
);
|
|
15064
15205
|
return {
|
|
15065
15206
|
c() {
|
|
@@ -15083,7 +15224,7 @@ function create_fragment71(ctx) {
|
|
|
15083
15224
|
if_block3.c();
|
|
15084
15225
|
attr(div0, "class", name9 + "-view");
|
|
15085
15226
|
attr(div1, "class", div1_class_value = name9 + "-" + /*config*/
|
|
15086
|
-
(((_a2 = ctx[
|
|
15227
|
+
(((_a2 = ctx[0].toolbar) == null ? void 0 : _a2.placement) || "left"));
|
|
15087
15228
|
toggle_class(div1, "hidden", !/*toolbar_has_items*/
|
|
15088
15229
|
ctx[6] || !/*layout*/
|
|
15089
15230
|
(ctx[5] === "visible" || /*layout*/
|
|
@@ -15104,12 +15245,12 @@ function create_fragment71(ctx) {
|
|
|
15104
15245
|
);
|
|
15105
15246
|
attr(div4, "class", name9 + "-root");
|
|
15106
15247
|
toggle_class(div4, "loading", !/*app*/
|
|
15107
|
-
ctx[
|
|
15248
|
+
ctx[1]);
|
|
15108
15249
|
},
|
|
15109
15250
|
m(target, anchor) {
|
|
15110
15251
|
insert(target, div4, anchor);
|
|
15111
15252
|
append(div4, div0);
|
|
15112
|
-
ctx[
|
|
15253
|
+
ctx[19](div0);
|
|
15113
15254
|
append(div4, t0);
|
|
15114
15255
|
append(div4, div1);
|
|
15115
15256
|
if (if_block0)
|
|
@@ -15141,12 +15282,12 @@ function create_fragment71(ctx) {
|
|
|
15141
15282
|
var _a2, _b2, _c2, _d2, _e;
|
|
15142
15283
|
if (
|
|
15143
15284
|
/*config*/
|
|
15144
|
-
((_a2 = ctx2[
|
|
15285
|
+
((_a2 = ctx2[0].toolbar) == null ? void 0 : _a2.enable) !== false
|
|
15145
15286
|
) {
|
|
15146
15287
|
if (if_block0) {
|
|
15147
15288
|
if_block0.p(ctx2, dirty);
|
|
15148
15289
|
if (dirty & /*config*/
|
|
15149
|
-
|
|
15290
|
+
1) {
|
|
15150
15291
|
transition_in(if_block0, 1);
|
|
15151
15292
|
}
|
|
15152
15293
|
} else {
|
|
@@ -15163,12 +15304,12 @@ function create_fragment71(ctx) {
|
|
|
15163
15304
|
check_outros();
|
|
15164
15305
|
}
|
|
15165
15306
|
if (!current || dirty & /*config*/
|
|
15166
|
-
|
|
15167
|
-
(((_b2 = ctx2[
|
|
15307
|
+
1 && div1_class_value !== (div1_class_value = name9 + "-" + /*config*/
|
|
15308
|
+
(((_b2 = ctx2[0].toolbar) == null ? void 0 : _b2.placement) || "left"))) {
|
|
15168
15309
|
attr(div1, "class", div1_class_value);
|
|
15169
15310
|
}
|
|
15170
15311
|
if (!current || dirty & /*config, toolbar_has_items, layout*/
|
|
15171
|
-
|
|
15312
|
+
97) {
|
|
15172
15313
|
toggle_class(div1, "hidden", !/*toolbar_has_items*/
|
|
15173
15314
|
ctx2[6] || !/*layout*/
|
|
15174
15315
|
(ctx2[5] === "visible" || /*layout*/
|
|
@@ -15176,12 +15317,12 @@ function create_fragment71(ctx) {
|
|
|
15176
15317
|
}
|
|
15177
15318
|
if (
|
|
15178
15319
|
/*config*/
|
|
15179
|
-
((_c2 = ctx2[
|
|
15320
|
+
((_c2 = ctx2[0].redo_undo) == null ? void 0 : _c2.enable) !== false
|
|
15180
15321
|
) {
|
|
15181
15322
|
if (if_block1) {
|
|
15182
15323
|
if_block1.p(ctx2, dirty);
|
|
15183
15324
|
if (dirty & /*config*/
|
|
15184
|
-
|
|
15325
|
+
1) {
|
|
15185
15326
|
transition_in(if_block1, 1);
|
|
15186
15327
|
}
|
|
15187
15328
|
} else {
|
|
@@ -15199,12 +15340,12 @@ function create_fragment71(ctx) {
|
|
|
15199
15340
|
}
|
|
15200
15341
|
if (
|
|
15201
15342
|
/*config*/
|
|
15202
|
-
((_d2 = ctx2[
|
|
15343
|
+
((_d2 = ctx2[0].zoom_control) == null ? void 0 : _d2.enable) !== false
|
|
15203
15344
|
) {
|
|
15204
15345
|
if (if_block2) {
|
|
15205
15346
|
if_block2.p(ctx2, dirty);
|
|
15206
15347
|
if (dirty & /*config*/
|
|
15207
|
-
|
|
15348
|
+
1) {
|
|
15208
15349
|
transition_in(if_block2, 1);
|
|
15209
15350
|
}
|
|
15210
15351
|
} else {
|
|
@@ -15231,12 +15372,12 @@ function create_fragment71(ctx) {
|
|
|
15231
15372
|
}
|
|
15232
15373
|
if (
|
|
15233
15374
|
/*config*/
|
|
15234
|
-
((_e = ctx2[
|
|
15375
|
+
((_e = ctx2[0].page_control) == null ? void 0 : _e.enable) !== false
|
|
15235
15376
|
) {
|
|
15236
15377
|
if (if_block3) {
|
|
15237
15378
|
if_block3.p(ctx2, dirty);
|
|
15238
15379
|
if (dirty & /*config*/
|
|
15239
|
-
|
|
15380
|
+
1) {
|
|
15240
15381
|
transition_in(if_block3, 1);
|
|
15241
15382
|
}
|
|
15242
15383
|
} else {
|
|
@@ -15262,9 +15403,9 @@ function create_fragment71(ctx) {
|
|
|
15262
15403
|
);
|
|
15263
15404
|
}
|
|
15264
15405
|
if (!current || dirty & /*app*/
|
|
15265
|
-
|
|
15406
|
+
2) {
|
|
15266
15407
|
toggle_class(div4, "loading", !/*app*/
|
|
15267
|
-
ctx2[
|
|
15408
|
+
ctx2[1]);
|
|
15268
15409
|
}
|
|
15269
15410
|
},
|
|
15270
15411
|
i(local) {
|
|
@@ -15286,7 +15427,7 @@ function create_fragment71(ctx) {
|
|
|
15286
15427
|
d(detaching) {
|
|
15287
15428
|
if (detaching)
|
|
15288
15429
|
detach(div4);
|
|
15289
|
-
ctx[
|
|
15430
|
+
ctx[19](null);
|
|
15290
15431
|
if (if_block0)
|
|
15291
15432
|
if_block0.d();
|
|
15292
15433
|
if (if_block1)
|
|
@@ -15302,13 +15443,15 @@ function create_fragment71(ctx) {
|
|
|
15302
15443
|
}
|
|
15303
15444
|
var name9 = "fastboard";
|
|
15304
15445
|
function instance71($$self, $$props, $$invalidate) {
|
|
15446
|
+
let manager;
|
|
15447
|
+
let room;
|
|
15305
15448
|
let writable2;
|
|
15306
15449
|
let boxState;
|
|
15307
15450
|
let focusedApp;
|
|
15308
15451
|
let toolbar_has_items;
|
|
15309
|
-
let $focusedApp, $$unsubscribe_focusedApp = noop, $$subscribe_focusedApp = () => ($$unsubscribe_focusedApp(), $$unsubscribe_focusedApp = subscribe(focusedApp, ($$value) => $$invalidate(
|
|
15310
|
-
let $boxState, $$unsubscribe_boxState = noop, $$subscribe_boxState = () => ($$unsubscribe_boxState(), $$unsubscribe_boxState = subscribe(boxState, ($$value) => $$invalidate(
|
|
15311
|
-
let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(
|
|
15452
|
+
let $focusedApp, $$unsubscribe_focusedApp = noop, $$subscribe_focusedApp = () => ($$unsubscribe_focusedApp(), $$unsubscribe_focusedApp = subscribe(focusedApp, ($$value) => $$invalidate(16, $focusedApp = $$value)), focusedApp);
|
|
15453
|
+
let $boxState, $$unsubscribe_boxState = noop, $$subscribe_boxState = () => ($$unsubscribe_boxState(), $$unsubscribe_boxState = subscribe(boxState, ($$value) => $$invalidate(17, $boxState = $$value)), boxState);
|
|
15454
|
+
let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(18, $writable = $$value)), writable2);
|
|
15312
15455
|
$$self.$$.on_destroy.push(() => $$unsubscribe_focusedApp());
|
|
15313
15456
|
$$self.$$.on_destroy.push(() => $$unsubscribe_boxState());
|
|
15314
15457
|
$$self.$$.on_destroy.push(() => $$unsubscribe_writable());
|
|
@@ -15317,6 +15460,7 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15317
15460
|
let { language = "en" } = $$props;
|
|
15318
15461
|
let { containerRef = void 0 } = $$props;
|
|
15319
15462
|
let { config = {} } = $$props;
|
|
15463
|
+
let { colors: colors2 = void 0 } = $$props;
|
|
15320
15464
|
const AppsShowToolbar = ["DocsViewer", "Slide"];
|
|
15321
15465
|
let container;
|
|
15322
15466
|
let layout = "hidden";
|
|
@@ -15343,31 +15487,58 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15343
15487
|
}
|
|
15344
15488
|
$$self.$$set = ($$props2) => {
|
|
15345
15489
|
if ("app" in $$props2)
|
|
15346
|
-
$$invalidate(
|
|
15490
|
+
$$invalidate(1, app = $$props2.app);
|
|
15347
15491
|
if ("theme" in $$props2)
|
|
15348
|
-
$$invalidate(
|
|
15492
|
+
$$invalidate(2, theme = $$props2.theme);
|
|
15349
15493
|
if ("language" in $$props2)
|
|
15350
|
-
$$invalidate(
|
|
15494
|
+
$$invalidate(3, language = $$props2.language);
|
|
15351
15495
|
if ("containerRef" in $$props2)
|
|
15352
|
-
$$invalidate(
|
|
15496
|
+
$$invalidate(12, containerRef = $$props2.containerRef);
|
|
15353
15497
|
if ("config" in $$props2)
|
|
15354
|
-
$$invalidate(
|
|
15498
|
+
$$invalidate(0, config = $$props2.config);
|
|
15499
|
+
if ("colors" in $$props2)
|
|
15500
|
+
$$invalidate(11, colors2 = $$props2.colors);
|
|
15355
15501
|
};
|
|
15356
15502
|
$$self.$$.update = () => {
|
|
15357
15503
|
if ($$self.$$.dirty & /*app*/
|
|
15358
|
-
|
|
15504
|
+
2) {
|
|
15505
|
+
$$invalidate(15, manager = app == null ? void 0 : app.manager);
|
|
15506
|
+
}
|
|
15507
|
+
if ($$self.$$.dirty & /*app*/
|
|
15508
|
+
2) {
|
|
15509
|
+
$$invalidate(14, room = app == null ? void 0 : app.manager.room);
|
|
15510
|
+
}
|
|
15511
|
+
if ($$self.$$.dirty & /*manager, room, config, colors*/
|
|
15512
|
+
51201) {
|
|
15513
|
+
if (manager && room) {
|
|
15514
|
+
const floatBarOptions = room.floatBarOptions;
|
|
15515
|
+
if (floatBarOptions.colors) {
|
|
15516
|
+
$$invalidate(11, colors2 = floatBarOptions.colors);
|
|
15517
|
+
}
|
|
15518
|
+
if (config == null ? void 0 : config.toolbar) {
|
|
15519
|
+
const _colors = config.toolbar.colors;
|
|
15520
|
+
if (!_colors && colors2) {
|
|
15521
|
+
$$invalidate(0, config = __spreadProps(__spreadValues({}, config), {
|
|
15522
|
+
toolbar: __spreadProps(__spreadValues({}, config.toolbar), { colors: colors2 })
|
|
15523
|
+
}));
|
|
15524
|
+
}
|
|
15525
|
+
}
|
|
15526
|
+
}
|
|
15527
|
+
}
|
|
15528
|
+
if ($$self.$$.dirty & /*app*/
|
|
15529
|
+
2) {
|
|
15359
15530
|
$$subscribe_writable($$invalidate(9, writable2 = app == null ? void 0 : app.writable));
|
|
15360
15531
|
}
|
|
15361
15532
|
if ($$self.$$.dirty & /*app*/
|
|
15362
|
-
|
|
15533
|
+
2) {
|
|
15363
15534
|
$$subscribe_boxState($$invalidate(8, boxState = app == null ? void 0 : app.boxState));
|
|
15364
15535
|
}
|
|
15365
15536
|
if ($$self.$$.dirty & /*app*/
|
|
15366
|
-
|
|
15537
|
+
2) {
|
|
15367
15538
|
$$subscribe_focusedApp($$invalidate(7, focusedApp = app == null ? void 0 : app.focusedApp));
|
|
15368
15539
|
}
|
|
15369
15540
|
if ($$self.$$.dirty & /*$writable, $boxState, $focusedApp*/
|
|
15370
|
-
|
|
15541
|
+
458752) {
|
|
15371
15542
|
if (!$writable) {
|
|
15372
15543
|
$$invalidate(5, layout = "hidden");
|
|
15373
15544
|
} else if ($boxState === "maximized") {
|
|
@@ -15381,15 +15552,15 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15381
15552
|
}
|
|
15382
15553
|
}
|
|
15383
15554
|
if ($$self.$$.dirty & /*config*/
|
|
15384
|
-
|
|
15555
|
+
1) {
|
|
15385
15556
|
$$invalidate(6, toolbar_has_items = !config.toolbar || !config.toolbar.items || !config.toolbar.apps || config.toolbar.items.length > 0 || config.toolbar.apps.enable !== false);
|
|
15386
15557
|
}
|
|
15387
15558
|
if ($$self.$$.dirty & /*app, container*/
|
|
15388
|
-
|
|
15559
|
+
18) {
|
|
15389
15560
|
try {
|
|
15390
15561
|
if (app && container) {
|
|
15391
15562
|
app.bindContainer(container);
|
|
15392
|
-
$$invalidate(
|
|
15563
|
+
$$invalidate(13, mounted = true);
|
|
15393
15564
|
}
|
|
15394
15565
|
} catch (err) {
|
|
15395
15566
|
console.error("[fastboard] An error occurred while binding container");
|
|
@@ -15397,17 +15568,17 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15397
15568
|
}
|
|
15398
15569
|
}
|
|
15399
15570
|
if ($$self.$$.dirty & /*app, theme, mounted*/
|
|
15400
|
-
|
|
15571
|
+
8198) {
|
|
15401
15572
|
if (app && theme && mounted) {
|
|
15402
15573
|
app.manager.setPrefersColorScheme(theme);
|
|
15403
15574
|
}
|
|
15404
15575
|
}
|
|
15405
15576
|
};
|
|
15406
15577
|
return [
|
|
15578
|
+
config,
|
|
15407
15579
|
app,
|
|
15408
15580
|
theme,
|
|
15409
15581
|
language,
|
|
15410
|
-
config,
|
|
15411
15582
|
container,
|
|
15412
15583
|
layout,
|
|
15413
15584
|
toolbar_has_items,
|
|
@@ -15415,8 +15586,11 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15415
15586
|
boxState,
|
|
15416
15587
|
writable2,
|
|
15417
15588
|
focus_me,
|
|
15589
|
+
colors2,
|
|
15418
15590
|
containerRef,
|
|
15419
15591
|
mounted,
|
|
15592
|
+
room,
|
|
15593
|
+
manager,
|
|
15420
15594
|
$focusedApp,
|
|
15421
15595
|
$boxState,
|
|
15422
15596
|
$writable,
|
|
@@ -15427,11 +15601,12 @@ var Fastboard = class extends SvelteComponent {
|
|
|
15427
15601
|
constructor(options) {
|
|
15428
15602
|
super();
|
|
15429
15603
|
init(this, options, instance71, create_fragment71, not_equal, {
|
|
15430
|
-
app:
|
|
15431
|
-
theme:
|
|
15432
|
-
language:
|
|
15433
|
-
containerRef:
|
|
15434
|
-
config:
|
|
15604
|
+
app: 1,
|
|
15605
|
+
theme: 2,
|
|
15606
|
+
language: 3,
|
|
15607
|
+
containerRef: 12,
|
|
15608
|
+
config: 0,
|
|
15609
|
+
colors: 11
|
|
15435
15610
|
});
|
|
15436
15611
|
}
|
|
15437
15612
|
};
|
|
@@ -15440,16 +15615,45 @@ var Fastboard_default = Fastboard;
|
|
|
15440
15615
|
// src/helpers/index.ts
|
|
15441
15616
|
function createUI(app, div) {
|
|
15442
15617
|
let fastboard;
|
|
15618
|
+
let colors2;
|
|
15619
|
+
if ((app == null ? void 0 : app.manager) && app.manager.room) {
|
|
15620
|
+
const floatBarOptions = app.manager.room.floatBarOptions;
|
|
15621
|
+
if (floatBarOptions.colors) {
|
|
15622
|
+
colors2 = floatBarOptions.colors;
|
|
15623
|
+
}
|
|
15624
|
+
}
|
|
15443
15625
|
const ui = {
|
|
15444
15626
|
mount(div2, props) {
|
|
15627
|
+
var _a;
|
|
15445
15628
|
if (fastboard) {
|
|
15446
15629
|
fastboard.$destroy();
|
|
15447
15630
|
}
|
|
15631
|
+
if ((_a = props == null ? void 0 : props.config) == null ? void 0 : _a.toolbar) {
|
|
15632
|
+
const _colors = props.config.toolbar.colors;
|
|
15633
|
+
if (!_colors && colors2) {
|
|
15634
|
+
props.config = __spreadProps(__spreadValues({}, props.config), {
|
|
15635
|
+
toolbar: __spreadProps(__spreadValues({}, props.config.toolbar), {
|
|
15636
|
+
colors: colors2
|
|
15637
|
+
})
|
|
15638
|
+
});
|
|
15639
|
+
}
|
|
15640
|
+
}
|
|
15448
15641
|
fastboard = new Fastboard_default({ target: div2, props: __spreadValues({ app }, props) });
|
|
15449
15642
|
return ui;
|
|
15450
15643
|
},
|
|
15451
15644
|
update(props) {
|
|
15645
|
+
var _a;
|
|
15452
15646
|
if (fastboard && props) {
|
|
15647
|
+
if ((_a = props == null ? void 0 : props.config) == null ? void 0 : _a.toolbar) {
|
|
15648
|
+
const _colors = props.config.toolbar.colors;
|
|
15649
|
+
if (!_colors && colors2) {
|
|
15650
|
+
props.config = __spreadProps(__spreadValues({}, props.config), {
|
|
15651
|
+
toolbar: __spreadProps(__spreadValues({}, props.config.toolbar), {
|
|
15652
|
+
colors: colors2
|
|
15653
|
+
})
|
|
15654
|
+
});
|
|
15655
|
+
}
|
|
15656
|
+
}
|
|
15453
15657
|
fastboard.$set(props);
|
|
15454
15658
|
}
|
|
15455
15659
|
},
|