@netless/fastboard-ui 0.3.22-beta.1 → 0.3.22-beta.2
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/index.js +148 -176
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +148 -176
- package/dist/index.mjs.map +1 -1
- package/dist/index.svelte.mjs +148 -176
- package/dist/index.svelte.mjs.map +1 -1
- package/package.json +3 -3
- package/src/components/Fastboard/Fastboard.svelte +1 -23
- package/src/components/Toolbar/Toolbar.svelte +15 -2
- package/src/helpers/index.ts +8 -20
package/dist/index.js
CHANGED
|
@@ -13217,15 +13217,15 @@ function create_fragment68(ctx) {
|
|
|
13217
13217
|
props: {
|
|
13218
13218
|
app: (
|
|
13219
13219
|
/*app*/
|
|
13220
|
-
ctx[
|
|
13220
|
+
ctx[1]
|
|
13221
13221
|
),
|
|
13222
13222
|
theme: (
|
|
13223
13223
|
/*theme*/
|
|
13224
|
-
ctx[
|
|
13224
|
+
ctx[2]
|
|
13225
13225
|
),
|
|
13226
13226
|
language: (
|
|
13227
13227
|
/*language*/
|
|
13228
|
-
ctx[
|
|
13228
|
+
ctx[3]
|
|
13229
13229
|
),
|
|
13230
13230
|
disabled: (
|
|
13231
13231
|
/*disabled*/
|
|
@@ -13257,14 +13257,14 @@ function create_fragment68(ctx) {
|
|
|
13257
13257
|
),
|
|
13258
13258
|
colors: (
|
|
13259
13259
|
/*colors*/
|
|
13260
|
-
ctx[
|
|
13260
|
+
ctx[0]
|
|
13261
13261
|
)
|
|
13262
13262
|
}
|
|
13263
13263
|
});
|
|
13264
13264
|
function select_block_type(ctx2, dirty) {
|
|
13265
13265
|
if (
|
|
13266
13266
|
/*collapsed*/
|
|
13267
|
-
ctx2[
|
|
13267
|
+
ctx2[4]
|
|
13268
13268
|
)
|
|
13269
13269
|
return create_if_block15;
|
|
13270
13270
|
return create_else_block14;
|
|
@@ -13285,7 +13285,7 @@ function create_fragment68(ctx) {
|
|
|
13285
13285
|
path1 = svg_element("path");
|
|
13286
13286
|
if_block.c();
|
|
13287
13287
|
attr(div0, "class", div0_class_value = name6 + "-contents " + /*theme*/
|
|
13288
|
-
ctx[
|
|
13288
|
+
ctx[2]);
|
|
13289
13289
|
set_style(
|
|
13290
13290
|
div0,
|
|
13291
13291
|
"height",
|
|
@@ -13307,14 +13307,14 @@ function create_fragment68(ctx) {
|
|
|
13307
13307
|
attr(svg, "stroke-width", "2");
|
|
13308
13308
|
attr(svg, "viewBox", "0 0 32 120");
|
|
13309
13309
|
attr(label, "class", label_class_value = name6 + "-handler " + /*theme*/
|
|
13310
|
-
ctx[
|
|
13310
|
+
ctx[2]);
|
|
13311
13311
|
attr(div1, "class", div1_class_value = name6 + " " + /*theme*/
|
|
13312
|
-
ctx[
|
|
13312
|
+
ctx[2]);
|
|
13313
13313
|
toggle_class(
|
|
13314
13314
|
div1,
|
|
13315
13315
|
"collapsed",
|
|
13316
13316
|
/*collapsed*/
|
|
13317
|
-
ctx[
|
|
13317
|
+
ctx[4]
|
|
13318
13318
|
);
|
|
13319
13319
|
},
|
|
13320
13320
|
m(target, anchor) {
|
|
@@ -13325,7 +13325,7 @@ function create_fragment68(ctx) {
|
|
|
13325
13325
|
append(div1, label);
|
|
13326
13326
|
append(label, input);
|
|
13327
13327
|
input.checked = /*collapsed*/
|
|
13328
|
-
ctx[
|
|
13328
|
+
ctx[4];
|
|
13329
13329
|
append(label, t1);
|
|
13330
13330
|
append(label, svg);
|
|
13331
13331
|
append(svg, path0);
|
|
@@ -13353,17 +13353,17 @@ function create_fragment68(ctx) {
|
|
|
13353
13353
|
p(ctx2, [dirty]) {
|
|
13354
13354
|
const contents_changes = {};
|
|
13355
13355
|
if (dirty & /*app*/
|
|
13356
|
-
|
|
13356
|
+
2)
|
|
13357
13357
|
contents_changes.app = /*app*/
|
|
13358
|
-
ctx2[
|
|
13358
|
+
ctx2[1];
|
|
13359
13359
|
if (dirty & /*theme*/
|
|
13360
|
-
|
|
13360
|
+
4)
|
|
13361
13361
|
contents_changes.theme = /*theme*/
|
|
13362
|
-
ctx2[
|
|
13362
|
+
ctx2[2];
|
|
13363
13363
|
if (dirty & /*language*/
|
|
13364
|
-
|
|
13364
|
+
8)
|
|
13365
13365
|
contents_changes.language = /*language*/
|
|
13366
|
-
ctx2[
|
|
13366
|
+
ctx2[3];
|
|
13367
13367
|
if (dirty & /*disabled*/
|
|
13368
13368
|
1024)
|
|
13369
13369
|
contents_changes.disabled = /*disabled*/
|
|
@@ -13389,13 +13389,13 @@ function create_fragment68(ctx) {
|
|
|
13389
13389
|
contents_changes.hide_apps = /*hide_apps*/
|
|
13390
13390
|
ctx2[5];
|
|
13391
13391
|
if (dirty & /*colors*/
|
|
13392
|
-
|
|
13392
|
+
1)
|
|
13393
13393
|
contents_changes.colors = /*colors*/
|
|
13394
|
-
ctx2[
|
|
13394
|
+
ctx2[0];
|
|
13395
13395
|
contents.$set(contents_changes);
|
|
13396
13396
|
if (!current || dirty & /*theme*/
|
|
13397
|
-
|
|
13398
|
-
ctx2[
|
|
13397
|
+
4 && div0_class_value !== (div0_class_value = name6 + "-contents " + /*theme*/
|
|
13398
|
+
ctx2[2])) {
|
|
13399
13399
|
attr(div0, "class", div0_class_value);
|
|
13400
13400
|
}
|
|
13401
13401
|
if (dirty & /*scrollable, computed_height*/
|
|
@@ -13411,9 +13411,9 @@ function create_fragment68(ctx) {
|
|
|
13411
13411
|
);
|
|
13412
13412
|
}
|
|
13413
13413
|
if (dirty & /*collapsed*/
|
|
13414
|
-
|
|
13414
|
+
16) {
|
|
13415
13415
|
input.checked = /*collapsed*/
|
|
13416
|
-
ctx2[
|
|
13416
|
+
ctx2[4];
|
|
13417
13417
|
}
|
|
13418
13418
|
if (current_block_type === (current_block_type = select_block_type(ctx2)) && if_block) {
|
|
13419
13419
|
if_block.p(ctx2, dirty);
|
|
@@ -13426,22 +13426,22 @@ function create_fragment68(ctx) {
|
|
|
13426
13426
|
}
|
|
13427
13427
|
}
|
|
13428
13428
|
if (!current || dirty & /*theme*/
|
|
13429
|
-
|
|
13430
|
-
ctx2[
|
|
13429
|
+
4 && label_class_value !== (label_class_value = name6 + "-handler " + /*theme*/
|
|
13430
|
+
ctx2[2])) {
|
|
13431
13431
|
attr(label, "class", label_class_value);
|
|
13432
13432
|
}
|
|
13433
13433
|
if (!current || dirty & /*theme*/
|
|
13434
|
-
|
|
13435
|
-
ctx2[
|
|
13434
|
+
4 && div1_class_value !== (div1_class_value = name6 + " " + /*theme*/
|
|
13435
|
+
ctx2[2])) {
|
|
13436
13436
|
attr(div1, "class", div1_class_value);
|
|
13437
13437
|
}
|
|
13438
13438
|
if (!current || dirty & /*theme, collapsed*/
|
|
13439
|
-
|
|
13439
|
+
20) {
|
|
13440
13440
|
toggle_class(
|
|
13441
13441
|
div1,
|
|
13442
13442
|
"collapsed",
|
|
13443
13443
|
/*collapsed*/
|
|
13444
|
-
ctx2[
|
|
13444
|
+
ctx2[4]
|
|
13445
13445
|
);
|
|
13446
13446
|
}
|
|
13447
13447
|
},
|
|
@@ -13475,7 +13475,6 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
13475
13475
|
let placement;
|
|
13476
13476
|
let items;
|
|
13477
13477
|
let hide_apps;
|
|
13478
|
-
let colors2;
|
|
13479
13478
|
let $container_height;
|
|
13480
13479
|
let $scroll_height;
|
|
13481
13480
|
let $phase, $$unsubscribe_phase = noop, $$subscribe_phase = () => ($$unsubscribe_phase(), $$unsubscribe_phase = subscribe(phase, ($$value) => $$invalidate(18, $phase = $$value)), phase);
|
|
@@ -13486,6 +13485,7 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
13486
13485
|
let { theme = "light" } = $$props;
|
|
13487
13486
|
let { language = "en" } = $$props;
|
|
13488
13487
|
let { config = {} } = $$props;
|
|
13488
|
+
let { colors: colors2 = void 0 } = $$props;
|
|
13489
13489
|
const extra_height = (32 + 4 + 4) * 2;
|
|
13490
13490
|
let collapsed = config.collapsed;
|
|
13491
13491
|
let container_height = writable(0);
|
|
@@ -13494,26 +13494,28 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
13494
13494
|
component_subscribe($$self, scroll_height, (value) => $$invalidate(17, $scroll_height = value));
|
|
13495
13495
|
function input_change_handler() {
|
|
13496
13496
|
collapsed = this.checked;
|
|
13497
|
-
$$invalidate(
|
|
13497
|
+
$$invalidate(4, collapsed);
|
|
13498
13498
|
}
|
|
13499
13499
|
$$self.$$set = ($$props2) => {
|
|
13500
13500
|
if ("app" in $$props2)
|
|
13501
|
-
$$invalidate(
|
|
13501
|
+
$$invalidate(1, app = $$props2.app);
|
|
13502
13502
|
if ("theme" in $$props2)
|
|
13503
|
-
$$invalidate(
|
|
13503
|
+
$$invalidate(2, theme = $$props2.theme);
|
|
13504
13504
|
if ("language" in $$props2)
|
|
13505
|
-
$$invalidate(
|
|
13505
|
+
$$invalidate(3, language = $$props2.language);
|
|
13506
13506
|
if ("config" in $$props2)
|
|
13507
13507
|
$$invalidate(15, config = $$props2.config);
|
|
13508
|
+
if ("colors" in $$props2)
|
|
13509
|
+
$$invalidate(0, colors2 = $$props2.colors);
|
|
13508
13510
|
};
|
|
13509
13511
|
$$self.$$.update = () => {
|
|
13510
|
-
var _a;
|
|
13512
|
+
var _a, _b;
|
|
13511
13513
|
if ($$self.$$.dirty & /*app*/
|
|
13512
|
-
|
|
13514
|
+
2) {
|
|
13513
13515
|
$$subscribe_writable($$invalidate(12, writable2 = app == null ? void 0 : app.writable));
|
|
13514
13516
|
}
|
|
13515
13517
|
if ($$self.$$.dirty & /*app*/
|
|
13516
|
-
|
|
13518
|
+
2) {
|
|
13517
13519
|
$$subscribe_phase($$invalidate(11, phase = app == null ? void 0 : app.phase));
|
|
13518
13520
|
}
|
|
13519
13521
|
if ($$self.$$.dirty & /*$writable, $phase*/
|
|
@@ -13540,17 +13542,28 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
13540
13542
|
32768) {
|
|
13541
13543
|
$$invalidate(5, hide_apps = ((_a = config.apps) == null ? void 0 : _a.enable) === false);
|
|
13542
13544
|
}
|
|
13543
|
-
if ($$self.$$.dirty & /*config*/
|
|
13544
|
-
|
|
13545
|
-
|
|
13545
|
+
if ($$self.$$.dirty & /*app, colors, config*/
|
|
13546
|
+
32771) {
|
|
13547
|
+
if ((app == null ? void 0 : app.manager) && (app == null ? void 0 : app.manager.room)) {
|
|
13548
|
+
if (colors2 && !((_b = config.colors) == null ? void 0 : _b.length)) {
|
|
13549
|
+
const floatBarOptions = app == null ? void 0 : app.manager.room.floatBarOptions;
|
|
13550
|
+
if (floatBarOptions.colors) {
|
|
13551
|
+
$$invalidate(0, colors2 = floatBarOptions.colors);
|
|
13552
|
+
}
|
|
13553
|
+
} else {
|
|
13554
|
+
$$invalidate(0, colors2 = config.colors);
|
|
13555
|
+
}
|
|
13556
|
+
} else {
|
|
13557
|
+
$$invalidate(0, colors2 = default_colors);
|
|
13558
|
+
}
|
|
13546
13559
|
}
|
|
13547
13560
|
};
|
|
13548
13561
|
return [
|
|
13562
|
+
colors2,
|
|
13549
13563
|
app,
|
|
13550
13564
|
theme,
|
|
13551
13565
|
language,
|
|
13552
13566
|
collapsed,
|
|
13553
|
-
colors2,
|
|
13554
13567
|
hide_apps,
|
|
13555
13568
|
items,
|
|
13556
13569
|
placement,
|
|
@@ -13573,10 +13586,11 @@ var Toolbar = class extends SvelteComponent {
|
|
|
13573
13586
|
constructor(options) {
|
|
13574
13587
|
super();
|
|
13575
13588
|
init(this, options, instance68, create_fragment68, safe_not_equal, {
|
|
13576
|
-
app:
|
|
13577
|
-
theme:
|
|
13578
|
-
language:
|
|
13579
|
-
config: 15
|
|
13589
|
+
app: 1,
|
|
13590
|
+
theme: 2,
|
|
13591
|
+
language: 3,
|
|
13592
|
+
config: 15,
|
|
13593
|
+
colors: 0
|
|
13580
13594
|
});
|
|
13581
13595
|
}
|
|
13582
13596
|
};
|
|
@@ -14944,19 +14958,19 @@ function create_if_block_32(ctx) {
|
|
|
14944
14958
|
props: {
|
|
14945
14959
|
app: (
|
|
14946
14960
|
/*app*/
|
|
14947
|
-
ctx[
|
|
14961
|
+
ctx[0]
|
|
14948
14962
|
),
|
|
14949
14963
|
theme: (
|
|
14950
14964
|
/*theme*/
|
|
14951
|
-
ctx[
|
|
14965
|
+
ctx[1]
|
|
14952
14966
|
),
|
|
14953
14967
|
language: (
|
|
14954
14968
|
/*language*/
|
|
14955
|
-
ctx[
|
|
14969
|
+
ctx[2]
|
|
14956
14970
|
),
|
|
14957
14971
|
config: (
|
|
14958
14972
|
/*config*/
|
|
14959
|
-
ctx[
|
|
14973
|
+
ctx[3].toolbar || {}
|
|
14960
14974
|
)
|
|
14961
14975
|
}
|
|
14962
14976
|
});
|
|
@@ -14971,21 +14985,21 @@ function create_if_block_32(ctx) {
|
|
|
14971
14985
|
p(ctx2, dirty) {
|
|
14972
14986
|
const toolbar_changes = {};
|
|
14973
14987
|
if (dirty & /*app*/
|
|
14974
|
-
|
|
14988
|
+
1)
|
|
14975
14989
|
toolbar_changes.app = /*app*/
|
|
14976
|
-
ctx2[
|
|
14990
|
+
ctx2[0];
|
|
14977
14991
|
if (dirty & /*theme*/
|
|
14978
|
-
|
|
14992
|
+
2)
|
|
14979
14993
|
toolbar_changes.theme = /*theme*/
|
|
14980
|
-
ctx2[
|
|
14994
|
+
ctx2[1];
|
|
14981
14995
|
if (dirty & /*language*/
|
|
14982
|
-
|
|
14996
|
+
4)
|
|
14983
14997
|
toolbar_changes.language = /*language*/
|
|
14984
|
-
ctx2[
|
|
14998
|
+
ctx2[2];
|
|
14985
14999
|
if (dirty & /*config*/
|
|
14986
|
-
|
|
15000
|
+
8)
|
|
14987
15001
|
toolbar_changes.config = /*config*/
|
|
14988
|
-
ctx2[
|
|
15002
|
+
ctx2[3].toolbar || {};
|
|
14989
15003
|
toolbar.$set(toolbar_changes);
|
|
14990
15004
|
},
|
|
14991
15005
|
i(local) {
|
|
@@ -15010,15 +15024,15 @@ function create_if_block_23(ctx) {
|
|
|
15010
15024
|
props: {
|
|
15011
15025
|
app: (
|
|
15012
15026
|
/*app*/
|
|
15013
|
-
ctx[
|
|
15027
|
+
ctx[0]
|
|
15014
15028
|
),
|
|
15015
15029
|
theme: (
|
|
15016
15030
|
/*theme*/
|
|
15017
|
-
ctx[
|
|
15031
|
+
ctx[1]
|
|
15018
15032
|
),
|
|
15019
15033
|
language: (
|
|
15020
15034
|
/*language*/
|
|
15021
|
-
ctx[
|
|
15035
|
+
ctx[2]
|
|
15022
15036
|
)
|
|
15023
15037
|
}
|
|
15024
15038
|
});
|
|
@@ -15033,17 +15047,17 @@ function create_if_block_23(ctx) {
|
|
|
15033
15047
|
p(ctx2, dirty) {
|
|
15034
15048
|
const redoundo_changes = {};
|
|
15035
15049
|
if (dirty & /*app*/
|
|
15036
|
-
|
|
15050
|
+
1)
|
|
15037
15051
|
redoundo_changes.app = /*app*/
|
|
15038
|
-
ctx2[
|
|
15052
|
+
ctx2[0];
|
|
15039
15053
|
if (dirty & /*theme*/
|
|
15040
|
-
|
|
15054
|
+
2)
|
|
15041
15055
|
redoundo_changes.theme = /*theme*/
|
|
15042
|
-
ctx2[
|
|
15056
|
+
ctx2[1];
|
|
15043
15057
|
if (dirty & /*language*/
|
|
15044
|
-
|
|
15058
|
+
4)
|
|
15045
15059
|
redoundo_changes.language = /*language*/
|
|
15046
|
-
ctx2[
|
|
15060
|
+
ctx2[2];
|
|
15047
15061
|
redoundo.$set(redoundo_changes);
|
|
15048
15062
|
},
|
|
15049
15063
|
i(local) {
|
|
@@ -15068,15 +15082,15 @@ function create_if_block_14(ctx) {
|
|
|
15068
15082
|
props: {
|
|
15069
15083
|
app: (
|
|
15070
15084
|
/*app*/
|
|
15071
|
-
ctx[
|
|
15085
|
+
ctx[0]
|
|
15072
15086
|
),
|
|
15073
15087
|
theme: (
|
|
15074
15088
|
/*theme*/
|
|
15075
|
-
ctx[
|
|
15089
|
+
ctx[1]
|
|
15076
15090
|
),
|
|
15077
15091
|
language: (
|
|
15078
15092
|
/*language*/
|
|
15079
|
-
ctx[
|
|
15093
|
+
ctx[2]
|
|
15080
15094
|
)
|
|
15081
15095
|
}
|
|
15082
15096
|
});
|
|
@@ -15091,17 +15105,17 @@ function create_if_block_14(ctx) {
|
|
|
15091
15105
|
p(ctx2, dirty) {
|
|
15092
15106
|
const zoomcontrol_changes = {};
|
|
15093
15107
|
if (dirty & /*app*/
|
|
15094
|
-
|
|
15108
|
+
1)
|
|
15095
15109
|
zoomcontrol_changes.app = /*app*/
|
|
15096
|
-
ctx2[
|
|
15110
|
+
ctx2[0];
|
|
15097
15111
|
if (dirty & /*theme*/
|
|
15098
|
-
|
|
15112
|
+
2)
|
|
15099
15113
|
zoomcontrol_changes.theme = /*theme*/
|
|
15100
|
-
ctx2[
|
|
15114
|
+
ctx2[1];
|
|
15101
15115
|
if (dirty & /*language*/
|
|
15102
|
-
|
|
15116
|
+
4)
|
|
15103
15117
|
zoomcontrol_changes.language = /*language*/
|
|
15104
|
-
ctx2[
|
|
15118
|
+
ctx2[2];
|
|
15105
15119
|
zoomcontrol.$set(zoomcontrol_changes);
|
|
15106
15120
|
},
|
|
15107
15121
|
i(local) {
|
|
@@ -15126,15 +15140,15 @@ function create_if_block18(ctx) {
|
|
|
15126
15140
|
props: {
|
|
15127
15141
|
app: (
|
|
15128
15142
|
/*app*/
|
|
15129
|
-
ctx[
|
|
15143
|
+
ctx[0]
|
|
15130
15144
|
),
|
|
15131
15145
|
theme: (
|
|
15132
15146
|
/*theme*/
|
|
15133
|
-
ctx[
|
|
15147
|
+
ctx[1]
|
|
15134
15148
|
),
|
|
15135
15149
|
language: (
|
|
15136
15150
|
/*language*/
|
|
15137
|
-
ctx[
|
|
15151
|
+
ctx[2]
|
|
15138
15152
|
)
|
|
15139
15153
|
}
|
|
15140
15154
|
});
|
|
@@ -15149,17 +15163,17 @@ function create_if_block18(ctx) {
|
|
|
15149
15163
|
p(ctx2, dirty) {
|
|
15150
15164
|
const pagecontrol_changes = {};
|
|
15151
15165
|
if (dirty & /*app*/
|
|
15152
|
-
|
|
15166
|
+
1)
|
|
15153
15167
|
pagecontrol_changes.app = /*app*/
|
|
15154
|
-
ctx2[
|
|
15168
|
+
ctx2[0];
|
|
15155
15169
|
if (dirty & /*theme*/
|
|
15156
|
-
|
|
15170
|
+
2)
|
|
15157
15171
|
pagecontrol_changes.theme = /*theme*/
|
|
15158
|
-
ctx2[
|
|
15172
|
+
ctx2[1];
|
|
15159
15173
|
if (dirty & /*language*/
|
|
15160
|
-
|
|
15174
|
+
4)
|
|
15161
15175
|
pagecontrol_changes.language = /*language*/
|
|
15162
|
-
ctx2[
|
|
15176
|
+
ctx2[2];
|
|
15163
15177
|
pagecontrol.$set(pagecontrol_changes);
|
|
15164
15178
|
},
|
|
15165
15179
|
i(local) {
|
|
@@ -15194,19 +15208,19 @@ function create_fragment71(ctx) {
|
|
|
15194
15208
|
let dispose;
|
|
15195
15209
|
let if_block0 = (
|
|
15196
15210
|
/*config*/
|
|
15197
|
-
((_a = ctx[
|
|
15211
|
+
((_a = ctx[3].toolbar) == null ? void 0 : _a.enable) !== false && create_if_block_32(ctx)
|
|
15198
15212
|
);
|
|
15199
15213
|
let if_block1 = (
|
|
15200
15214
|
/*config*/
|
|
15201
|
-
((_b = ctx[
|
|
15215
|
+
((_b = ctx[3].redo_undo) == null ? void 0 : _b.enable) !== false && create_if_block_23(ctx)
|
|
15202
15216
|
);
|
|
15203
15217
|
let if_block2 = (
|
|
15204
15218
|
/*config*/
|
|
15205
|
-
((_c = ctx[
|
|
15219
|
+
((_c = ctx[3].zoom_control) == null ? void 0 : _c.enable) !== false && create_if_block_14(ctx)
|
|
15206
15220
|
);
|
|
15207
15221
|
let if_block3 = (
|
|
15208
15222
|
/*config*/
|
|
15209
|
-
((_d = ctx[
|
|
15223
|
+
((_d = ctx[3].page_control) == null ? void 0 : _d.enable) !== false && create_if_block18(ctx)
|
|
15210
15224
|
);
|
|
15211
15225
|
return {
|
|
15212
15226
|
c() {
|
|
@@ -15230,7 +15244,7 @@ function create_fragment71(ctx) {
|
|
|
15230
15244
|
if_block3.c();
|
|
15231
15245
|
attr(div0, "class", name9 + "-view");
|
|
15232
15246
|
attr(div1, "class", div1_class_value = name9 + "-" + /*config*/
|
|
15233
|
-
(((_a2 = ctx[
|
|
15247
|
+
(((_a2 = ctx[3].toolbar) == null ? void 0 : _a2.placement) || "left"));
|
|
15234
15248
|
toggle_class(div1, "hidden", !/*toolbar_has_items*/
|
|
15235
15249
|
ctx[6] || !/*layout*/
|
|
15236
15250
|
(ctx[5] === "visible" || /*layout*/
|
|
@@ -15251,12 +15265,12 @@ function create_fragment71(ctx) {
|
|
|
15251
15265
|
);
|
|
15252
15266
|
attr(div4, "class", name9 + "-root");
|
|
15253
15267
|
toggle_class(div4, "loading", !/*app*/
|
|
15254
|
-
ctx[
|
|
15268
|
+
ctx[0]);
|
|
15255
15269
|
},
|
|
15256
15270
|
m(target, anchor) {
|
|
15257
15271
|
insert(target, div4, anchor);
|
|
15258
15272
|
append(div4, div0);
|
|
15259
|
-
ctx[
|
|
15273
|
+
ctx[16](div0);
|
|
15260
15274
|
append(div4, t0);
|
|
15261
15275
|
append(div4, div1);
|
|
15262
15276
|
if (if_block0)
|
|
@@ -15288,12 +15302,12 @@ function create_fragment71(ctx) {
|
|
|
15288
15302
|
var _a2, _b2, _c2, _d2, _e;
|
|
15289
15303
|
if (
|
|
15290
15304
|
/*config*/
|
|
15291
|
-
((_a2 = ctx2[
|
|
15305
|
+
((_a2 = ctx2[3].toolbar) == null ? void 0 : _a2.enable) !== false
|
|
15292
15306
|
) {
|
|
15293
15307
|
if (if_block0) {
|
|
15294
15308
|
if_block0.p(ctx2, dirty);
|
|
15295
15309
|
if (dirty & /*config*/
|
|
15296
|
-
|
|
15310
|
+
8) {
|
|
15297
15311
|
transition_in(if_block0, 1);
|
|
15298
15312
|
}
|
|
15299
15313
|
} else {
|
|
@@ -15310,12 +15324,12 @@ function create_fragment71(ctx) {
|
|
|
15310
15324
|
check_outros();
|
|
15311
15325
|
}
|
|
15312
15326
|
if (!current || dirty & /*config*/
|
|
15313
|
-
|
|
15314
|
-
(((_b2 = ctx2[
|
|
15327
|
+
8 && div1_class_value !== (div1_class_value = name9 + "-" + /*config*/
|
|
15328
|
+
(((_b2 = ctx2[3].toolbar) == null ? void 0 : _b2.placement) || "left"))) {
|
|
15315
15329
|
attr(div1, "class", div1_class_value);
|
|
15316
15330
|
}
|
|
15317
15331
|
if (!current || dirty & /*config, toolbar_has_items, layout*/
|
|
15318
|
-
|
|
15332
|
+
104) {
|
|
15319
15333
|
toggle_class(div1, "hidden", !/*toolbar_has_items*/
|
|
15320
15334
|
ctx2[6] || !/*layout*/
|
|
15321
15335
|
(ctx2[5] === "visible" || /*layout*/
|
|
@@ -15323,12 +15337,12 @@ function create_fragment71(ctx) {
|
|
|
15323
15337
|
}
|
|
15324
15338
|
if (
|
|
15325
15339
|
/*config*/
|
|
15326
|
-
((_c2 = ctx2[
|
|
15340
|
+
((_c2 = ctx2[3].redo_undo) == null ? void 0 : _c2.enable) !== false
|
|
15327
15341
|
) {
|
|
15328
15342
|
if (if_block1) {
|
|
15329
15343
|
if_block1.p(ctx2, dirty);
|
|
15330
15344
|
if (dirty & /*config*/
|
|
15331
|
-
|
|
15345
|
+
8) {
|
|
15332
15346
|
transition_in(if_block1, 1);
|
|
15333
15347
|
}
|
|
15334
15348
|
} else {
|
|
@@ -15346,12 +15360,12 @@ function create_fragment71(ctx) {
|
|
|
15346
15360
|
}
|
|
15347
15361
|
if (
|
|
15348
15362
|
/*config*/
|
|
15349
|
-
((_d2 = ctx2[
|
|
15363
|
+
((_d2 = ctx2[3].zoom_control) == null ? void 0 : _d2.enable) !== false
|
|
15350
15364
|
) {
|
|
15351
15365
|
if (if_block2) {
|
|
15352
15366
|
if_block2.p(ctx2, dirty);
|
|
15353
15367
|
if (dirty & /*config*/
|
|
15354
|
-
|
|
15368
|
+
8) {
|
|
15355
15369
|
transition_in(if_block2, 1);
|
|
15356
15370
|
}
|
|
15357
15371
|
} else {
|
|
@@ -15378,12 +15392,12 @@ function create_fragment71(ctx) {
|
|
|
15378
15392
|
}
|
|
15379
15393
|
if (
|
|
15380
15394
|
/*config*/
|
|
15381
|
-
((_e = ctx2[
|
|
15395
|
+
((_e = ctx2[3].page_control) == null ? void 0 : _e.enable) !== false
|
|
15382
15396
|
) {
|
|
15383
15397
|
if (if_block3) {
|
|
15384
15398
|
if_block3.p(ctx2, dirty);
|
|
15385
15399
|
if (dirty & /*config*/
|
|
15386
|
-
|
|
15400
|
+
8) {
|
|
15387
15401
|
transition_in(if_block3, 1);
|
|
15388
15402
|
}
|
|
15389
15403
|
} else {
|
|
@@ -15409,9 +15423,9 @@ function create_fragment71(ctx) {
|
|
|
15409
15423
|
);
|
|
15410
15424
|
}
|
|
15411
15425
|
if (!current || dirty & /*app*/
|
|
15412
|
-
|
|
15426
|
+
1) {
|
|
15413
15427
|
toggle_class(div4, "loading", !/*app*/
|
|
15414
|
-
ctx2[
|
|
15428
|
+
ctx2[0]);
|
|
15415
15429
|
}
|
|
15416
15430
|
},
|
|
15417
15431
|
i(local) {
|
|
@@ -15433,7 +15447,7 @@ function create_fragment71(ctx) {
|
|
|
15433
15447
|
d(detaching) {
|
|
15434
15448
|
if (detaching)
|
|
15435
15449
|
detach(div4);
|
|
15436
|
-
ctx[
|
|
15450
|
+
ctx[16](null);
|
|
15437
15451
|
if (if_block0)
|
|
15438
15452
|
if_block0.d();
|
|
15439
15453
|
if (if_block1)
|
|
@@ -15449,15 +15463,13 @@ function create_fragment71(ctx) {
|
|
|
15449
15463
|
}
|
|
15450
15464
|
var name9 = "fastboard";
|
|
15451
15465
|
function instance71($$self, $$props, $$invalidate) {
|
|
15452
|
-
let manager;
|
|
15453
|
-
let room;
|
|
15454
15466
|
let writable2;
|
|
15455
15467
|
let boxState;
|
|
15456
15468
|
let focusedApp;
|
|
15457
15469
|
let toolbar_has_items;
|
|
15458
|
-
let $focusedApp, $$unsubscribe_focusedApp = noop, $$subscribe_focusedApp = () => ($$unsubscribe_focusedApp(), $$unsubscribe_focusedApp = subscribe(focusedApp, ($$value) => $$invalidate(
|
|
15459
|
-
let $boxState, $$unsubscribe_boxState = noop, $$subscribe_boxState = () => ($$unsubscribe_boxState(), $$unsubscribe_boxState = subscribe(boxState, ($$value) => $$invalidate(
|
|
15460
|
-
let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(
|
|
15470
|
+
let $focusedApp, $$unsubscribe_focusedApp = noop, $$subscribe_focusedApp = () => ($$unsubscribe_focusedApp(), $$unsubscribe_focusedApp = subscribe(focusedApp, ($$value) => $$invalidate(13, $focusedApp = $$value)), focusedApp);
|
|
15471
|
+
let $boxState, $$unsubscribe_boxState = noop, $$subscribe_boxState = () => ($$unsubscribe_boxState(), $$unsubscribe_boxState = subscribe(boxState, ($$value) => $$invalidate(14, $boxState = $$value)), boxState);
|
|
15472
|
+
let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(15, $writable = $$value)), writable2);
|
|
15461
15473
|
$$self.$$.on_destroy.push(() => $$unsubscribe_focusedApp());
|
|
15462
15474
|
$$self.$$.on_destroy.push(() => $$unsubscribe_boxState());
|
|
15463
15475
|
$$self.$$.on_destroy.push(() => $$unsubscribe_writable());
|
|
@@ -15466,7 +15478,6 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15466
15478
|
let { language = "en" } = $$props;
|
|
15467
15479
|
let { containerRef = void 0 } = $$props;
|
|
15468
15480
|
let { config = {} } = $$props;
|
|
15469
|
-
let { colors: colors2 = void 0 } = $$props;
|
|
15470
15481
|
const AppsShowToolbar = ["DocsViewer", "Slide"];
|
|
15471
15482
|
let container;
|
|
15472
15483
|
let layout = "hidden";
|
|
@@ -15493,58 +15504,31 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15493
15504
|
}
|
|
15494
15505
|
$$self.$$set = ($$props2) => {
|
|
15495
15506
|
if ("app" in $$props2)
|
|
15496
|
-
$$invalidate(
|
|
15507
|
+
$$invalidate(0, app = $$props2.app);
|
|
15497
15508
|
if ("theme" in $$props2)
|
|
15498
|
-
$$invalidate(
|
|
15509
|
+
$$invalidate(1, theme = $$props2.theme);
|
|
15499
15510
|
if ("language" in $$props2)
|
|
15500
|
-
$$invalidate(
|
|
15511
|
+
$$invalidate(2, language = $$props2.language);
|
|
15501
15512
|
if ("containerRef" in $$props2)
|
|
15502
|
-
$$invalidate(
|
|
15513
|
+
$$invalidate(11, containerRef = $$props2.containerRef);
|
|
15503
15514
|
if ("config" in $$props2)
|
|
15504
|
-
$$invalidate(
|
|
15505
|
-
if ("colors" in $$props2)
|
|
15506
|
-
$$invalidate(11, colors2 = $$props2.colors);
|
|
15515
|
+
$$invalidate(3, config = $$props2.config);
|
|
15507
15516
|
};
|
|
15508
15517
|
$$self.$$.update = () => {
|
|
15509
15518
|
if ($$self.$$.dirty & /*app*/
|
|
15510
|
-
|
|
15511
|
-
$$invalidate(15, manager = app == null ? void 0 : app.manager);
|
|
15512
|
-
}
|
|
15513
|
-
if ($$self.$$.dirty & /*app*/
|
|
15514
|
-
2) {
|
|
15515
|
-
$$invalidate(14, room = app == null ? void 0 : app.manager.room);
|
|
15516
|
-
}
|
|
15517
|
-
if ($$self.$$.dirty & /*manager, room, config, colors*/
|
|
15518
|
-
51201) {
|
|
15519
|
-
if (manager && room) {
|
|
15520
|
-
const floatBarOptions = room.floatBarOptions;
|
|
15521
|
-
if (floatBarOptions.colors) {
|
|
15522
|
-
$$invalidate(11, colors2 = floatBarOptions.colors);
|
|
15523
|
-
}
|
|
15524
|
-
if (config == null ? void 0 : config.toolbar) {
|
|
15525
|
-
const _colors = config.toolbar.colors;
|
|
15526
|
-
if (!_colors && colors2) {
|
|
15527
|
-
$$invalidate(0, config = __spreadProps(__spreadValues({}, config), {
|
|
15528
|
-
toolbar: __spreadProps(__spreadValues({}, config.toolbar), { colors: colors2 })
|
|
15529
|
-
}));
|
|
15530
|
-
}
|
|
15531
|
-
}
|
|
15532
|
-
}
|
|
15533
|
-
}
|
|
15534
|
-
if ($$self.$$.dirty & /*app*/
|
|
15535
|
-
2) {
|
|
15519
|
+
1) {
|
|
15536
15520
|
$$subscribe_writable($$invalidate(9, writable2 = app == null ? void 0 : app.writable));
|
|
15537
15521
|
}
|
|
15538
15522
|
if ($$self.$$.dirty & /*app*/
|
|
15539
|
-
|
|
15523
|
+
1) {
|
|
15540
15524
|
$$subscribe_boxState($$invalidate(8, boxState = app == null ? void 0 : app.boxState));
|
|
15541
15525
|
}
|
|
15542
15526
|
if ($$self.$$.dirty & /*app*/
|
|
15543
|
-
|
|
15527
|
+
1) {
|
|
15544
15528
|
$$subscribe_focusedApp($$invalidate(7, focusedApp = app == null ? void 0 : app.focusedApp));
|
|
15545
15529
|
}
|
|
15546
15530
|
if ($$self.$$.dirty & /*$writable, $boxState, $focusedApp*/
|
|
15547
|
-
|
|
15531
|
+
57344) {
|
|
15548
15532
|
if (!$writable) {
|
|
15549
15533
|
$$invalidate(5, layout = "hidden");
|
|
15550
15534
|
} else if ($boxState === "maximized") {
|
|
@@ -15558,15 +15542,15 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15558
15542
|
}
|
|
15559
15543
|
}
|
|
15560
15544
|
if ($$self.$$.dirty & /*config*/
|
|
15561
|
-
|
|
15545
|
+
8) {
|
|
15562
15546
|
$$invalidate(6, toolbar_has_items = !config.toolbar || !config.toolbar.items || !config.toolbar.apps || config.toolbar.items.length > 0 || config.toolbar.apps.enable !== false);
|
|
15563
15547
|
}
|
|
15564
15548
|
if ($$self.$$.dirty & /*app, container*/
|
|
15565
|
-
|
|
15549
|
+
17) {
|
|
15566
15550
|
try {
|
|
15567
15551
|
if (app && container) {
|
|
15568
15552
|
app.bindContainer(container);
|
|
15569
|
-
$$invalidate(
|
|
15553
|
+
$$invalidate(12, mounted = true);
|
|
15570
15554
|
}
|
|
15571
15555
|
} catch (err) {
|
|
15572
15556
|
console.error("[fastboard] An error occurred while binding container");
|
|
@@ -15574,17 +15558,17 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15574
15558
|
}
|
|
15575
15559
|
}
|
|
15576
15560
|
if ($$self.$$.dirty & /*app, theme, mounted*/
|
|
15577
|
-
|
|
15561
|
+
4099) {
|
|
15578
15562
|
if (app && theme && mounted) {
|
|
15579
15563
|
app.manager.setPrefersColorScheme(theme);
|
|
15580
15564
|
}
|
|
15581
15565
|
}
|
|
15582
15566
|
};
|
|
15583
15567
|
return [
|
|
15584
|
-
config,
|
|
15585
15568
|
app,
|
|
15586
15569
|
theme,
|
|
15587
15570
|
language,
|
|
15571
|
+
config,
|
|
15588
15572
|
container,
|
|
15589
15573
|
layout,
|
|
15590
15574
|
toolbar_has_items,
|
|
@@ -15592,11 +15576,8 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15592
15576
|
boxState,
|
|
15593
15577
|
writable2,
|
|
15594
15578
|
focus_me,
|
|
15595
|
-
colors2,
|
|
15596
15579
|
containerRef,
|
|
15597
15580
|
mounted,
|
|
15598
|
-
room,
|
|
15599
|
-
manager,
|
|
15600
15581
|
$focusedApp,
|
|
15601
15582
|
$boxState,
|
|
15602
15583
|
$writable,
|
|
@@ -15607,12 +15588,11 @@ var Fastboard = class extends SvelteComponent {
|
|
|
15607
15588
|
constructor(options) {
|
|
15608
15589
|
super();
|
|
15609
15590
|
init(this, options, instance71, create_fragment71, not_equal, {
|
|
15610
|
-
app:
|
|
15611
|
-
theme:
|
|
15612
|
-
language:
|
|
15613
|
-
containerRef:
|
|
15614
|
-
config:
|
|
15615
|
-
colors: 11
|
|
15591
|
+
app: 0,
|
|
15592
|
+
theme: 1,
|
|
15593
|
+
language: 2,
|
|
15594
|
+
containerRef: 11,
|
|
15595
|
+
config: 3
|
|
15616
15596
|
});
|
|
15617
15597
|
}
|
|
15618
15598
|
};
|
|
@@ -15634,15 +15614,11 @@ function createUI(app, div) {
|
|
|
15634
15614
|
if (fastboard) {
|
|
15635
15615
|
fastboard.$destroy();
|
|
15636
15616
|
}
|
|
15637
|
-
if (
|
|
15638
|
-
|
|
15639
|
-
|
|
15640
|
-
props.config = __spreadProps(__spreadValues({}, props.config), {
|
|
15641
|
-
toolbar: __spreadProps(__spreadValues({}, props.config.toolbar), {
|
|
15642
|
-
colors: colors2
|
|
15643
|
-
})
|
|
15644
|
-
});
|
|
15617
|
+
if (colors2 && (props == null ? void 0 : props.config) && !((_a = props.config.toolbar) == null ? void 0 : _a.colors)) {
|
|
15618
|
+
if (!(props == null ? void 0 : props.config.toolbar)) {
|
|
15619
|
+
props.config.toolbar = {};
|
|
15645
15620
|
}
|
|
15621
|
+
props.config.toolbar.colors = colors2;
|
|
15646
15622
|
}
|
|
15647
15623
|
fastboard = new Fastboard_default({ target: div2, props: __spreadValues({ app }, props) });
|
|
15648
15624
|
return ui;
|
|
@@ -15650,15 +15626,11 @@ function createUI(app, div) {
|
|
|
15650
15626
|
update(props) {
|
|
15651
15627
|
var _a;
|
|
15652
15628
|
if (fastboard && props) {
|
|
15653
|
-
if (
|
|
15654
|
-
|
|
15655
|
-
|
|
15656
|
-
props.config = __spreadProps(__spreadValues({}, props.config), {
|
|
15657
|
-
toolbar: __spreadProps(__spreadValues({}, props.config.toolbar), {
|
|
15658
|
-
colors: colors2
|
|
15659
|
-
})
|
|
15660
|
-
});
|
|
15629
|
+
if (colors2 && (props == null ? void 0 : props.config) && !((_a = props.config.toolbar) == null ? void 0 : _a.colors)) {
|
|
15630
|
+
if (!(props == null ? void 0 : props.config.toolbar)) {
|
|
15631
|
+
props.config.toolbar = {};
|
|
15661
15632
|
}
|
|
15633
|
+
props.config.toolbar.colors = colors2;
|
|
15662
15634
|
}
|
|
15663
15635
|
fastboard.$set(props);
|
|
15664
15636
|
}
|