@netless/fastboard-ui 0.3.21 → 0.3.22-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/full.d.ts +178 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +552 -382
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +552 -382
- package/dist/index.mjs.map +1 -1
- package/dist/index.svelte.mjs +553 -379
- package/dist/index.svelte.mjs.map +1 -1
- package/dist/lite.d.ts +3 -1
- package/package.json +3 -3
- 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.svelte.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SvelteComponent, init, safe_not_equal, not_equal, element, create_component, space, attr, insert, mount_component, append, transition_in, transition_out, detach, destroy_component, svg_element, set_style, toggle_class, listen, action_destroyer, run_all, component_subscribe, group_outros, check_outros, update_keyed_each, outro_and_destroy_block, noop, subscribe, empty, text, set_data, binding_callbacks, is_function, destroy_each, bubble, assign, get_spread_update, get_spread_object, src_url_equal, set_store_value, create_slot, update_slot_base, get_all_dirty_from_scope, get_slot_changes, set_input_value, to_number,
|
|
1
|
+
import { SvelteComponent, init, safe_not_equal, not_equal, element, create_component, space, attr, insert, mount_component, append, transition_in, transition_out, detach, destroy_component, svg_element, set_style, toggle_class, listen, action_destroyer, run_all, component_subscribe, group_outros, check_outros, update_keyed_each, outro_and_destroy_block, noop, subscribe, empty, text, set_data, binding_callbacks, is_function, destroy_each, bubble, assign, get_spread_update, get_spread_object, src_url_equal, set_store_value, create_slot, update_slot_base, get_all_dirty_from_scope, get_slot_changes, set_input_value, to_number, construct_svelte_component } from 'svelte/internal';
|
|
2
2
|
export { SvelteComponentTyped } from 'svelte/internal';
|
|
3
3
|
import Tippy from 'tippy.js';
|
|
4
4
|
import { writable } from 'svelte/store';
|
|
@@ -6364,6 +6364,7 @@ var colors = {
|
|
|
6364
6364
|
"#B620E0": [182, 32, 224],
|
|
6365
6365
|
"#6D7278": [109, 114, 120]
|
|
6366
6366
|
};
|
|
6367
|
+
var default_colors = Object.values(colors);
|
|
6367
6368
|
var shapes = [
|
|
6368
6369
|
"rectangle",
|
|
6369
6370
|
"ellipse",
|
|
@@ -6421,7 +6422,6 @@ var i18n4 = {
|
|
|
6421
6422
|
laserPointer: "\u6FC0\u5149\u7B14"
|
|
6422
6423
|
}
|
|
6423
6424
|
};
|
|
6424
|
-
var colorKeys = Object.keys(colors);
|
|
6425
6425
|
|
|
6426
6426
|
// src/actions/scroll.ts
|
|
6427
6427
|
var scrollTop = function(node, value) {
|
|
@@ -6542,6 +6542,20 @@ function tooltip(text4, hotkey) {
|
|
|
6542
6542
|
append(outer, hotkey_span);
|
|
6543
6543
|
return outer;
|
|
6544
6544
|
}
|
|
6545
|
+
function rgbToHex(r, g, b) {
|
|
6546
|
+
const hex = ((r << 16) + (g << 8) + b).toString(16).padStart(6, "0");
|
|
6547
|
+
return "#" + hex;
|
|
6548
|
+
}
|
|
6549
|
+
function hexToRgb(hex) {
|
|
6550
|
+
hex = hex.replace(/^#/, "");
|
|
6551
|
+
if (hex.length !== 6) {
|
|
6552
|
+
throw new Error("Invalid hex color");
|
|
6553
|
+
}
|
|
6554
|
+
const r = parseInt(hex.slice(0, 2), 16);
|
|
6555
|
+
const g = parseInt(hex.slice(2, 4), 16);
|
|
6556
|
+
const b = parseInt(hex.slice(4, 6), 16);
|
|
6557
|
+
return [r, g, b];
|
|
6558
|
+
}
|
|
6545
6559
|
function create_fragment53(ctx) {
|
|
6546
6560
|
let div;
|
|
6547
6561
|
let input;
|
|
@@ -6953,70 +6967,93 @@ var StrokeWidth = class extends SvelteComponent {
|
|
|
6953
6967
|
var StrokeWidth_default = StrokeWidth;
|
|
6954
6968
|
function get_each_context(ctx, list, i) {
|
|
6955
6969
|
const child_ctx = ctx.slice();
|
|
6956
|
-
child_ctx[
|
|
6970
|
+
child_ctx[8] = list[i];
|
|
6957
6971
|
return child_ctx;
|
|
6958
6972
|
}
|
|
6959
|
-
function create_each_block(
|
|
6973
|
+
function create_each_block(ctx) {
|
|
6960
6974
|
let button;
|
|
6961
6975
|
let span;
|
|
6962
6976
|
let t;
|
|
6963
6977
|
let button_class_value;
|
|
6978
|
+
let button_data_color_key_value;
|
|
6964
6979
|
return {
|
|
6965
|
-
key: key_1,
|
|
6966
|
-
first: null,
|
|
6967
6980
|
c() {
|
|
6968
6981
|
button = element("button");
|
|
6969
6982
|
span = element("span");
|
|
6970
6983
|
t = space();
|
|
6971
6984
|
attr(span, "class", "fastboard-toolbar-color-item");
|
|
6972
|
-
set_style(
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
/*
|
|
6976
|
-
ctx[
|
|
6977
|
-
|
|
6985
|
+
set_style(span, "background-color", rgbToHex(
|
|
6986
|
+
/*color*/
|
|
6987
|
+
ctx[8][0],
|
|
6988
|
+
/*color*/
|
|
6989
|
+
ctx[8][1],
|
|
6990
|
+
/*color*/
|
|
6991
|
+
ctx[8][2]
|
|
6992
|
+
));
|
|
6978
6993
|
attr(button, "class", button_class_value = "fastboard-toolbar-btn fastboard-toolbar-color-btn " + /*theme*/
|
|
6979
6994
|
ctx[0]);
|
|
6980
|
-
attr(button, "data-color-key",
|
|
6981
|
-
|
|
6995
|
+
attr(button, "data-color-key", button_data_color_key_value = rgbToHex(
|
|
6996
|
+
/*color*/
|
|
6997
|
+
ctx[8][0],
|
|
6998
|
+
/*color*/
|
|
6999
|
+
ctx[8][1],
|
|
7000
|
+
/*color*/
|
|
7001
|
+
ctx[8][2]
|
|
7002
|
+
));
|
|
6982
7003
|
button.disabled = /*disabled*/
|
|
6983
7004
|
ctx[1];
|
|
6984
7005
|
toggle_class(button, "is-active", is_equal_color(
|
|
6985
7006
|
/*strokeColor*/
|
|
6986
|
-
ctx[
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
ctx[7]
|
|
6990
|
-
]
|
|
7007
|
+
ctx[3],
|
|
7008
|
+
/*color*/
|
|
7009
|
+
ctx[8]
|
|
6991
7010
|
));
|
|
6992
|
-
this.first = button;
|
|
6993
7011
|
},
|
|
6994
7012
|
m(target, anchor) {
|
|
6995
7013
|
insert(target, button, anchor);
|
|
6996
7014
|
append(button, span);
|
|
6997
7015
|
append(button, t);
|
|
6998
7016
|
},
|
|
6999
|
-
p(
|
|
7000
|
-
|
|
7017
|
+
p(ctx2, dirty) {
|
|
7018
|
+
if (dirty & /*colors*/
|
|
7019
|
+
4) {
|
|
7020
|
+
set_style(span, "background-color", rgbToHex(
|
|
7021
|
+
/*color*/
|
|
7022
|
+
ctx2[8][0],
|
|
7023
|
+
/*color*/
|
|
7024
|
+
ctx2[8][1],
|
|
7025
|
+
/*color*/
|
|
7026
|
+
ctx2[8][2]
|
|
7027
|
+
));
|
|
7028
|
+
}
|
|
7001
7029
|
if (dirty & /*theme*/
|
|
7002
7030
|
1 && button_class_value !== (button_class_value = "fastboard-toolbar-btn fastboard-toolbar-color-btn " + /*theme*/
|
|
7003
|
-
|
|
7031
|
+
ctx2[0])) {
|
|
7004
7032
|
attr(button, "class", button_class_value);
|
|
7005
7033
|
}
|
|
7034
|
+
if (dirty & /*colors*/
|
|
7035
|
+
4 && button_data_color_key_value !== (button_data_color_key_value = rgbToHex(
|
|
7036
|
+
/*color*/
|
|
7037
|
+
ctx2[8][0],
|
|
7038
|
+
/*color*/
|
|
7039
|
+
ctx2[8][1],
|
|
7040
|
+
/*color*/
|
|
7041
|
+
ctx2[8][2]
|
|
7042
|
+
))) {
|
|
7043
|
+
attr(button, "data-color-key", button_data_color_key_value);
|
|
7044
|
+
}
|
|
7006
7045
|
if (dirty & /*disabled*/
|
|
7007
7046
|
2) {
|
|
7008
7047
|
button.disabled = /*disabled*/
|
|
7009
|
-
|
|
7048
|
+
ctx2[1];
|
|
7010
7049
|
}
|
|
7011
|
-
if (dirty & /*theme, is_equal_color, strokeColor, colors
|
|
7012
|
-
|
|
7050
|
+
if (dirty & /*theme, is_equal_color, strokeColor, colors*/
|
|
7051
|
+
13) {
|
|
7013
7052
|
toggle_class(button, "is-active", is_equal_color(
|
|
7014
7053
|
/*strokeColor*/
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
ctx[7]
|
|
7019
|
-
]
|
|
7054
|
+
ctx2[3],
|
|
7055
|
+
/*color*/
|
|
7056
|
+
ctx2[8]
|
|
7020
7057
|
));
|
|
7021
7058
|
}
|
|
7022
7059
|
},
|
|
@@ -7028,20 +7065,16 @@ function create_each_block(key_1, ctx) {
|
|
|
7028
7065
|
}
|
|
7029
7066
|
function create_fragment55(ctx) {
|
|
7030
7067
|
let div;
|
|
7031
|
-
let each_blocks = [];
|
|
7032
|
-
let each_1_lookup = /* @__PURE__ */ new Map();
|
|
7033
7068
|
let div_class_value;
|
|
7034
7069
|
let mounted;
|
|
7035
7070
|
let dispose;
|
|
7036
|
-
let each_value =
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
ctx2[7]
|
|
7071
|
+
let each_value = (
|
|
7072
|
+
/*colors*/
|
|
7073
|
+
ctx[2]
|
|
7040
7074
|
);
|
|
7075
|
+
let each_blocks = [];
|
|
7041
7076
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
7042
|
-
|
|
7043
|
-
let key = get_key(child_ctx);
|
|
7044
|
-
each_1_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx));
|
|
7077
|
+
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
7045
7078
|
}
|
|
7046
7079
|
return {
|
|
7047
7080
|
c() {
|
|
@@ -7064,16 +7097,31 @@ function create_fragment55(ctx) {
|
|
|
7064
7097
|
div,
|
|
7065
7098
|
"click",
|
|
7066
7099
|
/*set_stroke_color*/
|
|
7067
|
-
ctx[
|
|
7100
|
+
ctx[5]
|
|
7068
7101
|
);
|
|
7069
7102
|
mounted = true;
|
|
7070
7103
|
}
|
|
7071
7104
|
},
|
|
7072
7105
|
p(ctx2, [dirty]) {
|
|
7073
|
-
if (dirty & /*theme,
|
|
7074
|
-
|
|
7075
|
-
each_value =
|
|
7076
|
-
|
|
7106
|
+
if (dirty & /*theme, rgbToHex, colors, disabled, is_equal_color, strokeColor*/
|
|
7107
|
+
15) {
|
|
7108
|
+
each_value = /*colors*/
|
|
7109
|
+
ctx2[2];
|
|
7110
|
+
let i;
|
|
7111
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
7112
|
+
const child_ctx = get_each_context(ctx2, each_value, i);
|
|
7113
|
+
if (each_blocks[i]) {
|
|
7114
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
7115
|
+
} else {
|
|
7116
|
+
each_blocks[i] = create_each_block(child_ctx);
|
|
7117
|
+
each_blocks[i].c();
|
|
7118
|
+
each_blocks[i].m(div, null);
|
|
7119
|
+
}
|
|
7120
|
+
}
|
|
7121
|
+
for (; i < each_blocks.length; i += 1) {
|
|
7122
|
+
each_blocks[i].d(1);
|
|
7123
|
+
}
|
|
7124
|
+
each_blocks.length = each_value.length;
|
|
7077
7125
|
}
|
|
7078
7126
|
if (dirty & /*theme*/
|
|
7079
7127
|
1 && div_class_value !== (div_class_value = "fastboard-toolbar-colors " + /*theme*/
|
|
@@ -7086,9 +7134,7 @@ function create_fragment55(ctx) {
|
|
|
7086
7134
|
d(detaching) {
|
|
7087
7135
|
if (detaching)
|
|
7088
7136
|
detach(div);
|
|
7089
|
-
|
|
7090
|
-
each_blocks[i].d();
|
|
7091
|
-
}
|
|
7137
|
+
destroy_each(each_blocks, detaching);
|
|
7092
7138
|
mounted = false;
|
|
7093
7139
|
dispose();
|
|
7094
7140
|
}
|
|
@@ -7100,113 +7146,148 @@ function is_equal_color(a, b) {
|
|
|
7100
7146
|
function instance55($$self, $$props, $$invalidate) {
|
|
7101
7147
|
let memberState;
|
|
7102
7148
|
let strokeColor;
|
|
7103
|
-
let $memberState, $$unsubscribe_memberState = noop, $$subscribe_memberState = () => ($$unsubscribe_memberState(), $$unsubscribe_memberState = subscribe(memberState, ($$value) => $$invalidate(
|
|
7149
|
+
let $memberState, $$unsubscribe_memberState = noop, $$subscribe_memberState = () => ($$unsubscribe_memberState(), $$unsubscribe_memberState = subscribe(memberState, ($$value) => $$invalidate(7, $memberState = $$value)), memberState);
|
|
7104
7150
|
$$self.$$.on_destroy.push(() => $$unsubscribe_memberState());
|
|
7105
7151
|
let { app = null } = $$props;
|
|
7106
7152
|
let { theme = "light" } = $$props;
|
|
7107
7153
|
let { disabled = false } = $$props;
|
|
7154
|
+
let { colors: colors2 = default_colors } = $$props;
|
|
7108
7155
|
function set_stroke_color(ev) {
|
|
7109
7156
|
let button = ev.target;
|
|
7110
7157
|
if (button && button.dataset.colorKey) {
|
|
7111
|
-
let color =
|
|
7158
|
+
let color = button.dataset.colorKey;
|
|
7112
7159
|
if (color && app) {
|
|
7113
|
-
app.setStrokeColor(color);
|
|
7160
|
+
app.setStrokeColor(hexToRgb(color));
|
|
7114
7161
|
}
|
|
7115
7162
|
}
|
|
7116
7163
|
}
|
|
7117
7164
|
$$self.$$set = ($$props2) => {
|
|
7118
7165
|
if ("app" in $$props2)
|
|
7119
|
-
$$invalidate(
|
|
7166
|
+
$$invalidate(6, app = $$props2.app);
|
|
7120
7167
|
if ("theme" in $$props2)
|
|
7121
7168
|
$$invalidate(0, theme = $$props2.theme);
|
|
7122
7169
|
if ("disabled" in $$props2)
|
|
7123
7170
|
$$invalidate(1, disabled = $$props2.disabled);
|
|
7171
|
+
if ("colors" in $$props2)
|
|
7172
|
+
$$invalidate(2, colors2 = $$props2.colors);
|
|
7124
7173
|
};
|
|
7125
7174
|
$$self.$$.update = () => {
|
|
7126
7175
|
if ($$self.$$.dirty & /*app*/
|
|
7127
|
-
|
|
7128
|
-
$$subscribe_memberState($$invalidate(
|
|
7176
|
+
64) {
|
|
7177
|
+
$$subscribe_memberState($$invalidate(4, memberState = app == null ? void 0 : app.memberState));
|
|
7129
7178
|
}
|
|
7130
7179
|
if ($$self.$$.dirty & /*$memberState*/
|
|
7131
|
-
|
|
7132
|
-
$$invalidate(
|
|
7180
|
+
128) {
|
|
7181
|
+
$$invalidate(3, strokeColor = $memberState == null ? void 0 : $memberState.strokeColor);
|
|
7133
7182
|
}
|
|
7134
7183
|
};
|
|
7135
|
-
return [
|
|
7184
|
+
return [
|
|
7185
|
+
theme,
|
|
7186
|
+
disabled,
|
|
7187
|
+
colors2,
|
|
7188
|
+
strokeColor,
|
|
7189
|
+
memberState,
|
|
7190
|
+
set_stroke_color,
|
|
7191
|
+
app,
|
|
7192
|
+
$memberState
|
|
7193
|
+
];
|
|
7136
7194
|
}
|
|
7137
7195
|
var StrokeColor = class extends SvelteComponent {
|
|
7138
7196
|
constructor(options) {
|
|
7139
7197
|
super();
|
|
7140
|
-
init(this, options, instance55, create_fragment55, safe_not_equal, { app:
|
|
7198
|
+
init(this, options, instance55, create_fragment55, safe_not_equal, { app: 6, theme: 0, disabled: 1, colors: 2 });
|
|
7141
7199
|
}
|
|
7142
7200
|
};
|
|
7143
7201
|
var StrokeColor_default = StrokeColor;
|
|
7144
7202
|
function get_each_context2(ctx, list, i) {
|
|
7145
7203
|
const child_ctx = ctx.slice();
|
|
7146
|
-
child_ctx[
|
|
7204
|
+
child_ctx[8] = list[i];
|
|
7147
7205
|
return child_ctx;
|
|
7148
7206
|
}
|
|
7149
|
-
function create_each_block2(
|
|
7207
|
+
function create_each_block2(ctx) {
|
|
7150
7208
|
let button;
|
|
7151
7209
|
let span;
|
|
7152
7210
|
let t;
|
|
7153
7211
|
let button_class_value;
|
|
7212
|
+
let button_data_color_key_value;
|
|
7154
7213
|
return {
|
|
7155
|
-
key: key_1,
|
|
7156
|
-
first: null,
|
|
7157
7214
|
c() {
|
|
7158
7215
|
button = element("button");
|
|
7159
7216
|
span = element("span");
|
|
7160
7217
|
t = space();
|
|
7161
7218
|
attr(span, "class", "fastboard-toolbar-color-item");
|
|
7162
|
-
set_style(
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
/*
|
|
7166
|
-
ctx[
|
|
7167
|
-
|
|
7219
|
+
set_style(span, "background-color", rgbToHex(
|
|
7220
|
+
/*color*/
|
|
7221
|
+
ctx[8][0],
|
|
7222
|
+
/*color*/
|
|
7223
|
+
ctx[8][1],
|
|
7224
|
+
/*color*/
|
|
7225
|
+
ctx[8][2]
|
|
7226
|
+
));
|
|
7168
7227
|
attr(button, "class", button_class_value = "fastboard-toolbar-btn fastboard-toolbar-color-btn " + /*theme*/
|
|
7169
7228
|
ctx[0]);
|
|
7170
|
-
attr(button, "data-color-key",
|
|
7171
|
-
|
|
7229
|
+
attr(button, "data-color-key", button_data_color_key_value = rgbToHex(
|
|
7230
|
+
/*color*/
|
|
7231
|
+
ctx[8][0],
|
|
7232
|
+
/*color*/
|
|
7233
|
+
ctx[8][1],
|
|
7234
|
+
/*color*/
|
|
7235
|
+
ctx[8][2]
|
|
7236
|
+
));
|
|
7172
7237
|
button.disabled = /*disabled*/
|
|
7173
7238
|
ctx[1];
|
|
7174
7239
|
toggle_class(button, "is-active", is_equal_color2(
|
|
7175
7240
|
/*textColor*/
|
|
7176
|
-
ctx[
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
ctx[7]
|
|
7180
|
-
]
|
|
7241
|
+
ctx[3],
|
|
7242
|
+
/*color*/
|
|
7243
|
+
ctx[8]
|
|
7181
7244
|
));
|
|
7182
|
-
this.first = button;
|
|
7183
7245
|
},
|
|
7184
7246
|
m(target, anchor) {
|
|
7185
7247
|
insert(target, button, anchor);
|
|
7186
7248
|
append(button, span);
|
|
7187
7249
|
append(button, t);
|
|
7188
7250
|
},
|
|
7189
|
-
p(
|
|
7190
|
-
|
|
7251
|
+
p(ctx2, dirty) {
|
|
7252
|
+
if (dirty & /*colors*/
|
|
7253
|
+
4) {
|
|
7254
|
+
set_style(span, "background-color", rgbToHex(
|
|
7255
|
+
/*color*/
|
|
7256
|
+
ctx2[8][0],
|
|
7257
|
+
/*color*/
|
|
7258
|
+
ctx2[8][1],
|
|
7259
|
+
/*color*/
|
|
7260
|
+
ctx2[8][2]
|
|
7261
|
+
));
|
|
7262
|
+
}
|
|
7191
7263
|
if (dirty & /*theme*/
|
|
7192
7264
|
1 && button_class_value !== (button_class_value = "fastboard-toolbar-btn fastboard-toolbar-color-btn " + /*theme*/
|
|
7193
|
-
|
|
7265
|
+
ctx2[0])) {
|
|
7194
7266
|
attr(button, "class", button_class_value);
|
|
7195
7267
|
}
|
|
7268
|
+
if (dirty & /*colors*/
|
|
7269
|
+
4 && button_data_color_key_value !== (button_data_color_key_value = rgbToHex(
|
|
7270
|
+
/*color*/
|
|
7271
|
+
ctx2[8][0],
|
|
7272
|
+
/*color*/
|
|
7273
|
+
ctx2[8][1],
|
|
7274
|
+
/*color*/
|
|
7275
|
+
ctx2[8][2]
|
|
7276
|
+
))) {
|
|
7277
|
+
attr(button, "data-color-key", button_data_color_key_value);
|
|
7278
|
+
}
|
|
7196
7279
|
if (dirty & /*disabled*/
|
|
7197
7280
|
2) {
|
|
7198
7281
|
button.disabled = /*disabled*/
|
|
7199
|
-
|
|
7282
|
+
ctx2[1];
|
|
7200
7283
|
}
|
|
7201
|
-
if (dirty & /*theme, is_equal_color, textColor, colors
|
|
7202
|
-
|
|
7284
|
+
if (dirty & /*theme, is_equal_color, textColor, colors*/
|
|
7285
|
+
13) {
|
|
7203
7286
|
toggle_class(button, "is-active", is_equal_color2(
|
|
7204
7287
|
/*textColor*/
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
ctx[7]
|
|
7209
|
-
]
|
|
7288
|
+
ctx2[3],
|
|
7289
|
+
/*color*/
|
|
7290
|
+
ctx2[8]
|
|
7210
7291
|
));
|
|
7211
7292
|
}
|
|
7212
7293
|
},
|
|
@@ -7218,20 +7299,16 @@ function create_each_block2(key_1, ctx) {
|
|
|
7218
7299
|
}
|
|
7219
7300
|
function create_fragment56(ctx) {
|
|
7220
7301
|
let div;
|
|
7221
|
-
let each_blocks = [];
|
|
7222
|
-
let each_1_lookup = /* @__PURE__ */ new Map();
|
|
7223
7302
|
let div_class_value;
|
|
7224
7303
|
let mounted;
|
|
7225
7304
|
let dispose;
|
|
7226
|
-
let each_value =
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
ctx2[7]
|
|
7305
|
+
let each_value = (
|
|
7306
|
+
/*colors*/
|
|
7307
|
+
ctx[2]
|
|
7230
7308
|
);
|
|
7309
|
+
let each_blocks = [];
|
|
7231
7310
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
7232
|
-
|
|
7233
|
-
let key = get_key(child_ctx);
|
|
7234
|
-
each_1_lookup.set(key, each_blocks[i] = create_each_block2(key, child_ctx));
|
|
7311
|
+
each_blocks[i] = create_each_block2(get_each_context2(ctx, each_value, i));
|
|
7235
7312
|
}
|
|
7236
7313
|
return {
|
|
7237
7314
|
c() {
|
|
@@ -7254,16 +7331,31 @@ function create_fragment56(ctx) {
|
|
|
7254
7331
|
div,
|
|
7255
7332
|
"click",
|
|
7256
7333
|
/*set_stroke_color*/
|
|
7257
|
-
ctx[
|
|
7334
|
+
ctx[5]
|
|
7258
7335
|
);
|
|
7259
7336
|
mounted = true;
|
|
7260
7337
|
}
|
|
7261
7338
|
},
|
|
7262
7339
|
p(ctx2, [dirty]) {
|
|
7263
|
-
if (dirty & /*theme,
|
|
7264
|
-
|
|
7265
|
-
each_value =
|
|
7266
|
-
|
|
7340
|
+
if (dirty & /*theme, rgbToHex, colors, disabled, is_equal_color, textColor*/
|
|
7341
|
+
15) {
|
|
7342
|
+
each_value = /*colors*/
|
|
7343
|
+
ctx2[2];
|
|
7344
|
+
let i;
|
|
7345
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
7346
|
+
const child_ctx = get_each_context2(ctx2, each_value, i);
|
|
7347
|
+
if (each_blocks[i]) {
|
|
7348
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
7349
|
+
} else {
|
|
7350
|
+
each_blocks[i] = create_each_block2(child_ctx);
|
|
7351
|
+
each_blocks[i].c();
|
|
7352
|
+
each_blocks[i].m(div, null);
|
|
7353
|
+
}
|
|
7354
|
+
}
|
|
7355
|
+
for (; i < each_blocks.length; i += 1) {
|
|
7356
|
+
each_blocks[i].d(1);
|
|
7357
|
+
}
|
|
7358
|
+
each_blocks.length = each_value.length;
|
|
7267
7359
|
}
|
|
7268
7360
|
if (dirty & /*theme*/
|
|
7269
7361
|
1 && div_class_value !== (div_class_value = "fastboard-toolbar-colors " + /*theme*/
|
|
@@ -7276,9 +7368,7 @@ function create_fragment56(ctx) {
|
|
|
7276
7368
|
d(detaching) {
|
|
7277
7369
|
if (detaching)
|
|
7278
7370
|
detach(div);
|
|
7279
|
-
|
|
7280
|
-
each_blocks[i].d();
|
|
7281
|
-
}
|
|
7371
|
+
destroy_each(each_blocks, detaching);
|
|
7282
7372
|
mounted = false;
|
|
7283
7373
|
dispose();
|
|
7284
7374
|
}
|
|
@@ -7290,44 +7380,56 @@ function is_equal_color2(a, b) {
|
|
|
7290
7380
|
function instance56($$self, $$props, $$invalidate) {
|
|
7291
7381
|
let memberState;
|
|
7292
7382
|
let textColor;
|
|
7293
|
-
let $memberState, $$unsubscribe_memberState = noop, $$subscribe_memberState = () => ($$unsubscribe_memberState(), $$unsubscribe_memberState = subscribe(memberState, ($$value) => $$invalidate(
|
|
7383
|
+
let $memberState, $$unsubscribe_memberState = noop, $$subscribe_memberState = () => ($$unsubscribe_memberState(), $$unsubscribe_memberState = subscribe(memberState, ($$value) => $$invalidate(7, $memberState = $$value)), memberState);
|
|
7294
7384
|
$$self.$$.on_destroy.push(() => $$unsubscribe_memberState());
|
|
7295
7385
|
let { app = null } = $$props;
|
|
7296
7386
|
let { theme = "light" } = $$props;
|
|
7297
7387
|
let { disabled = false } = $$props;
|
|
7388
|
+
let { colors: colors2 = default_colors } = $$props;
|
|
7298
7389
|
function set_stroke_color(ev) {
|
|
7299
7390
|
let button = ev.target;
|
|
7300
7391
|
if (button && button.dataset.colorKey) {
|
|
7301
|
-
let color =
|
|
7392
|
+
let color = button.dataset.colorKey;
|
|
7302
7393
|
if (color && app) {
|
|
7303
|
-
app.setTextColor(color);
|
|
7394
|
+
app.setTextColor(hexToRgb(color));
|
|
7304
7395
|
}
|
|
7305
7396
|
}
|
|
7306
7397
|
}
|
|
7307
7398
|
$$self.$$set = ($$props2) => {
|
|
7308
7399
|
if ("app" in $$props2)
|
|
7309
|
-
$$invalidate(
|
|
7400
|
+
$$invalidate(6, app = $$props2.app);
|
|
7310
7401
|
if ("theme" in $$props2)
|
|
7311
7402
|
$$invalidate(0, theme = $$props2.theme);
|
|
7312
7403
|
if ("disabled" in $$props2)
|
|
7313
7404
|
$$invalidate(1, disabled = $$props2.disabled);
|
|
7405
|
+
if ("colors" in $$props2)
|
|
7406
|
+
$$invalidate(2, colors2 = $$props2.colors);
|
|
7314
7407
|
};
|
|
7315
7408
|
$$self.$$.update = () => {
|
|
7316
7409
|
if ($$self.$$.dirty & /*app*/
|
|
7317
|
-
|
|
7318
|
-
$$subscribe_memberState($$invalidate(
|
|
7410
|
+
64) {
|
|
7411
|
+
$$subscribe_memberState($$invalidate(4, memberState = app == null ? void 0 : app.memberState));
|
|
7319
7412
|
}
|
|
7320
7413
|
if ($$self.$$.dirty & /*$memberState*/
|
|
7321
|
-
|
|
7322
|
-
$$invalidate(
|
|
7414
|
+
128) {
|
|
7415
|
+
$$invalidate(3, textColor = $memberState == null ? void 0 : $memberState.textColor);
|
|
7323
7416
|
}
|
|
7324
7417
|
};
|
|
7325
|
-
return [
|
|
7418
|
+
return [
|
|
7419
|
+
theme,
|
|
7420
|
+
disabled,
|
|
7421
|
+
colors2,
|
|
7422
|
+
textColor,
|
|
7423
|
+
memberState,
|
|
7424
|
+
set_stroke_color,
|
|
7425
|
+
app,
|
|
7426
|
+
$memberState
|
|
7427
|
+
];
|
|
7326
7428
|
}
|
|
7327
7429
|
var TextColor = class extends SvelteComponent {
|
|
7328
7430
|
constructor(options) {
|
|
7329
7431
|
super();
|
|
7330
|
-
init(this, options, instance56, create_fragment56, safe_not_equal, { app:
|
|
7432
|
+
init(this, options, instance56, create_fragment56, safe_not_equal, { app: 6, theme: 0, disabled: 1, colors: 2 });
|
|
7331
7433
|
}
|
|
7332
7434
|
};
|
|
7333
7435
|
var TextColor_default = TextColor;
|
|
@@ -10125,39 +10227,39 @@ var Laser_default2 = Laser2;
|
|
|
10125
10227
|
// src/components/Toolbar/components/Contents.svelte
|
|
10126
10228
|
function get_each_context4(ctx, list, i) {
|
|
10127
10229
|
const child_ctx = ctx.slice();
|
|
10128
|
-
child_ctx[
|
|
10230
|
+
child_ctx[44] = list[i];
|
|
10129
10231
|
const constants_0 = (
|
|
10130
10232
|
/*netless_app*/
|
|
10131
|
-
child_ctx[
|
|
10233
|
+
child_ctx[44]
|
|
10132
10234
|
);
|
|
10133
|
-
child_ctx[
|
|
10134
|
-
child_ctx[
|
|
10135
|
-
child_ctx[
|
|
10136
|
-
child_ctx[
|
|
10235
|
+
child_ctx[45] = constants_0.icon;
|
|
10236
|
+
child_ctx[46] = constants_0.label;
|
|
10237
|
+
child_ctx[47] = constants_0.kind;
|
|
10238
|
+
child_ctx[48] = constants_0.onClick;
|
|
10137
10239
|
const constants_1 = (
|
|
10138
10240
|
/*$status*/
|
|
10139
|
-
child_ctx[
|
|
10140
|
-
child_ctx[
|
|
10241
|
+
child_ctx[21] && /*$status*/
|
|
10242
|
+
child_ctx[21][
|
|
10141
10243
|
/*kind*/
|
|
10142
|
-
child_ctx[
|
|
10244
|
+
child_ctx[47]
|
|
10143
10245
|
]
|
|
10144
10246
|
);
|
|
10145
|
-
child_ctx[
|
|
10247
|
+
child_ctx[49] = constants_1;
|
|
10146
10248
|
const constants_2 = function func() {
|
|
10147
10249
|
return (
|
|
10148
10250
|
/*func*/
|
|
10149
|
-
ctx[
|
|
10251
|
+
ctx[40](
|
|
10150
10252
|
/*onClick*/
|
|
10151
|
-
child_ctx[
|
|
10253
|
+
child_ctx[48]
|
|
10152
10254
|
)
|
|
10153
10255
|
);
|
|
10154
10256
|
};
|
|
10155
|
-
child_ctx[
|
|
10257
|
+
child_ctx[50] = constants_2;
|
|
10156
10258
|
return child_ctx;
|
|
10157
10259
|
}
|
|
10158
10260
|
function get_each_context_1(ctx, list, i) {
|
|
10159
10261
|
const child_ctx = ctx.slice();
|
|
10160
|
-
child_ctx[
|
|
10262
|
+
child_ctx[53] = list[i];
|
|
10161
10263
|
return child_ctx;
|
|
10162
10264
|
}
|
|
10163
10265
|
function create_if_block_11(ctx) {
|
|
@@ -10166,7 +10268,7 @@ function create_if_block_11(ctx) {
|
|
|
10166
10268
|
const button_spread_levels = [
|
|
10167
10269
|
{ class: "scroll-up" },
|
|
10168
10270
|
/*btn_props*/
|
|
10169
|
-
ctx[
|
|
10271
|
+
ctx[15]
|
|
10170
10272
|
];
|
|
10171
10273
|
let button_props = {
|
|
10172
10274
|
$$slots: { default: [create_default_slot_24] },
|
|
@@ -10179,7 +10281,7 @@ function create_if_block_11(ctx) {
|
|
|
10179
10281
|
button.$on(
|
|
10180
10282
|
"click",
|
|
10181
10283
|
/*scroll_up*/
|
|
10182
|
-
ctx[
|
|
10284
|
+
ctx[23]
|
|
10183
10285
|
);
|
|
10184
10286
|
return {
|
|
10185
10287
|
c() {
|
|
@@ -10191,13 +10293,13 @@ function create_if_block_11(ctx) {
|
|
|
10191
10293
|
},
|
|
10192
10294
|
p(ctx2, dirty) {
|
|
10193
10295
|
const button_changes = dirty[0] & /*btn_props*/
|
|
10194
|
-
|
|
10296
|
+
32768 ? get_spread_update(button_spread_levels, [button_spread_levels[0], get_spread_object(
|
|
10195
10297
|
/*btn_props*/
|
|
10196
|
-
ctx2[
|
|
10298
|
+
ctx2[15]
|
|
10197
10299
|
)]) : {};
|
|
10198
10300
|
if (dirty[0] & /*theme*/
|
|
10199
10301
|
2 | dirty[1] & /*$$scope*/
|
|
10200
|
-
|
|
10302
|
+
33554432) {
|
|
10201
10303
|
button_changes.$$scope = { dirty, ctx: ctx2 };
|
|
10202
10304
|
}
|
|
10203
10305
|
button.$set(button_changes);
|
|
@@ -10262,7 +10364,7 @@ function create_if_block_10(ctx) {
|
|
|
10262
10364
|
props: {
|
|
10263
10365
|
appliance: (
|
|
10264
10366
|
/*appliance*/
|
|
10265
|
-
ctx[
|
|
10367
|
+
ctx[17]
|
|
10266
10368
|
),
|
|
10267
10369
|
theme: (
|
|
10268
10370
|
/*theme*/
|
|
@@ -10270,18 +10372,18 @@ function create_if_block_10(ctx) {
|
|
|
10270
10372
|
),
|
|
10271
10373
|
btn_props: (
|
|
10272
10374
|
/*btn_props*/
|
|
10273
|
-
ctx[
|
|
10375
|
+
ctx[15]
|
|
10274
10376
|
),
|
|
10275
10377
|
content: (
|
|
10276
10378
|
/*c*/
|
|
10277
|
-
ctx[
|
|
10379
|
+
ctx[19].laserPointer
|
|
10278
10380
|
)
|
|
10279
10381
|
}
|
|
10280
10382
|
});
|
|
10281
10383
|
laser.$on(
|
|
10282
10384
|
"click",
|
|
10283
10385
|
/*laserPointer*/
|
|
10284
|
-
ctx[
|
|
10386
|
+
ctx[31]
|
|
10285
10387
|
);
|
|
10286
10388
|
return {
|
|
10287
10389
|
c() {
|
|
@@ -10294,21 +10396,21 @@ function create_if_block_10(ctx) {
|
|
|
10294
10396
|
p(ctx2, dirty) {
|
|
10295
10397
|
const laser_changes = {};
|
|
10296
10398
|
if (dirty[0] & /*appliance*/
|
|
10297
|
-
|
|
10399
|
+
131072)
|
|
10298
10400
|
laser_changes.appliance = /*appliance*/
|
|
10299
|
-
ctx2[
|
|
10401
|
+
ctx2[17];
|
|
10300
10402
|
if (dirty[0] & /*theme*/
|
|
10301
10403
|
2)
|
|
10302
10404
|
laser_changes.theme = /*theme*/
|
|
10303
10405
|
ctx2[1];
|
|
10304
10406
|
if (dirty[0] & /*btn_props*/
|
|
10305
|
-
|
|
10407
|
+
32768)
|
|
10306
10408
|
laser_changes.btn_props = /*btn_props*/
|
|
10307
|
-
ctx2[
|
|
10409
|
+
ctx2[15];
|
|
10308
10410
|
if (dirty[0] & /*c*/
|
|
10309
|
-
|
|
10411
|
+
524288)
|
|
10310
10412
|
laser_changes.content = /*c*/
|
|
10311
|
-
ctx2[
|
|
10413
|
+
ctx2[19].laserPointer;
|
|
10312
10414
|
laser.$set(laser_changes);
|
|
10313
10415
|
},
|
|
10314
10416
|
i(local) {
|
|
@@ -10333,7 +10435,7 @@ function create_if_block_9(ctx) {
|
|
|
10333
10435
|
props: {
|
|
10334
10436
|
appliance: (
|
|
10335
10437
|
/*appliance*/
|
|
10336
|
-
ctx[
|
|
10438
|
+
ctx[17]
|
|
10337
10439
|
),
|
|
10338
10440
|
theme: (
|
|
10339
10441
|
/*theme*/
|
|
@@ -10341,18 +10443,18 @@ function create_if_block_9(ctx) {
|
|
|
10341
10443
|
),
|
|
10342
10444
|
btn_props: (
|
|
10343
10445
|
/*btn_props*/
|
|
10344
|
-
ctx[
|
|
10446
|
+
ctx[15]
|
|
10345
10447
|
),
|
|
10346
10448
|
content: (
|
|
10347
10449
|
/*c*/
|
|
10348
|
-
ctx[
|
|
10450
|
+
ctx[19].hand
|
|
10349
10451
|
)
|
|
10350
10452
|
}
|
|
10351
10453
|
});
|
|
10352
10454
|
hand_1.$on(
|
|
10353
10455
|
"click",
|
|
10354
10456
|
/*hand*/
|
|
10355
|
-
ctx[
|
|
10457
|
+
ctx[30]
|
|
10356
10458
|
);
|
|
10357
10459
|
return {
|
|
10358
10460
|
c() {
|
|
@@ -10365,21 +10467,21 @@ function create_if_block_9(ctx) {
|
|
|
10365
10467
|
p(ctx2, dirty) {
|
|
10366
10468
|
const hand_1_changes = {};
|
|
10367
10469
|
if (dirty[0] & /*appliance*/
|
|
10368
|
-
|
|
10470
|
+
131072)
|
|
10369
10471
|
hand_1_changes.appliance = /*appliance*/
|
|
10370
|
-
ctx2[
|
|
10472
|
+
ctx2[17];
|
|
10371
10473
|
if (dirty[0] & /*theme*/
|
|
10372
10474
|
2)
|
|
10373
10475
|
hand_1_changes.theme = /*theme*/
|
|
10374
10476
|
ctx2[1];
|
|
10375
10477
|
if (dirty[0] & /*btn_props*/
|
|
10376
|
-
|
|
10478
|
+
32768)
|
|
10377
10479
|
hand_1_changes.btn_props = /*btn_props*/
|
|
10378
|
-
ctx2[
|
|
10480
|
+
ctx2[15];
|
|
10379
10481
|
if (dirty[0] & /*c*/
|
|
10380
|
-
|
|
10482
|
+
524288)
|
|
10381
10483
|
hand_1_changes.content = /*c*/
|
|
10382
|
-
ctx2[
|
|
10484
|
+
ctx2[19].hand;
|
|
10383
10485
|
hand_1.$set(hand_1_changes);
|
|
10384
10486
|
},
|
|
10385
10487
|
i(local) {
|
|
@@ -10408,18 +10510,18 @@ function create_if_block_8(ctx) {
|
|
|
10408
10510
|
),
|
|
10409
10511
|
btn_props: (
|
|
10410
10512
|
/*btn_props*/
|
|
10411
|
-
ctx[
|
|
10513
|
+
ctx[15]
|
|
10412
10514
|
),
|
|
10413
10515
|
content: (
|
|
10414
10516
|
/*t*/
|
|
10415
|
-
ctx[
|
|
10517
|
+
ctx[10].clear
|
|
10416
10518
|
)
|
|
10417
10519
|
}
|
|
10418
10520
|
});
|
|
10419
10521
|
clear_1.$on(
|
|
10420
10522
|
"click",
|
|
10421
10523
|
/*clear*/
|
|
10422
|
-
ctx[
|
|
10524
|
+
ctx[32]
|
|
10423
10525
|
);
|
|
10424
10526
|
return {
|
|
10425
10527
|
c() {
|
|
@@ -10436,13 +10538,13 @@ function create_if_block_8(ctx) {
|
|
|
10436
10538
|
clear_1_changes.theme = /*theme*/
|
|
10437
10539
|
ctx2[1];
|
|
10438
10540
|
if (dirty[0] & /*btn_props*/
|
|
10439
|
-
|
|
10541
|
+
32768)
|
|
10440
10542
|
clear_1_changes.btn_props = /*btn_props*/
|
|
10441
|
-
ctx2[
|
|
10543
|
+
ctx2[15];
|
|
10442
10544
|
if (dirty[0] & /*t*/
|
|
10443
|
-
|
|
10545
|
+
1024)
|
|
10444
10546
|
clear_1_changes.content = /*t*/
|
|
10445
|
-
ctx2[
|
|
10547
|
+
ctx2[10].clear;
|
|
10446
10548
|
clear_1.$set(clear_1_changes);
|
|
10447
10549
|
},
|
|
10448
10550
|
i(local) {
|
|
@@ -10467,7 +10569,7 @@ function create_if_block_7(ctx) {
|
|
|
10467
10569
|
props: {
|
|
10468
10570
|
appliance: (
|
|
10469
10571
|
/*appliance*/
|
|
10470
|
-
ctx[
|
|
10572
|
+
ctx[17]
|
|
10471
10573
|
),
|
|
10472
10574
|
theme: (
|
|
10473
10575
|
/*theme*/
|
|
@@ -10475,18 +10577,18 @@ function create_if_block_7(ctx) {
|
|
|
10475
10577
|
),
|
|
10476
10578
|
btn_props: (
|
|
10477
10579
|
/*btn_props*/
|
|
10478
|
-
ctx[
|
|
10580
|
+
ctx[15]
|
|
10479
10581
|
),
|
|
10480
10582
|
content: (
|
|
10481
10583
|
/*c*/
|
|
10482
|
-
ctx[
|
|
10584
|
+
ctx[19].eraser
|
|
10483
10585
|
)
|
|
10484
10586
|
}
|
|
10485
10587
|
});
|
|
10486
10588
|
eraser_1.$on(
|
|
10487
10589
|
"click",
|
|
10488
10590
|
/*eraser*/
|
|
10489
|
-
ctx[
|
|
10591
|
+
ctx[29]
|
|
10490
10592
|
);
|
|
10491
10593
|
return {
|
|
10492
10594
|
c() {
|
|
@@ -10499,21 +10601,21 @@ function create_if_block_7(ctx) {
|
|
|
10499
10601
|
p(ctx2, dirty) {
|
|
10500
10602
|
const eraser_1_changes = {};
|
|
10501
10603
|
if (dirty[0] & /*appliance*/
|
|
10502
|
-
|
|
10604
|
+
131072)
|
|
10503
10605
|
eraser_1_changes.appliance = /*appliance*/
|
|
10504
|
-
ctx2[
|
|
10606
|
+
ctx2[17];
|
|
10505
10607
|
if (dirty[0] & /*theme*/
|
|
10506
10608
|
2)
|
|
10507
10609
|
eraser_1_changes.theme = /*theme*/
|
|
10508
10610
|
ctx2[1];
|
|
10509
10611
|
if (dirty[0] & /*btn_props*/
|
|
10510
|
-
|
|
10612
|
+
32768)
|
|
10511
10613
|
eraser_1_changes.btn_props = /*btn_props*/
|
|
10512
|
-
ctx2[
|
|
10614
|
+
ctx2[15];
|
|
10513
10615
|
if (dirty[0] & /*c*/
|
|
10514
|
-
|
|
10616
|
+
524288)
|
|
10515
10617
|
eraser_1_changes.content = /*c*/
|
|
10516
|
-
ctx2[
|
|
10618
|
+
ctx2[19].eraser;
|
|
10517
10619
|
eraser_1.$set(eraser_1_changes);
|
|
10518
10620
|
},
|
|
10519
10621
|
i(local) {
|
|
@@ -10542,7 +10644,7 @@ function create_if_block_6(ctx) {
|
|
|
10542
10644
|
),
|
|
10543
10645
|
appliance: (
|
|
10544
10646
|
/*appliance*/
|
|
10545
|
-
ctx[
|
|
10647
|
+
ctx[17]
|
|
10546
10648
|
),
|
|
10547
10649
|
theme: (
|
|
10548
10650
|
/*theme*/
|
|
@@ -10550,15 +10652,15 @@ function create_if_block_6(ctx) {
|
|
|
10550
10652
|
),
|
|
10551
10653
|
btn_props: (
|
|
10552
10654
|
/*btn_props*/
|
|
10553
|
-
ctx[
|
|
10655
|
+
ctx[15]
|
|
10554
10656
|
),
|
|
10555
10657
|
content: (
|
|
10556
10658
|
/*t*/
|
|
10557
|
-
ctx[
|
|
10659
|
+
ctx[10].shapes
|
|
10558
10660
|
),
|
|
10559
10661
|
menu: (
|
|
10560
10662
|
/*shapes_panel*/
|
|
10561
|
-
ctx[
|
|
10663
|
+
ctx[13]
|
|
10562
10664
|
)
|
|
10563
10665
|
}
|
|
10564
10666
|
});
|
|
@@ -10577,25 +10679,25 @@ function create_if_block_6(ctx) {
|
|
|
10577
10679
|
shapes_changes.app = /*app*/
|
|
10578
10680
|
ctx2[0];
|
|
10579
10681
|
if (dirty[0] & /*appliance*/
|
|
10580
|
-
|
|
10682
|
+
131072)
|
|
10581
10683
|
shapes_changes.appliance = /*appliance*/
|
|
10582
|
-
ctx2[
|
|
10684
|
+
ctx2[17];
|
|
10583
10685
|
if (dirty[0] & /*theme*/
|
|
10584
10686
|
2)
|
|
10585
10687
|
shapes_changes.theme = /*theme*/
|
|
10586
10688
|
ctx2[1];
|
|
10587
10689
|
if (dirty[0] & /*btn_props*/
|
|
10588
|
-
|
|
10690
|
+
32768)
|
|
10589
10691
|
shapes_changes.btn_props = /*btn_props*/
|
|
10590
|
-
ctx2[
|
|
10692
|
+
ctx2[15];
|
|
10591
10693
|
if (dirty[0] & /*t*/
|
|
10592
|
-
|
|
10694
|
+
1024)
|
|
10593
10695
|
shapes_changes.content = /*t*/
|
|
10594
|
-
ctx2[
|
|
10696
|
+
ctx2[10].shapes;
|
|
10595
10697
|
if (dirty[0] & /*shapes_panel*/
|
|
10596
|
-
|
|
10698
|
+
8192)
|
|
10597
10699
|
shapes_changes.menu = /*shapes_panel*/
|
|
10598
|
-
ctx2[
|
|
10700
|
+
ctx2[13];
|
|
10599
10701
|
shapes2.$set(shapes_changes);
|
|
10600
10702
|
},
|
|
10601
10703
|
i(local) {
|
|
@@ -10620,7 +10722,7 @@ function create_if_block_5(ctx) {
|
|
|
10620
10722
|
props: {
|
|
10621
10723
|
appliance: (
|
|
10622
10724
|
/*appliance*/
|
|
10623
|
-
ctx[
|
|
10725
|
+
ctx[17]
|
|
10624
10726
|
),
|
|
10625
10727
|
theme: (
|
|
10626
10728
|
/*theme*/
|
|
@@ -10628,22 +10730,22 @@ function create_if_block_5(ctx) {
|
|
|
10628
10730
|
),
|
|
10629
10731
|
btn_props: (
|
|
10630
10732
|
/*btn_props*/
|
|
10631
|
-
ctx[
|
|
10733
|
+
ctx[15]
|
|
10632
10734
|
),
|
|
10633
10735
|
content: (
|
|
10634
10736
|
/*c*/
|
|
10635
|
-
ctx[
|
|
10737
|
+
ctx[19].text
|
|
10636
10738
|
),
|
|
10637
10739
|
menu: (
|
|
10638
10740
|
/*text_panel*/
|
|
10639
|
-
ctx[
|
|
10741
|
+
ctx[12]
|
|
10640
10742
|
)
|
|
10641
10743
|
}
|
|
10642
10744
|
});
|
|
10643
10745
|
text_1.$on(
|
|
10644
10746
|
"click",
|
|
10645
10747
|
/*text*/
|
|
10646
|
-
ctx[
|
|
10748
|
+
ctx[28]
|
|
10647
10749
|
);
|
|
10648
10750
|
return {
|
|
10649
10751
|
c() {
|
|
@@ -10656,25 +10758,25 @@ function create_if_block_5(ctx) {
|
|
|
10656
10758
|
p(ctx2, dirty) {
|
|
10657
10759
|
const text_1_changes = {};
|
|
10658
10760
|
if (dirty[0] & /*appliance*/
|
|
10659
|
-
|
|
10761
|
+
131072)
|
|
10660
10762
|
text_1_changes.appliance = /*appliance*/
|
|
10661
|
-
ctx2[
|
|
10763
|
+
ctx2[17];
|
|
10662
10764
|
if (dirty[0] & /*theme*/
|
|
10663
10765
|
2)
|
|
10664
10766
|
text_1_changes.theme = /*theme*/
|
|
10665
10767
|
ctx2[1];
|
|
10666
10768
|
if (dirty[0] & /*btn_props*/
|
|
10667
|
-
|
|
10769
|
+
32768)
|
|
10668
10770
|
text_1_changes.btn_props = /*btn_props*/
|
|
10669
|
-
ctx2[
|
|
10771
|
+
ctx2[15];
|
|
10670
10772
|
if (dirty[0] & /*c*/
|
|
10671
|
-
|
|
10773
|
+
524288)
|
|
10672
10774
|
text_1_changes.content = /*c*/
|
|
10673
|
-
ctx2[
|
|
10775
|
+
ctx2[19].text;
|
|
10674
10776
|
if (dirty[0] & /*text_panel*/
|
|
10675
|
-
|
|
10777
|
+
4096)
|
|
10676
10778
|
text_1_changes.menu = /*text_panel*/
|
|
10677
|
-
ctx2[
|
|
10779
|
+
ctx2[12];
|
|
10678
10780
|
text_1.$set(text_1_changes);
|
|
10679
10781
|
},
|
|
10680
10782
|
i(local) {
|
|
@@ -10699,7 +10801,7 @@ function create_if_block_4(ctx) {
|
|
|
10699
10801
|
props: {
|
|
10700
10802
|
appliance: (
|
|
10701
10803
|
/*appliance*/
|
|
10702
|
-
ctx[
|
|
10804
|
+
ctx[17]
|
|
10703
10805
|
),
|
|
10704
10806
|
theme: (
|
|
10705
10807
|
/*theme*/
|
|
@@ -10707,22 +10809,22 @@ function create_if_block_4(ctx) {
|
|
|
10707
10809
|
),
|
|
10708
10810
|
btn_props: (
|
|
10709
10811
|
/*btn_props*/
|
|
10710
|
-
ctx[
|
|
10812
|
+
ctx[15]
|
|
10711
10813
|
),
|
|
10712
10814
|
content: (
|
|
10713
10815
|
/*c*/
|
|
10714
|
-
ctx[
|
|
10816
|
+
ctx[19].pencil
|
|
10715
10817
|
),
|
|
10716
10818
|
menu: (
|
|
10717
10819
|
/*pencil_panel*/
|
|
10718
|
-
ctx[
|
|
10820
|
+
ctx[11]
|
|
10719
10821
|
)
|
|
10720
10822
|
}
|
|
10721
10823
|
});
|
|
10722
10824
|
pencil_1.$on(
|
|
10723
10825
|
"click",
|
|
10724
10826
|
/*pencil*/
|
|
10725
|
-
ctx[
|
|
10827
|
+
ctx[27]
|
|
10726
10828
|
);
|
|
10727
10829
|
return {
|
|
10728
10830
|
c() {
|
|
@@ -10735,25 +10837,25 @@ function create_if_block_4(ctx) {
|
|
|
10735
10837
|
p(ctx2, dirty) {
|
|
10736
10838
|
const pencil_1_changes = {};
|
|
10737
10839
|
if (dirty[0] & /*appliance*/
|
|
10738
|
-
|
|
10840
|
+
131072)
|
|
10739
10841
|
pencil_1_changes.appliance = /*appliance*/
|
|
10740
|
-
ctx2[
|
|
10842
|
+
ctx2[17];
|
|
10741
10843
|
if (dirty[0] & /*theme*/
|
|
10742
10844
|
2)
|
|
10743
10845
|
pencil_1_changes.theme = /*theme*/
|
|
10744
10846
|
ctx2[1];
|
|
10745
10847
|
if (dirty[0] & /*btn_props*/
|
|
10746
|
-
|
|
10848
|
+
32768)
|
|
10747
10849
|
pencil_1_changes.btn_props = /*btn_props*/
|
|
10748
|
-
ctx2[
|
|
10850
|
+
ctx2[15];
|
|
10749
10851
|
if (dirty[0] & /*c*/
|
|
10750
|
-
|
|
10852
|
+
524288)
|
|
10751
10853
|
pencil_1_changes.content = /*c*/
|
|
10752
|
-
ctx2[
|
|
10854
|
+
ctx2[19].pencil;
|
|
10753
10855
|
if (dirty[0] & /*pencil_panel*/
|
|
10754
|
-
|
|
10856
|
+
2048)
|
|
10755
10857
|
pencil_1_changes.menu = /*pencil_panel*/
|
|
10756
|
-
ctx2[
|
|
10858
|
+
ctx2[11];
|
|
10757
10859
|
pencil_1.$set(pencil_1_changes);
|
|
10758
10860
|
},
|
|
10759
10861
|
i(local) {
|
|
@@ -10778,7 +10880,7 @@ function create_if_block_3(ctx) {
|
|
|
10778
10880
|
props: {
|
|
10779
10881
|
appliance: (
|
|
10780
10882
|
/*appliance*/
|
|
10781
|
-
ctx[
|
|
10883
|
+
ctx[17]
|
|
10782
10884
|
),
|
|
10783
10885
|
theme: (
|
|
10784
10886
|
/*theme*/
|
|
@@ -10786,18 +10888,18 @@ function create_if_block_3(ctx) {
|
|
|
10786
10888
|
),
|
|
10787
10889
|
btn_props: (
|
|
10788
10890
|
/*btn_props*/
|
|
10789
|
-
ctx[
|
|
10891
|
+
ctx[15]
|
|
10790
10892
|
),
|
|
10791
10893
|
content: (
|
|
10792
10894
|
/*c*/
|
|
10793
|
-
ctx[
|
|
10895
|
+
ctx[19].selector
|
|
10794
10896
|
)
|
|
10795
10897
|
}
|
|
10796
10898
|
});
|
|
10797
10899
|
selector_1.$on(
|
|
10798
10900
|
"click",
|
|
10799
10901
|
/*selector*/
|
|
10800
|
-
ctx[
|
|
10902
|
+
ctx[26]
|
|
10801
10903
|
);
|
|
10802
10904
|
return {
|
|
10803
10905
|
c() {
|
|
@@ -10810,21 +10912,21 @@ function create_if_block_3(ctx) {
|
|
|
10810
10912
|
p(ctx2, dirty) {
|
|
10811
10913
|
const selector_1_changes = {};
|
|
10812
10914
|
if (dirty[0] & /*appliance*/
|
|
10813
|
-
|
|
10915
|
+
131072)
|
|
10814
10916
|
selector_1_changes.appliance = /*appliance*/
|
|
10815
|
-
ctx2[
|
|
10917
|
+
ctx2[17];
|
|
10816
10918
|
if (dirty[0] & /*theme*/
|
|
10817
10919
|
2)
|
|
10818
10920
|
selector_1_changes.theme = /*theme*/
|
|
10819
10921
|
ctx2[1];
|
|
10820
10922
|
if (dirty[0] & /*btn_props*/
|
|
10821
|
-
|
|
10923
|
+
32768)
|
|
10822
10924
|
selector_1_changes.btn_props = /*btn_props*/
|
|
10823
|
-
ctx2[
|
|
10925
|
+
ctx2[15];
|
|
10824
10926
|
if (dirty[0] & /*c*/
|
|
10825
|
-
|
|
10927
|
+
524288)
|
|
10826
10928
|
selector_1_changes.content = /*c*/
|
|
10827
|
-
ctx2[
|
|
10929
|
+
ctx2[19].selector;
|
|
10828
10930
|
selector_1.$set(selector_1_changes);
|
|
10829
10931
|
},
|
|
10830
10932
|
i(local) {
|
|
@@ -10849,7 +10951,7 @@ function create_if_block_2(ctx) {
|
|
|
10849
10951
|
props: {
|
|
10850
10952
|
appliance: (
|
|
10851
10953
|
/*appliance*/
|
|
10852
|
-
ctx[
|
|
10954
|
+
ctx[17]
|
|
10853
10955
|
),
|
|
10854
10956
|
theme: (
|
|
10855
10957
|
/*theme*/
|
|
@@ -10857,18 +10959,18 @@ function create_if_block_2(ctx) {
|
|
|
10857
10959
|
),
|
|
10858
10960
|
btn_props: (
|
|
10859
10961
|
/*btn_props*/
|
|
10860
|
-
ctx[
|
|
10962
|
+
ctx[15]
|
|
10861
10963
|
),
|
|
10862
10964
|
content: (
|
|
10863
10965
|
/*c*/
|
|
10864
|
-
ctx[
|
|
10966
|
+
ctx[19].clicker
|
|
10865
10967
|
)
|
|
10866
10968
|
}
|
|
10867
10969
|
});
|
|
10868
10970
|
clicker_1.$on(
|
|
10869
10971
|
"click",
|
|
10870
10972
|
/*clicker*/
|
|
10871
|
-
ctx[
|
|
10973
|
+
ctx[25]
|
|
10872
10974
|
);
|
|
10873
10975
|
return {
|
|
10874
10976
|
c() {
|
|
@@ -10881,21 +10983,21 @@ function create_if_block_2(ctx) {
|
|
|
10881
10983
|
p(ctx2, dirty) {
|
|
10882
10984
|
const clicker_1_changes = {};
|
|
10883
10985
|
if (dirty[0] & /*appliance*/
|
|
10884
|
-
|
|
10986
|
+
131072)
|
|
10885
10987
|
clicker_1_changes.appliance = /*appliance*/
|
|
10886
|
-
ctx2[
|
|
10988
|
+
ctx2[17];
|
|
10887
10989
|
if (dirty[0] & /*theme*/
|
|
10888
10990
|
2)
|
|
10889
10991
|
clicker_1_changes.theme = /*theme*/
|
|
10890
10992
|
ctx2[1];
|
|
10891
10993
|
if (dirty[0] & /*btn_props*/
|
|
10892
|
-
|
|
10994
|
+
32768)
|
|
10893
10995
|
clicker_1_changes.btn_props = /*btn_props*/
|
|
10894
|
-
ctx2[
|
|
10996
|
+
ctx2[15];
|
|
10895
10997
|
if (dirty[0] & /*c*/
|
|
10896
|
-
|
|
10998
|
+
524288)
|
|
10897
10999
|
clicker_1_changes.content = /*c*/
|
|
10898
|
-
ctx2[
|
|
11000
|
+
ctx2[19].clicker;
|
|
10899
11001
|
clicker_1.$set(clicker_1_changes);
|
|
10900
11002
|
},
|
|
10901
11003
|
i(local) {
|
|
@@ -10933,47 +11035,47 @@ function create_each_block_1(ctx) {
|
|
|
10933
11035
|
function select_block_type(ctx2, dirty) {
|
|
10934
11036
|
if (
|
|
10935
11037
|
/*item*/
|
|
10936
|
-
ctx2[
|
|
11038
|
+
ctx2[53] === "clicker"
|
|
10937
11039
|
)
|
|
10938
11040
|
return 0;
|
|
10939
11041
|
if (
|
|
10940
11042
|
/*item*/
|
|
10941
|
-
ctx2[
|
|
11043
|
+
ctx2[53] === "selector"
|
|
10942
11044
|
)
|
|
10943
11045
|
return 1;
|
|
10944
11046
|
if (
|
|
10945
11047
|
/*item*/
|
|
10946
|
-
ctx2[
|
|
11048
|
+
ctx2[53] === "pencil"
|
|
10947
11049
|
)
|
|
10948
11050
|
return 2;
|
|
10949
11051
|
if (
|
|
10950
11052
|
/*item*/
|
|
10951
|
-
ctx2[
|
|
11053
|
+
ctx2[53] === "text"
|
|
10952
11054
|
)
|
|
10953
11055
|
return 3;
|
|
10954
11056
|
if (
|
|
10955
11057
|
/*item*/
|
|
10956
|
-
ctx2[
|
|
11058
|
+
ctx2[53] === "shapes"
|
|
10957
11059
|
)
|
|
10958
11060
|
return 4;
|
|
10959
11061
|
if (
|
|
10960
11062
|
/*item*/
|
|
10961
|
-
ctx2[
|
|
11063
|
+
ctx2[53] === "eraser"
|
|
10962
11064
|
)
|
|
10963
11065
|
return 5;
|
|
10964
11066
|
if (
|
|
10965
11067
|
/*item*/
|
|
10966
|
-
ctx2[
|
|
11068
|
+
ctx2[53] === "clear"
|
|
10967
11069
|
)
|
|
10968
11070
|
return 6;
|
|
10969
11071
|
if (
|
|
10970
11072
|
/*item*/
|
|
10971
|
-
ctx2[
|
|
11073
|
+
ctx2[53] === "hand"
|
|
10972
11074
|
)
|
|
10973
11075
|
return 7;
|
|
10974
11076
|
if (
|
|
10975
11077
|
/*item*/
|
|
10976
|
-
ctx2[
|
|
11078
|
+
ctx2[53] === "laserPointer"
|
|
10977
11079
|
)
|
|
10978
11080
|
return 8;
|
|
10979
11081
|
return -1;
|
|
@@ -11049,14 +11151,14 @@ function create_if_block_12(ctx) {
|
|
|
11049
11151
|
const button_spread_levels = [
|
|
11050
11152
|
{ class: "apps" },
|
|
11051
11153
|
/*btn_props*/
|
|
11052
|
-
ctx[
|
|
11154
|
+
ctx[15],
|
|
11053
11155
|
{ content: (
|
|
11054
11156
|
/*t*/
|
|
11055
|
-
ctx[
|
|
11157
|
+
ctx[10].apps
|
|
11056
11158
|
) },
|
|
11057
11159
|
{ menu: (
|
|
11058
11160
|
/*apps_panel*/
|
|
11059
|
-
ctx[
|
|
11161
|
+
ctx[14]
|
|
11060
11162
|
) },
|
|
11061
11163
|
{
|
|
11062
11164
|
menu_placement: (
|
|
@@ -11083,22 +11185,22 @@ function create_if_block_12(ctx) {
|
|
|
11083
11185
|
},
|
|
11084
11186
|
p(ctx2, dirty) {
|
|
11085
11187
|
const button_changes = dirty[0] & /*btn_props, t, apps_panel, placement*/
|
|
11086
|
-
|
|
11188
|
+
50240 ? get_spread_update(button_spread_levels, [
|
|
11087
11189
|
button_spread_levels[0],
|
|
11088
11190
|
dirty[0] & /*btn_props*/
|
|
11089
|
-
|
|
11191
|
+
32768 && get_spread_object(
|
|
11090
11192
|
/*btn_props*/
|
|
11091
|
-
ctx2[
|
|
11193
|
+
ctx2[15]
|
|
11092
11194
|
),
|
|
11093
11195
|
dirty[0] & /*t*/
|
|
11094
|
-
|
|
11196
|
+
1024 && { content: (
|
|
11095
11197
|
/*t*/
|
|
11096
|
-
ctx2[
|
|
11198
|
+
ctx2[10].apps
|
|
11097
11199
|
) },
|
|
11098
11200
|
dirty[0] & /*apps_panel*/
|
|
11099
|
-
|
|
11201
|
+
16384 && { menu: (
|
|
11100
11202
|
/*apps_panel*/
|
|
11101
|
-
ctx2[
|
|
11203
|
+
ctx2[14]
|
|
11102
11204
|
) },
|
|
11103
11205
|
dirty[0] & /*placement*/
|
|
11104
11206
|
64 && {
|
|
@@ -11110,7 +11212,7 @@ function create_if_block_12(ctx) {
|
|
|
11110
11212
|
]) : {};
|
|
11111
11213
|
if (dirty[0] & /*theme*/
|
|
11112
11214
|
2 | dirty[1] & /*$$scope*/
|
|
11113
|
-
|
|
11215
|
+
33554432) {
|
|
11114
11216
|
button_changes.$$scope = { dirty, ctx: ctx2 };
|
|
11115
11217
|
}
|
|
11116
11218
|
button.$set(button_changes);
|
|
@@ -11190,7 +11292,7 @@ function create_if_block14(ctx) {
|
|
|
11190
11292
|
button.$on(
|
|
11191
11293
|
"click",
|
|
11192
11294
|
/*scroll_down*/
|
|
11193
|
-
ctx[
|
|
11295
|
+
ctx[24]
|
|
11194
11296
|
);
|
|
11195
11297
|
return {
|
|
11196
11298
|
c() {
|
|
@@ -11212,7 +11314,7 @@ function create_if_block14(ctx) {
|
|
|
11212
11314
|
ctx2[3];
|
|
11213
11315
|
if (dirty[0] & /*theme*/
|
|
11214
11316
|
2 | dirty[1] & /*$$scope*/
|
|
11215
|
-
|
|
11317
|
+
33554432) {
|
|
11216
11318
|
button_changes.$$scope = { dirty, ctx: ctx2 };
|
|
11217
11319
|
}
|
|
11218
11320
|
button.$set(button_changes);
|
|
@@ -11281,7 +11383,7 @@ function create_each_block4(ctx) {
|
|
|
11281
11383
|
let span;
|
|
11282
11384
|
let t1_value = (
|
|
11283
11385
|
/*label*/
|
|
11284
|
-
ctx[
|
|
11386
|
+
ctx[46] + ""
|
|
11285
11387
|
);
|
|
11286
11388
|
let t1;
|
|
11287
11389
|
let span_class_value;
|
|
@@ -11303,40 +11405,40 @@ function create_each_block4(ctx) {
|
|
|
11303
11405
|
attr(img, "class", img_class_value = name5 + "-app-btn-icon " + /*theme*/
|
|
11304
11406
|
ctx[1]);
|
|
11305
11407
|
if (!src_url_equal(img.src, img_src_value = /*icon*/
|
|
11306
|
-
ctx[
|
|
11408
|
+
ctx[45]))
|
|
11307
11409
|
attr(img, "src", img_src_value);
|
|
11308
11410
|
attr(img, "alt", img_alt_value = /*kind*/
|
|
11309
|
-
ctx[
|
|
11411
|
+
ctx[47]);
|
|
11310
11412
|
attr(img, "title", img_title_value = /*label*/
|
|
11311
|
-
ctx[
|
|
11413
|
+
ctx[46]);
|
|
11312
11414
|
attr(span, "class", span_class_value = name5 + "-app-btn-text " + /*theme*/
|
|
11313
11415
|
ctx[1]);
|
|
11314
11416
|
attr(button, "class", button_class_value = name5 + "-app-btn " + /*kind*/
|
|
11315
|
-
ctx[
|
|
11417
|
+
ctx[47] + " " + /*theme*/
|
|
11316
11418
|
ctx[1]);
|
|
11317
11419
|
attr(button, "title", button_title_value = /*label*/
|
|
11318
|
-
ctx[
|
|
11319
|
-
(ctx[
|
|
11320
|
-
ctx[
|
|
11321
|
-
ctx[
|
|
11420
|
+
ctx[46] + /*state*/
|
|
11421
|
+
(ctx[49] && /*state*/
|
|
11422
|
+
ctx[49].reason ? ": " + /*state*/
|
|
11423
|
+
ctx[49].reason : ""));
|
|
11322
11424
|
attr(button, "data-app-kind", button_data_app_kind_value = /*netless_app*/
|
|
11323
|
-
ctx[
|
|
11425
|
+
ctx[44].kind);
|
|
11324
11426
|
button.disabled = button_disabled_value = /*state*/
|
|
11325
|
-
ctx[
|
|
11326
|
-
ctx[
|
|
11427
|
+
ctx[49] && /*state*/
|
|
11428
|
+
ctx[49].status !== "idle";
|
|
11327
11429
|
toggle_class(
|
|
11328
11430
|
button,
|
|
11329
11431
|
"is-loading",
|
|
11330
11432
|
/*state*/
|
|
11331
|
-
ctx[
|
|
11332
|
-
ctx[
|
|
11433
|
+
ctx[49] && /*state*/
|
|
11434
|
+
ctx[49].status === "loading"
|
|
11333
11435
|
);
|
|
11334
11436
|
toggle_class(
|
|
11335
11437
|
button,
|
|
11336
11438
|
"is-failed",
|
|
11337
11439
|
/*state*/
|
|
11338
|
-
ctx[
|
|
11339
|
-
ctx[
|
|
11440
|
+
ctx[49] && /*state*/
|
|
11441
|
+
ctx[49].status === "failed"
|
|
11340
11442
|
);
|
|
11341
11443
|
},
|
|
11342
11444
|
m(target, anchor) {
|
|
@@ -11350,9 +11452,9 @@ function create_each_block4(ctx) {
|
|
|
11350
11452
|
dispose = listen(button, "click", function() {
|
|
11351
11453
|
if (is_function(
|
|
11352
11454
|
/*on_click*/
|
|
11353
|
-
ctx[
|
|
11455
|
+
ctx[50]
|
|
11354
11456
|
))
|
|
11355
|
-
ctx[
|
|
11457
|
+
ctx[50].apply(this, arguments);
|
|
11356
11458
|
});
|
|
11357
11459
|
mounted = true;
|
|
11358
11460
|
}
|
|
@@ -11365,23 +11467,23 @@ function create_each_block4(ctx) {
|
|
|
11365
11467
|
attr(img, "class", img_class_value);
|
|
11366
11468
|
}
|
|
11367
11469
|
if (dirty[0] & /*$apps*/
|
|
11368
|
-
|
|
11369
|
-
ctx[
|
|
11470
|
+
1048576 && !src_url_equal(img.src, img_src_value = /*icon*/
|
|
11471
|
+
ctx[45])) {
|
|
11370
11472
|
attr(img, "src", img_src_value);
|
|
11371
11473
|
}
|
|
11372
11474
|
if (dirty[0] & /*$apps*/
|
|
11373
|
-
|
|
11374
|
-
ctx[
|
|
11475
|
+
1048576 && img_alt_value !== (img_alt_value = /*kind*/
|
|
11476
|
+
ctx[47])) {
|
|
11375
11477
|
attr(img, "alt", img_alt_value);
|
|
11376
11478
|
}
|
|
11377
11479
|
if (dirty[0] & /*$apps*/
|
|
11378
|
-
|
|
11379
|
-
ctx[
|
|
11480
|
+
1048576 && img_title_value !== (img_title_value = /*label*/
|
|
11481
|
+
ctx[46])) {
|
|
11380
11482
|
attr(img, "title", img_title_value);
|
|
11381
11483
|
}
|
|
11382
11484
|
if (dirty[0] & /*$apps*/
|
|
11383
|
-
|
|
11384
|
-
ctx[
|
|
11485
|
+
1048576 && t1_value !== (t1_value = /*label*/
|
|
11486
|
+
ctx[46] + ""))
|
|
11385
11487
|
set_data(t1, t1_value);
|
|
11386
11488
|
if (dirty[0] & /*theme*/
|
|
11387
11489
|
2 && span_class_value !== (span_class_value = name5 + "-app-btn-text " + /*theme*/
|
|
@@ -11389,48 +11491,48 @@ function create_each_block4(ctx) {
|
|
|
11389
11491
|
attr(span, "class", span_class_value);
|
|
11390
11492
|
}
|
|
11391
11493
|
if (dirty[0] & /*$apps, theme*/
|
|
11392
|
-
|
|
11393
|
-
ctx[
|
|
11494
|
+
1048578 && button_class_value !== (button_class_value = name5 + "-app-btn " + /*kind*/
|
|
11495
|
+
ctx[47] + " " + /*theme*/
|
|
11394
11496
|
ctx[1])) {
|
|
11395
11497
|
attr(button, "class", button_class_value);
|
|
11396
11498
|
}
|
|
11397
11499
|
if (dirty[0] & /*$apps, $status*/
|
|
11398
|
-
|
|
11399
|
-
ctx[
|
|
11400
|
-
(ctx[
|
|
11401
|
-
ctx[
|
|
11402
|
-
ctx[
|
|
11500
|
+
3145728 && button_title_value !== (button_title_value = /*label*/
|
|
11501
|
+
ctx[46] + /*state*/
|
|
11502
|
+
(ctx[49] && /*state*/
|
|
11503
|
+
ctx[49].reason ? ": " + /*state*/
|
|
11504
|
+
ctx[49].reason : ""))) {
|
|
11403
11505
|
attr(button, "title", button_title_value);
|
|
11404
11506
|
}
|
|
11405
11507
|
if (dirty[0] & /*$apps*/
|
|
11406
|
-
|
|
11407
|
-
ctx[
|
|
11508
|
+
1048576 && button_data_app_kind_value !== (button_data_app_kind_value = /*netless_app*/
|
|
11509
|
+
ctx[44].kind)) {
|
|
11408
11510
|
attr(button, "data-app-kind", button_data_app_kind_value);
|
|
11409
11511
|
}
|
|
11410
11512
|
if (dirty[0] & /*$status, $apps*/
|
|
11411
|
-
|
|
11412
|
-
ctx[
|
|
11413
|
-
ctx[
|
|
11513
|
+
3145728 && button_disabled_value !== (button_disabled_value = /*state*/
|
|
11514
|
+
ctx[49] && /*state*/
|
|
11515
|
+
ctx[49].status !== "idle")) {
|
|
11414
11516
|
button.disabled = button_disabled_value;
|
|
11415
11517
|
}
|
|
11416
11518
|
if (dirty[0] & /*$apps, theme, $status, $apps*/
|
|
11417
|
-
|
|
11519
|
+
3145730) {
|
|
11418
11520
|
toggle_class(
|
|
11419
11521
|
button,
|
|
11420
11522
|
"is-loading",
|
|
11421
11523
|
/*state*/
|
|
11422
|
-
ctx[
|
|
11423
|
-
ctx[
|
|
11524
|
+
ctx[49] && /*state*/
|
|
11525
|
+
ctx[49].status === "loading"
|
|
11424
11526
|
);
|
|
11425
11527
|
}
|
|
11426
11528
|
if (dirty[0] & /*$apps, theme, $status, $apps*/
|
|
11427
|
-
|
|
11529
|
+
3145730) {
|
|
11428
11530
|
toggle_class(
|
|
11429
11531
|
button,
|
|
11430
11532
|
"is-failed",
|
|
11431
11533
|
/*state*/
|
|
11432
|
-
ctx[
|
|
11433
|
-
ctx[
|
|
11534
|
+
ctx[49] && /*state*/
|
|
11535
|
+
ctx[49].status === "failed"
|
|
11434
11536
|
);
|
|
11435
11537
|
}
|
|
11436
11538
|
},
|
|
@@ -11525,6 +11627,10 @@ function create_fragment67(ctx) {
|
|
|
11525
11627
|
disabled: (
|
|
11526
11628
|
/*disabled*/
|
|
11527
11629
|
ctx[3]
|
|
11630
|
+
),
|
|
11631
|
+
colors: (
|
|
11632
|
+
/*colors*/
|
|
11633
|
+
ctx[9]
|
|
11528
11634
|
)
|
|
11529
11635
|
}
|
|
11530
11636
|
});
|
|
@@ -11541,6 +11647,10 @@ function create_fragment67(ctx) {
|
|
|
11541
11647
|
disabled: (
|
|
11542
11648
|
/*disabled*/
|
|
11543
11649
|
ctx[3]
|
|
11650
|
+
),
|
|
11651
|
+
colors: (
|
|
11652
|
+
/*colors*/
|
|
11653
|
+
ctx[9]
|
|
11544
11654
|
)
|
|
11545
11655
|
}
|
|
11546
11656
|
});
|
|
@@ -11593,12 +11703,16 @@ function create_fragment67(ctx) {
|
|
|
11593
11703
|
disabled: (
|
|
11594
11704
|
/*disabled*/
|
|
11595
11705
|
ctx[3]
|
|
11706
|
+
),
|
|
11707
|
+
colors: (
|
|
11708
|
+
/*colors*/
|
|
11709
|
+
ctx[9]
|
|
11596
11710
|
)
|
|
11597
11711
|
}
|
|
11598
11712
|
});
|
|
11599
11713
|
let each_value = (
|
|
11600
11714
|
/*$apps*/
|
|
11601
|
-
ctx[
|
|
11715
|
+
ctx[20]
|
|
11602
11716
|
);
|
|
11603
11717
|
let each_blocks = [];
|
|
11604
11718
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
@@ -11664,7 +11778,7 @@ function create_fragment67(ctx) {
|
|
|
11664
11778
|
div7,
|
|
11665
11779
|
"--n",
|
|
11666
11780
|
/*$apps*/
|
|
11667
|
-
ctx[
|
|
11781
|
+
ctx[20].length
|
|
11668
11782
|
);
|
|
11669
11783
|
attr(div8, "class", name5 + "-panel-wrapper");
|
|
11670
11784
|
set_style(div8, "display", "none");
|
|
@@ -11693,11 +11807,11 @@ function create_fragment67(ctx) {
|
|
|
11693
11807
|
append(div2, div1);
|
|
11694
11808
|
append(div2, t5);
|
|
11695
11809
|
mount_component(strokecolor0, div2, null);
|
|
11696
|
-
ctx[
|
|
11810
|
+
ctx[37](div2);
|
|
11697
11811
|
append(div8, t6);
|
|
11698
11812
|
append(div8, div3);
|
|
11699
11813
|
mount_component(textcolor, div3, null);
|
|
11700
|
-
ctx[
|
|
11814
|
+
ctx[38](div3);
|
|
11701
11815
|
append(div8, t7);
|
|
11702
11816
|
append(div8, div6);
|
|
11703
11817
|
mount_component(selectshapes, div6, null);
|
|
@@ -11709,7 +11823,7 @@ function create_fragment67(ctx) {
|
|
|
11709
11823
|
append(div6, div5);
|
|
11710
11824
|
append(div6, t11);
|
|
11711
11825
|
mount_component(strokecolor1, div6, null);
|
|
11712
|
-
ctx[
|
|
11826
|
+
ctx[39](div6);
|
|
11713
11827
|
append(div8, t12);
|
|
11714
11828
|
append(div8, div7);
|
|
11715
11829
|
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
@@ -11717,7 +11831,7 @@ function create_fragment67(ctx) {
|
|
|
11717
11831
|
each_blocks[i].m(div7, null);
|
|
11718
11832
|
}
|
|
11719
11833
|
}
|
|
11720
|
-
ctx[
|
|
11834
|
+
ctx[41](div7);
|
|
11721
11835
|
current = true;
|
|
11722
11836
|
if (!mounted) {
|
|
11723
11837
|
dispose = [
|
|
@@ -11731,7 +11845,7 @@ function create_fragment67(ctx) {
|
|
|
11731
11845
|
null,
|
|
11732
11846
|
div0,
|
|
11733
11847
|
/*top*/
|
|
11734
|
-
ctx[
|
|
11848
|
+
ctx[22]
|
|
11735
11849
|
))
|
|
11736
11850
|
];
|
|
11737
11851
|
mounted = true;
|
|
@@ -11761,9 +11875,9 @@ function create_fragment67(ctx) {
|
|
|
11761
11875
|
});
|
|
11762
11876
|
check_outros();
|
|
11763
11877
|
}
|
|
11764
|
-
if (dirty[0] & /*appliance, theme, btn_props, c, clicker, items, selector, pencil_panel, pencil, text_panel, text, app, t, shapes_panel, eraser, hand
|
|
11765
|
-
|
|
11766
|
-
|
|
11878
|
+
if (dirty[0] & /*appliance, theme, btn_props, c, clicker, items, selector, pencil_panel, pencil, text_panel, text, app, t, shapes_panel, eraser, hand*/
|
|
11879
|
+
2114632835 | dirty[1] & /*clear, laserPointer*/
|
|
11880
|
+
3) {
|
|
11767
11881
|
each_value_1 = /*items*/
|
|
11768
11882
|
ctx2[7];
|
|
11769
11883
|
let i;
|
|
@@ -11872,6 +11986,10 @@ function create_fragment67(ctx) {
|
|
|
11872
11986
|
8)
|
|
11873
11987
|
strokecolor0_changes.disabled = /*disabled*/
|
|
11874
11988
|
ctx2[3];
|
|
11989
|
+
if (dirty[0] & /*colors*/
|
|
11990
|
+
512)
|
|
11991
|
+
strokecolor0_changes.colors = /*colors*/
|
|
11992
|
+
ctx2[9];
|
|
11875
11993
|
strokecolor0.$set(strokecolor0_changes);
|
|
11876
11994
|
const textcolor_changes = {};
|
|
11877
11995
|
if (dirty[0] & /*app*/
|
|
@@ -11886,6 +12004,10 @@ function create_fragment67(ctx) {
|
|
|
11886
12004
|
8)
|
|
11887
12005
|
textcolor_changes.disabled = /*disabled*/
|
|
11888
12006
|
ctx2[3];
|
|
12007
|
+
if (dirty[0] & /*colors*/
|
|
12008
|
+
512)
|
|
12009
|
+
textcolor_changes.colors = /*colors*/
|
|
12010
|
+
ctx2[9];
|
|
11889
12011
|
textcolor.$set(textcolor_changes);
|
|
11890
12012
|
const selectshapes_changes = {};
|
|
11891
12013
|
if (dirty[0] & /*app*/
|
|
@@ -11932,11 +12054,15 @@ function create_fragment67(ctx) {
|
|
|
11932
12054
|
8)
|
|
11933
12055
|
strokecolor1_changes.disabled = /*disabled*/
|
|
11934
12056
|
ctx2[3];
|
|
12057
|
+
if (dirty[0] & /*colors*/
|
|
12058
|
+
512)
|
|
12059
|
+
strokecolor1_changes.colors = /*colors*/
|
|
12060
|
+
ctx2[9];
|
|
11935
12061
|
strokecolor1.$set(strokecolor1_changes);
|
|
11936
12062
|
if (dirty[0] & /*$apps, theme, $status, app*/
|
|
11937
|
-
|
|
12063
|
+
3145731) {
|
|
11938
12064
|
each_value = /*$apps*/
|
|
11939
|
-
ctx2[
|
|
12065
|
+
ctx2[20];
|
|
11940
12066
|
let i;
|
|
11941
12067
|
for (i = 0; i < each_value.length; i += 1) {
|
|
11942
12068
|
const child_ctx = get_each_context4(ctx2, each_value, i);
|
|
@@ -11954,12 +12080,12 @@ function create_fragment67(ctx) {
|
|
|
11954
12080
|
each_blocks.length = each_value.length;
|
|
11955
12081
|
}
|
|
11956
12082
|
if (!current || dirty[0] & /*$apps*/
|
|
11957
|
-
|
|
12083
|
+
1048576) {
|
|
11958
12084
|
set_style(
|
|
11959
12085
|
div7,
|
|
11960
12086
|
"--n",
|
|
11961
12087
|
/*$apps*/
|
|
11962
|
-
ctx2[
|
|
12088
|
+
ctx2[20].length
|
|
11963
12089
|
);
|
|
11964
12090
|
}
|
|
11965
12091
|
},
|
|
@@ -12016,15 +12142,15 @@ function create_fragment67(ctx) {
|
|
|
12016
12142
|
detach(div8);
|
|
12017
12143
|
destroy_component(strokewidth0);
|
|
12018
12144
|
destroy_component(strokecolor0);
|
|
12019
|
-
ctx[36](null);
|
|
12020
|
-
destroy_component(textcolor);
|
|
12021
12145
|
ctx[37](null);
|
|
12146
|
+
destroy_component(textcolor);
|
|
12147
|
+
ctx[38](null);
|
|
12022
12148
|
destroy_component(selectshapes);
|
|
12023
12149
|
destroy_component(strokewidth1);
|
|
12024
12150
|
destroy_component(strokecolor1);
|
|
12025
|
-
ctx[
|
|
12151
|
+
ctx[39](null);
|
|
12026
12152
|
destroy_each(each_blocks, detaching);
|
|
12027
|
-
ctx[
|
|
12153
|
+
ctx[41](null);
|
|
12028
12154
|
mounted = false;
|
|
12029
12155
|
run_all(dispose);
|
|
12030
12156
|
}
|
|
@@ -12040,11 +12166,11 @@ function instance67($$self, $$props, $$invalidate) {
|
|
|
12040
12166
|
let status;
|
|
12041
12167
|
let max_scroll;
|
|
12042
12168
|
let $top;
|
|
12043
|
-
let $scroll_height, $$unsubscribe_scroll_height = noop, $$subscribe_scroll_height = () => ($$unsubscribe_scroll_height(), $$unsubscribe_scroll_height = subscribe(scroll_height, ($$value) => $$invalidate(
|
|
12044
|
-
let $memberState, $$unsubscribe_memberState = noop, $$subscribe_memberState = () => ($$unsubscribe_memberState(), $$unsubscribe_memberState = subscribe(memberState, ($$value) => $$invalidate(
|
|
12169
|
+
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);
|
|
12170
|
+
let $memberState, $$unsubscribe_memberState = noop, $$subscribe_memberState = () => ($$unsubscribe_memberState(), $$unsubscribe_memberState = subscribe(memberState, ($$value) => $$invalidate(36, $memberState = $$value)), memberState);
|
|
12045
12171
|
let $apps;
|
|
12046
|
-
let $status, $$unsubscribe_status = noop, $$subscribe_status = () => ($$unsubscribe_status(), $$unsubscribe_status = subscribe(status, ($$value) => $$invalidate(
|
|
12047
|
-
component_subscribe($$self, apps, ($$value) => $$invalidate(
|
|
12172
|
+
let $status, $$unsubscribe_status = noop, $$subscribe_status = () => ($$unsubscribe_status(), $$unsubscribe_status = subscribe(status, ($$value) => $$invalidate(21, $status = $$value)), status);
|
|
12173
|
+
component_subscribe($$self, apps, ($$value) => $$invalidate(20, $apps = $$value));
|
|
12048
12174
|
$$self.$$.on_destroy.push(() => $$unsubscribe_scroll_height());
|
|
12049
12175
|
$$self.$$.on_destroy.push(() => $$unsubscribe_memberState());
|
|
12050
12176
|
$$self.$$.on_destroy.push(() => $$unsubscribe_status());
|
|
@@ -12059,13 +12185,14 @@ function instance67($$self, $$props, $$invalidate) {
|
|
|
12059
12185
|
let { placement = "left" } = $$props;
|
|
12060
12186
|
let { items = default_items } = $$props;
|
|
12061
12187
|
let { hide_apps = false } = $$props;
|
|
12188
|
+
let { colors: colors2 = default_colors } = $$props;
|
|
12062
12189
|
let pencil_panel;
|
|
12063
12190
|
let text_panel;
|
|
12064
12191
|
let shapes_panel;
|
|
12065
12192
|
let apps_panel;
|
|
12066
12193
|
let btn_props;
|
|
12067
12194
|
let top = writable(0);
|
|
12068
|
-
component_subscribe($$self, top, (value) => $$invalidate(
|
|
12195
|
+
component_subscribe($$self, top, (value) => $$invalidate(43, $top = value));
|
|
12069
12196
|
function scroll_up() {
|
|
12070
12197
|
set_store_value(top, $top = clamp($top - 32 - 4, 0, max_scroll), $top);
|
|
12071
12198
|
}
|
|
@@ -12099,19 +12226,19 @@ function instance67($$self, $$props, $$invalidate) {
|
|
|
12099
12226
|
function div2_binding($$value) {
|
|
12100
12227
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
12101
12228
|
pencil_panel = $$value;
|
|
12102
|
-
$$invalidate(
|
|
12229
|
+
$$invalidate(11, pencil_panel);
|
|
12103
12230
|
});
|
|
12104
12231
|
}
|
|
12105
12232
|
function div3_binding($$value) {
|
|
12106
12233
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
12107
12234
|
text_panel = $$value;
|
|
12108
|
-
$$invalidate(
|
|
12235
|
+
$$invalidate(12, text_panel);
|
|
12109
12236
|
});
|
|
12110
12237
|
}
|
|
12111
12238
|
function div6_binding($$value) {
|
|
12112
12239
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
12113
12240
|
shapes_panel = $$value;
|
|
12114
|
-
$$invalidate(
|
|
12241
|
+
$$invalidate(13, shapes_panel);
|
|
12115
12242
|
});
|
|
12116
12243
|
}
|
|
12117
12244
|
const func = (onClick) => {
|
|
@@ -12121,7 +12248,7 @@ function instance67($$self, $$props, $$invalidate) {
|
|
|
12121
12248
|
function div7_binding($$value) {
|
|
12122
12249
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
12123
12250
|
apps_panel = $$value;
|
|
12124
|
-
$$invalidate(
|
|
12251
|
+
$$invalidate(14, apps_panel);
|
|
12125
12252
|
});
|
|
12126
12253
|
}
|
|
12127
12254
|
$$self.$$set = ($$props2) => {
|
|
@@ -12136,7 +12263,7 @@ function instance67($$self, $$props, $$invalidate) {
|
|
|
12136
12263
|
if ("scroll_height" in $$props2)
|
|
12137
12264
|
$$subscribe_scroll_height($$invalidate(4, scroll_height = $$props2.scroll_height));
|
|
12138
12265
|
if ("computed_height" in $$props2)
|
|
12139
|
-
$$invalidate(
|
|
12266
|
+
$$invalidate(33, computed_height = $$props2.computed_height);
|
|
12140
12267
|
if ("scrollable" in $$props2)
|
|
12141
12268
|
$$invalidate(5, scrollable = $$props2.scrollable);
|
|
12142
12269
|
if ("placement" in $$props2)
|
|
@@ -12145,11 +12272,13 @@ function instance67($$self, $$props, $$invalidate) {
|
|
|
12145
12272
|
$$invalidate(7, items = $$props2.items);
|
|
12146
12273
|
if ("hide_apps" in $$props2)
|
|
12147
12274
|
$$invalidate(8, hide_apps = $$props2.hide_apps);
|
|
12275
|
+
if ("colors" in $$props2)
|
|
12276
|
+
$$invalidate(9, colors2 = $$props2.colors);
|
|
12148
12277
|
};
|
|
12149
12278
|
$$self.$$.update = () => {
|
|
12150
12279
|
if ($$self.$$.dirty[0] & /*theme, disabled, placement*/
|
|
12151
12280
|
74) {
|
|
12152
|
-
$$invalidate(
|
|
12281
|
+
$$invalidate(15, btn_props = {
|
|
12153
12282
|
name: name5,
|
|
12154
12283
|
theme,
|
|
12155
12284
|
disabled,
|
|
@@ -12159,16 +12288,16 @@ function instance67($$self, $$props, $$invalidate) {
|
|
|
12159
12288
|
}
|
|
12160
12289
|
if ($$self.$$.dirty[0] & /*language*/
|
|
12161
12290
|
4) {
|
|
12162
|
-
$$invalidate(
|
|
12291
|
+
$$invalidate(10, t = i18n4[language]);
|
|
12163
12292
|
}
|
|
12164
12293
|
if ($$self.$$.dirty[0] & /*app*/
|
|
12165
12294
|
1) {
|
|
12166
|
-
$$invalidate(
|
|
12295
|
+
$$invalidate(34, hotkeys = app == null ? void 0 : app.hotKeys);
|
|
12167
12296
|
}
|
|
12168
12297
|
if ($$self.$$.dirty[0] & /*t*/
|
|
12169
|
-
|
|
12170
|
-
|
|
12171
|
-
$$invalidate(
|
|
12298
|
+
1024 | $$self.$$.dirty[1] & /*hotkeys*/
|
|
12299
|
+
8) {
|
|
12300
|
+
$$invalidate(19, c = {
|
|
12172
12301
|
clicker: tooltip(t.clicker, hotkeys == null ? void 0 : hotkeys.changeToClick),
|
|
12173
12302
|
selector: tooltip(t.selector, hotkeys == null ? void 0 : hotkeys.changeToSelector),
|
|
12174
12303
|
pencil: tooltip(t.pencil, hotkeys == null ? void 0 : hotkeys.changeToPencil),
|
|
@@ -12180,19 +12309,19 @@ function instance67($$self, $$props, $$invalidate) {
|
|
|
12180
12309
|
}
|
|
12181
12310
|
if ($$self.$$.dirty[0] & /*app*/
|
|
12182
12311
|
1) {
|
|
12183
|
-
$$subscribe_memberState($$invalidate(
|
|
12312
|
+
$$subscribe_memberState($$invalidate(18, memberState = app == null ? void 0 : app.memberState));
|
|
12184
12313
|
}
|
|
12185
12314
|
if ($$self.$$.dirty[1] & /*$memberState*/
|
|
12186
|
-
|
|
12187
|
-
$$invalidate(
|
|
12315
|
+
32) {
|
|
12316
|
+
$$invalidate(17, appliance = $memberState == null ? void 0 : $memberState.currentApplianceName);
|
|
12188
12317
|
}
|
|
12189
12318
|
if ($$self.$$.dirty[0] & /*app*/
|
|
12190
12319
|
1) {
|
|
12191
|
-
$$subscribe_status($$invalidate(
|
|
12320
|
+
$$subscribe_status($$invalidate(16, status = app == null ? void 0 : app.appsStatus));
|
|
12192
12321
|
}
|
|
12193
12322
|
if ($$self.$$.dirty[0] & /*scrollable*/
|
|
12194
12323
|
32 | $$self.$$.dirty[1] & /*$scroll_height, computed_height*/
|
|
12195
|
-
|
|
12324
|
+
20) {
|
|
12196
12325
|
max_scroll = scrollable ? $scroll_height + (32 + 8) * 2 - computed_height : 0;
|
|
12197
12326
|
}
|
|
12198
12327
|
};
|
|
@@ -12206,6 +12335,7 @@ function instance67($$self, $$props, $$invalidate) {
|
|
|
12206
12335
|
placement,
|
|
12207
12336
|
items,
|
|
12208
12337
|
hide_apps,
|
|
12338
|
+
colors2,
|
|
12209
12339
|
t,
|
|
12210
12340
|
pencil_panel,
|
|
12211
12341
|
text_panel,
|
|
@@ -12255,11 +12385,12 @@ var Contents = class extends SvelteComponent {
|
|
|
12255
12385
|
language: 2,
|
|
12256
12386
|
disabled: 3,
|
|
12257
12387
|
scroll_height: 4,
|
|
12258
|
-
computed_height:
|
|
12388
|
+
computed_height: 33,
|
|
12259
12389
|
scrollable: 5,
|
|
12260
12390
|
placement: 6,
|
|
12261
12391
|
items: 7,
|
|
12262
|
-
hide_apps: 8
|
|
12392
|
+
hide_apps: 8,
|
|
12393
|
+
colors: 9
|
|
12263
12394
|
},
|
|
12264
12395
|
null,
|
|
12265
12396
|
[-1, -1]
|
|
@@ -12358,30 +12489,34 @@ function create_fragment68(ctx) {
|
|
|
12358
12489
|
),
|
|
12359
12490
|
disabled: (
|
|
12360
12491
|
/*disabled*/
|
|
12361
|
-
ctx[
|
|
12492
|
+
ctx[10]
|
|
12362
12493
|
),
|
|
12363
12494
|
scroll_height: (
|
|
12364
12495
|
/*scroll_height*/
|
|
12365
|
-
ctx[
|
|
12496
|
+
ctx[14]
|
|
12366
12497
|
),
|
|
12367
12498
|
computed_height: (
|
|
12368
12499
|
/*computed_height*/
|
|
12369
|
-
ctx[
|
|
12500
|
+
ctx[9]
|
|
12370
12501
|
),
|
|
12371
12502
|
scrollable: (
|
|
12372
12503
|
/*scrollable*/
|
|
12373
|
-
ctx[
|
|
12504
|
+
ctx[8]
|
|
12374
12505
|
),
|
|
12375
12506
|
placement: (
|
|
12376
12507
|
/*placement*/
|
|
12377
|
-
ctx[
|
|
12508
|
+
ctx[7]
|
|
12378
12509
|
),
|
|
12379
12510
|
items: (
|
|
12380
12511
|
/*items*/
|
|
12381
|
-
ctx[
|
|
12512
|
+
ctx[6]
|
|
12382
12513
|
),
|
|
12383
12514
|
hide_apps: (
|
|
12384
12515
|
/*hide_apps*/
|
|
12516
|
+
ctx[5]
|
|
12517
|
+
),
|
|
12518
|
+
colors: (
|
|
12519
|
+
/*colors*/
|
|
12385
12520
|
ctx[4]
|
|
12386
12521
|
)
|
|
12387
12522
|
}
|
|
@@ -12415,9 +12550,9 @@ function create_fragment68(ctx) {
|
|
|
12415
12550
|
div0,
|
|
12416
12551
|
"height",
|
|
12417
12552
|
/*scrollable*/
|
|
12418
|
-
ctx[
|
|
12553
|
+
ctx[8] ? (
|
|
12419
12554
|
/*computed_height*/
|
|
12420
|
-
ctx[
|
|
12555
|
+
ctx[9] + "px"
|
|
12421
12556
|
) : "auto"
|
|
12422
12557
|
);
|
|
12423
12558
|
attr(input, "type", "checkbox");
|
|
@@ -12463,13 +12598,13 @@ function create_fragment68(ctx) {
|
|
|
12463
12598
|
input,
|
|
12464
12599
|
"change",
|
|
12465
12600
|
/*input_change_handler*/
|
|
12466
|
-
ctx[
|
|
12601
|
+
ctx[20]
|
|
12467
12602
|
),
|
|
12468
12603
|
action_destroyer(height.call(
|
|
12469
12604
|
null,
|
|
12470
12605
|
div1,
|
|
12471
12606
|
/*container_height*/
|
|
12472
|
-
ctx[
|
|
12607
|
+
ctx[13]
|
|
12473
12608
|
))
|
|
12474
12609
|
];
|
|
12475
12610
|
mounted = true;
|
|
@@ -12490,28 +12625,32 @@ function create_fragment68(ctx) {
|
|
|
12490
12625
|
contents_changes.language = /*language*/
|
|
12491
12626
|
ctx2[2];
|
|
12492
12627
|
if (dirty & /*disabled*/
|
|
12493
|
-
|
|
12628
|
+
1024)
|
|
12494
12629
|
contents_changes.disabled = /*disabled*/
|
|
12495
|
-
ctx2[
|
|
12630
|
+
ctx2[10];
|
|
12496
12631
|
if (dirty & /*computed_height*/
|
|
12497
|
-
|
|
12632
|
+
512)
|
|
12498
12633
|
contents_changes.computed_height = /*computed_height*/
|
|
12499
|
-
ctx2[
|
|
12634
|
+
ctx2[9];
|
|
12500
12635
|
if (dirty & /*scrollable*/
|
|
12501
|
-
|
|
12636
|
+
256)
|
|
12502
12637
|
contents_changes.scrollable = /*scrollable*/
|
|
12503
|
-
ctx2[
|
|
12638
|
+
ctx2[8];
|
|
12504
12639
|
if (dirty & /*placement*/
|
|
12505
|
-
|
|
12640
|
+
128)
|
|
12506
12641
|
contents_changes.placement = /*placement*/
|
|
12507
|
-
ctx2[
|
|
12642
|
+
ctx2[7];
|
|
12508
12643
|
if (dirty & /*items*/
|
|
12509
|
-
|
|
12644
|
+
64)
|
|
12510
12645
|
contents_changes.items = /*items*/
|
|
12511
|
-
ctx2[
|
|
12646
|
+
ctx2[6];
|
|
12512
12647
|
if (dirty & /*hide_apps*/
|
|
12513
|
-
|
|
12648
|
+
32)
|
|
12514
12649
|
contents_changes.hide_apps = /*hide_apps*/
|
|
12650
|
+
ctx2[5];
|
|
12651
|
+
if (dirty & /*colors*/
|
|
12652
|
+
16)
|
|
12653
|
+
contents_changes.colors = /*colors*/
|
|
12515
12654
|
ctx2[4];
|
|
12516
12655
|
contents.$set(contents_changes);
|
|
12517
12656
|
if (!current || dirty & /*theme*/
|
|
@@ -12520,14 +12659,14 @@ function create_fragment68(ctx) {
|
|
|
12520
12659
|
attr(div0, "class", div0_class_value);
|
|
12521
12660
|
}
|
|
12522
12661
|
if (dirty & /*scrollable, computed_height*/
|
|
12523
|
-
|
|
12662
|
+
768) {
|
|
12524
12663
|
set_style(
|
|
12525
12664
|
div0,
|
|
12526
12665
|
"height",
|
|
12527
12666
|
/*scrollable*/
|
|
12528
|
-
ctx2[
|
|
12667
|
+
ctx2[8] ? (
|
|
12529
12668
|
/*computed_height*/
|
|
12530
|
-
ctx2[
|
|
12669
|
+
ctx2[9] + "px"
|
|
12531
12670
|
) : "auto"
|
|
12532
12671
|
);
|
|
12533
12672
|
}
|
|
@@ -12596,10 +12735,11 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
12596
12735
|
let placement;
|
|
12597
12736
|
let items;
|
|
12598
12737
|
let hide_apps;
|
|
12738
|
+
let colors2;
|
|
12599
12739
|
let $container_height;
|
|
12600
12740
|
let $scroll_height;
|
|
12601
|
-
let $phase, $$unsubscribe_phase = noop, $$subscribe_phase = () => ($$unsubscribe_phase(), $$unsubscribe_phase = subscribe(phase, ($$value) => $$invalidate(
|
|
12602
|
-
let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(
|
|
12741
|
+
let $phase, $$unsubscribe_phase = noop, $$subscribe_phase = () => ($$unsubscribe_phase(), $$unsubscribe_phase = subscribe(phase, ($$value) => $$invalidate(18, $phase = $$value)), phase);
|
|
12742
|
+
let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(19, $writable = $$value)), writable2);
|
|
12603
12743
|
$$self.$$.on_destroy.push(() => $$unsubscribe_phase());
|
|
12604
12744
|
$$self.$$.on_destroy.push(() => $$unsubscribe_writable());
|
|
12605
12745
|
let { app = null } = $$props;
|
|
@@ -12609,9 +12749,9 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
12609
12749
|
const extra_height = (32 + 4 + 4) * 2;
|
|
12610
12750
|
let collapsed = config.collapsed;
|
|
12611
12751
|
let container_height = writable(0);
|
|
12612
|
-
component_subscribe($$self, container_height, (value) => $$invalidate(
|
|
12752
|
+
component_subscribe($$self, container_height, (value) => $$invalidate(16, $container_height = value));
|
|
12613
12753
|
let scroll_height = writable(0);
|
|
12614
|
-
component_subscribe($$self, scroll_height, (value) => $$invalidate(
|
|
12754
|
+
component_subscribe($$self, scroll_height, (value) => $$invalidate(17, $scroll_height = value));
|
|
12615
12755
|
function input_change_handler() {
|
|
12616
12756
|
collapsed = this.checked;
|
|
12617
12757
|
$$invalidate(3, collapsed);
|
|
@@ -12624,41 +12764,45 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
12624
12764
|
if ("language" in $$props2)
|
|
12625
12765
|
$$invalidate(2, language = $$props2.language);
|
|
12626
12766
|
if ("config" in $$props2)
|
|
12627
|
-
$$invalidate(
|
|
12767
|
+
$$invalidate(15, config = $$props2.config);
|
|
12628
12768
|
};
|
|
12629
12769
|
$$self.$$.update = () => {
|
|
12630
12770
|
var _a;
|
|
12631
12771
|
if ($$self.$$.dirty & /*app*/
|
|
12632
12772
|
1) {
|
|
12633
|
-
$$subscribe_writable($$invalidate(
|
|
12773
|
+
$$subscribe_writable($$invalidate(12, writable2 = app == null ? void 0 : app.writable));
|
|
12634
12774
|
}
|
|
12635
12775
|
if ($$self.$$.dirty & /*app*/
|
|
12636
12776
|
1) {
|
|
12637
|
-
$$subscribe_phase($$invalidate(
|
|
12777
|
+
$$subscribe_phase($$invalidate(11, phase = app == null ? void 0 : app.phase));
|
|
12638
12778
|
}
|
|
12639
12779
|
if ($$self.$$.dirty & /*$writable, $phase*/
|
|
12640
|
-
|
|
12641
|
-
$$invalidate(
|
|
12780
|
+
786432) {
|
|
12781
|
+
$$invalidate(10, disabled = !($writable && $phase === "connected"));
|
|
12642
12782
|
}
|
|
12643
12783
|
if ($$self.$$.dirty & /*$container_height, $scroll_height*/
|
|
12644
|
-
|
|
12645
|
-
$$invalidate(
|
|
12784
|
+
196608) {
|
|
12785
|
+
$$invalidate(9, computed_height = clamp($container_height, extra_height, $scroll_height + extra_height));
|
|
12646
12786
|
}
|
|
12647
12787
|
if ($$self.$$.dirty & /*$scroll_height, $container_height*/
|
|
12648
|
-
|
|
12649
|
-
$$invalidate(
|
|
12788
|
+
196608) {
|
|
12789
|
+
$$invalidate(8, scrollable = $scroll_height + extra_height > $container_height);
|
|
12650
12790
|
}
|
|
12651
12791
|
if ($$self.$$.dirty & /*config*/
|
|
12652
|
-
|
|
12653
|
-
$$invalidate(
|
|
12792
|
+
32768) {
|
|
12793
|
+
$$invalidate(7, placement = config.placement || "left");
|
|
12654
12794
|
}
|
|
12655
12795
|
if ($$self.$$.dirty & /*config*/
|
|
12656
|
-
|
|
12657
|
-
$$invalidate(
|
|
12796
|
+
32768) {
|
|
12797
|
+
$$invalidate(6, items = config.items || default_items);
|
|
12658
12798
|
}
|
|
12659
12799
|
if ($$self.$$.dirty & /*config*/
|
|
12660
|
-
|
|
12661
|
-
$$invalidate(
|
|
12800
|
+
32768) {
|
|
12801
|
+
$$invalidate(5, hide_apps = ((_a = config.apps) == null ? void 0 : _a.enable) === false);
|
|
12802
|
+
}
|
|
12803
|
+
if ($$self.$$.dirty & /*config*/
|
|
12804
|
+
32768) {
|
|
12805
|
+
$$invalidate(4, colors2 = (config == null ? void 0 : config.colors) && config.colors.length && config.colors || default_colors);
|
|
12662
12806
|
}
|
|
12663
12807
|
};
|
|
12664
12808
|
return [
|
|
@@ -12666,6 +12810,7 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
12666
12810
|
theme,
|
|
12667
12811
|
language,
|
|
12668
12812
|
collapsed,
|
|
12813
|
+
colors2,
|
|
12669
12814
|
hide_apps,
|
|
12670
12815
|
items,
|
|
12671
12816
|
placement,
|
|
@@ -12691,7 +12836,7 @@ var Toolbar = class extends SvelteComponent {
|
|
|
12691
12836
|
app: 0,
|
|
12692
12837
|
theme: 1,
|
|
12693
12838
|
language: 2,
|
|
12694
|
-
config:
|
|
12839
|
+
config: 15
|
|
12695
12840
|
});
|
|
12696
12841
|
}
|
|
12697
12842
|
};
|
|
@@ -14696,16 +14841,45 @@ var Fastboard_default = Fastboard;
|
|
|
14696
14841
|
// src/helpers/index.ts
|
|
14697
14842
|
function createUI(app, div) {
|
|
14698
14843
|
let fastboard;
|
|
14844
|
+
let colors2;
|
|
14845
|
+
if ((app == null ? void 0 : app.manager) && app.manager.room) {
|
|
14846
|
+
const floatBarOptions = app.manager.room.floatBarOptions;
|
|
14847
|
+
if (floatBarOptions.colors) {
|
|
14848
|
+
colors2 = floatBarOptions.colors;
|
|
14849
|
+
}
|
|
14850
|
+
}
|
|
14699
14851
|
const ui = {
|
|
14700
14852
|
mount(div2, props) {
|
|
14853
|
+
var _a;
|
|
14701
14854
|
if (fastboard) {
|
|
14702
14855
|
fastboard.$destroy();
|
|
14703
14856
|
}
|
|
14857
|
+
if ((_a = props == null ? void 0 : props.config) == null ? void 0 : _a.toolbar) {
|
|
14858
|
+
const _colors = props.config.toolbar.colors;
|
|
14859
|
+
if (!_colors && colors2) {
|
|
14860
|
+
props.config = __spreadProps(__spreadValues({}, props.config), {
|
|
14861
|
+
toolbar: __spreadProps(__spreadValues({}, props.config.toolbar), {
|
|
14862
|
+
colors: colors2
|
|
14863
|
+
})
|
|
14864
|
+
});
|
|
14865
|
+
}
|
|
14866
|
+
}
|
|
14704
14867
|
fastboard = new Fastboard_default({ target: div2, props: __spreadValues({ app }, props) });
|
|
14705
14868
|
return ui;
|
|
14706
14869
|
},
|
|
14707
14870
|
update(props) {
|
|
14871
|
+
var _a;
|
|
14708
14872
|
if (fastboard && props) {
|
|
14873
|
+
if ((_a = props == null ? void 0 : props.config) == null ? void 0 : _a.toolbar) {
|
|
14874
|
+
const _colors = props.config.toolbar.colors;
|
|
14875
|
+
if (!_colors && colors2) {
|
|
14876
|
+
props.config = __spreadProps(__spreadValues({}, props.config), {
|
|
14877
|
+
toolbar: __spreadProps(__spreadValues({}, props.config.toolbar), {
|
|
14878
|
+
colors: colors2
|
|
14879
|
+
})
|
|
14880
|
+
});
|
|
14881
|
+
}
|
|
14882
|
+
}
|
|
14709
14883
|
fastboard.$set(props);
|
|
14710
14884
|
}
|
|
14711
14885
|
},
|