@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.mjs
CHANGED
|
@@ -13211,15 +13211,15 @@ function create_fragment68(ctx) {
|
|
|
13211
13211
|
props: {
|
|
13212
13212
|
app: (
|
|
13213
13213
|
/*app*/
|
|
13214
|
-
ctx[
|
|
13214
|
+
ctx[1]
|
|
13215
13215
|
),
|
|
13216
13216
|
theme: (
|
|
13217
13217
|
/*theme*/
|
|
13218
|
-
ctx[
|
|
13218
|
+
ctx[2]
|
|
13219
13219
|
),
|
|
13220
13220
|
language: (
|
|
13221
13221
|
/*language*/
|
|
13222
|
-
ctx[
|
|
13222
|
+
ctx[3]
|
|
13223
13223
|
),
|
|
13224
13224
|
disabled: (
|
|
13225
13225
|
/*disabled*/
|
|
@@ -13251,14 +13251,14 @@ function create_fragment68(ctx) {
|
|
|
13251
13251
|
),
|
|
13252
13252
|
colors: (
|
|
13253
13253
|
/*colors*/
|
|
13254
|
-
ctx[
|
|
13254
|
+
ctx[0]
|
|
13255
13255
|
)
|
|
13256
13256
|
}
|
|
13257
13257
|
});
|
|
13258
13258
|
function select_block_type(ctx2, dirty) {
|
|
13259
13259
|
if (
|
|
13260
13260
|
/*collapsed*/
|
|
13261
|
-
ctx2[
|
|
13261
|
+
ctx2[4]
|
|
13262
13262
|
)
|
|
13263
13263
|
return create_if_block15;
|
|
13264
13264
|
return create_else_block14;
|
|
@@ -13279,7 +13279,7 @@ function create_fragment68(ctx) {
|
|
|
13279
13279
|
path1 = svg_element("path");
|
|
13280
13280
|
if_block.c();
|
|
13281
13281
|
attr(div0, "class", div0_class_value = name6 + "-contents " + /*theme*/
|
|
13282
|
-
ctx[
|
|
13282
|
+
ctx[2]);
|
|
13283
13283
|
set_style(
|
|
13284
13284
|
div0,
|
|
13285
13285
|
"height",
|
|
@@ -13301,14 +13301,14 @@ function create_fragment68(ctx) {
|
|
|
13301
13301
|
attr(svg, "stroke-width", "2");
|
|
13302
13302
|
attr(svg, "viewBox", "0 0 32 120");
|
|
13303
13303
|
attr(label, "class", label_class_value = name6 + "-handler " + /*theme*/
|
|
13304
|
-
ctx[
|
|
13304
|
+
ctx[2]);
|
|
13305
13305
|
attr(div1, "class", div1_class_value = name6 + " " + /*theme*/
|
|
13306
|
-
ctx[
|
|
13306
|
+
ctx[2]);
|
|
13307
13307
|
toggle_class(
|
|
13308
13308
|
div1,
|
|
13309
13309
|
"collapsed",
|
|
13310
13310
|
/*collapsed*/
|
|
13311
|
-
ctx[
|
|
13311
|
+
ctx[4]
|
|
13312
13312
|
);
|
|
13313
13313
|
},
|
|
13314
13314
|
m(target, anchor) {
|
|
@@ -13319,7 +13319,7 @@ function create_fragment68(ctx) {
|
|
|
13319
13319
|
append(div1, label);
|
|
13320
13320
|
append(label, input);
|
|
13321
13321
|
input.checked = /*collapsed*/
|
|
13322
|
-
ctx[
|
|
13322
|
+
ctx[4];
|
|
13323
13323
|
append(label, t1);
|
|
13324
13324
|
append(label, svg);
|
|
13325
13325
|
append(svg, path0);
|
|
@@ -13347,17 +13347,17 @@ function create_fragment68(ctx) {
|
|
|
13347
13347
|
p(ctx2, [dirty]) {
|
|
13348
13348
|
const contents_changes = {};
|
|
13349
13349
|
if (dirty & /*app*/
|
|
13350
|
-
|
|
13350
|
+
2)
|
|
13351
13351
|
contents_changes.app = /*app*/
|
|
13352
|
-
ctx2[
|
|
13352
|
+
ctx2[1];
|
|
13353
13353
|
if (dirty & /*theme*/
|
|
13354
|
-
|
|
13354
|
+
4)
|
|
13355
13355
|
contents_changes.theme = /*theme*/
|
|
13356
|
-
ctx2[
|
|
13356
|
+
ctx2[2];
|
|
13357
13357
|
if (dirty & /*language*/
|
|
13358
|
-
|
|
13358
|
+
8)
|
|
13359
13359
|
contents_changes.language = /*language*/
|
|
13360
|
-
ctx2[
|
|
13360
|
+
ctx2[3];
|
|
13361
13361
|
if (dirty & /*disabled*/
|
|
13362
13362
|
1024)
|
|
13363
13363
|
contents_changes.disabled = /*disabled*/
|
|
@@ -13383,13 +13383,13 @@ function create_fragment68(ctx) {
|
|
|
13383
13383
|
contents_changes.hide_apps = /*hide_apps*/
|
|
13384
13384
|
ctx2[5];
|
|
13385
13385
|
if (dirty & /*colors*/
|
|
13386
|
-
|
|
13386
|
+
1)
|
|
13387
13387
|
contents_changes.colors = /*colors*/
|
|
13388
|
-
ctx2[
|
|
13388
|
+
ctx2[0];
|
|
13389
13389
|
contents.$set(contents_changes);
|
|
13390
13390
|
if (!current || dirty & /*theme*/
|
|
13391
|
-
|
|
13392
|
-
ctx2[
|
|
13391
|
+
4 && div0_class_value !== (div0_class_value = name6 + "-contents " + /*theme*/
|
|
13392
|
+
ctx2[2])) {
|
|
13393
13393
|
attr(div0, "class", div0_class_value);
|
|
13394
13394
|
}
|
|
13395
13395
|
if (dirty & /*scrollable, computed_height*/
|
|
@@ -13405,9 +13405,9 @@ function create_fragment68(ctx) {
|
|
|
13405
13405
|
);
|
|
13406
13406
|
}
|
|
13407
13407
|
if (dirty & /*collapsed*/
|
|
13408
|
-
|
|
13408
|
+
16) {
|
|
13409
13409
|
input.checked = /*collapsed*/
|
|
13410
|
-
ctx2[
|
|
13410
|
+
ctx2[4];
|
|
13411
13411
|
}
|
|
13412
13412
|
if (current_block_type === (current_block_type = select_block_type(ctx2)) && if_block) {
|
|
13413
13413
|
if_block.p(ctx2, dirty);
|
|
@@ -13420,22 +13420,22 @@ function create_fragment68(ctx) {
|
|
|
13420
13420
|
}
|
|
13421
13421
|
}
|
|
13422
13422
|
if (!current || dirty & /*theme*/
|
|
13423
|
-
|
|
13424
|
-
ctx2[
|
|
13423
|
+
4 && label_class_value !== (label_class_value = name6 + "-handler " + /*theme*/
|
|
13424
|
+
ctx2[2])) {
|
|
13425
13425
|
attr(label, "class", label_class_value);
|
|
13426
13426
|
}
|
|
13427
13427
|
if (!current || dirty & /*theme*/
|
|
13428
|
-
|
|
13429
|
-
ctx2[
|
|
13428
|
+
4 && div1_class_value !== (div1_class_value = name6 + " " + /*theme*/
|
|
13429
|
+
ctx2[2])) {
|
|
13430
13430
|
attr(div1, "class", div1_class_value);
|
|
13431
13431
|
}
|
|
13432
13432
|
if (!current || dirty & /*theme, collapsed*/
|
|
13433
|
-
|
|
13433
|
+
20) {
|
|
13434
13434
|
toggle_class(
|
|
13435
13435
|
div1,
|
|
13436
13436
|
"collapsed",
|
|
13437
13437
|
/*collapsed*/
|
|
13438
|
-
ctx2[
|
|
13438
|
+
ctx2[4]
|
|
13439
13439
|
);
|
|
13440
13440
|
}
|
|
13441
13441
|
},
|
|
@@ -13469,7 +13469,6 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
13469
13469
|
let placement;
|
|
13470
13470
|
let items;
|
|
13471
13471
|
let hide_apps;
|
|
13472
|
-
let colors2;
|
|
13473
13472
|
let $container_height;
|
|
13474
13473
|
let $scroll_height;
|
|
13475
13474
|
let $phase, $$unsubscribe_phase = noop, $$subscribe_phase = () => ($$unsubscribe_phase(), $$unsubscribe_phase = subscribe(phase, ($$value) => $$invalidate(18, $phase = $$value)), phase);
|
|
@@ -13480,6 +13479,7 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
13480
13479
|
let { theme = "light" } = $$props;
|
|
13481
13480
|
let { language = "en" } = $$props;
|
|
13482
13481
|
let { config = {} } = $$props;
|
|
13482
|
+
let { colors: colors2 = void 0 } = $$props;
|
|
13483
13483
|
const extra_height = (32 + 4 + 4) * 2;
|
|
13484
13484
|
let collapsed = config.collapsed;
|
|
13485
13485
|
let container_height = writable(0);
|
|
@@ -13488,26 +13488,28 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
13488
13488
|
component_subscribe($$self, scroll_height, (value) => $$invalidate(17, $scroll_height = value));
|
|
13489
13489
|
function input_change_handler() {
|
|
13490
13490
|
collapsed = this.checked;
|
|
13491
|
-
$$invalidate(
|
|
13491
|
+
$$invalidate(4, collapsed);
|
|
13492
13492
|
}
|
|
13493
13493
|
$$self.$$set = ($$props2) => {
|
|
13494
13494
|
if ("app" in $$props2)
|
|
13495
|
-
$$invalidate(
|
|
13495
|
+
$$invalidate(1, app = $$props2.app);
|
|
13496
13496
|
if ("theme" in $$props2)
|
|
13497
|
-
$$invalidate(
|
|
13497
|
+
$$invalidate(2, theme = $$props2.theme);
|
|
13498
13498
|
if ("language" in $$props2)
|
|
13499
|
-
$$invalidate(
|
|
13499
|
+
$$invalidate(3, language = $$props2.language);
|
|
13500
13500
|
if ("config" in $$props2)
|
|
13501
13501
|
$$invalidate(15, config = $$props2.config);
|
|
13502
|
+
if ("colors" in $$props2)
|
|
13503
|
+
$$invalidate(0, colors2 = $$props2.colors);
|
|
13502
13504
|
};
|
|
13503
13505
|
$$self.$$.update = () => {
|
|
13504
|
-
var _a;
|
|
13506
|
+
var _a, _b;
|
|
13505
13507
|
if ($$self.$$.dirty & /*app*/
|
|
13506
|
-
|
|
13508
|
+
2) {
|
|
13507
13509
|
$$subscribe_writable($$invalidate(12, writable2 = app == null ? void 0 : app.writable));
|
|
13508
13510
|
}
|
|
13509
13511
|
if ($$self.$$.dirty & /*app*/
|
|
13510
|
-
|
|
13512
|
+
2) {
|
|
13511
13513
|
$$subscribe_phase($$invalidate(11, phase = app == null ? void 0 : app.phase));
|
|
13512
13514
|
}
|
|
13513
13515
|
if ($$self.$$.dirty & /*$writable, $phase*/
|
|
@@ -13534,17 +13536,28 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
13534
13536
|
32768) {
|
|
13535
13537
|
$$invalidate(5, hide_apps = ((_a = config.apps) == null ? void 0 : _a.enable) === false);
|
|
13536
13538
|
}
|
|
13537
|
-
if ($$self.$$.dirty & /*config*/
|
|
13538
|
-
|
|
13539
|
-
|
|
13539
|
+
if ($$self.$$.dirty & /*app, colors, config*/
|
|
13540
|
+
32771) {
|
|
13541
|
+
if ((app == null ? void 0 : app.manager) && (app == null ? void 0 : app.manager.room)) {
|
|
13542
|
+
if (colors2 && !((_b = config.colors) == null ? void 0 : _b.length)) {
|
|
13543
|
+
const floatBarOptions = app == null ? void 0 : app.manager.room.floatBarOptions;
|
|
13544
|
+
if (floatBarOptions.colors) {
|
|
13545
|
+
$$invalidate(0, colors2 = floatBarOptions.colors);
|
|
13546
|
+
}
|
|
13547
|
+
} else {
|
|
13548
|
+
$$invalidate(0, colors2 = config.colors);
|
|
13549
|
+
}
|
|
13550
|
+
} else {
|
|
13551
|
+
$$invalidate(0, colors2 = default_colors);
|
|
13552
|
+
}
|
|
13540
13553
|
}
|
|
13541
13554
|
};
|
|
13542
13555
|
return [
|
|
13556
|
+
colors2,
|
|
13543
13557
|
app,
|
|
13544
13558
|
theme,
|
|
13545
13559
|
language,
|
|
13546
13560
|
collapsed,
|
|
13547
|
-
colors2,
|
|
13548
13561
|
hide_apps,
|
|
13549
13562
|
items,
|
|
13550
13563
|
placement,
|
|
@@ -13567,10 +13580,11 @@ var Toolbar = class extends SvelteComponent {
|
|
|
13567
13580
|
constructor(options) {
|
|
13568
13581
|
super();
|
|
13569
13582
|
init(this, options, instance68, create_fragment68, safe_not_equal, {
|
|
13570
|
-
app:
|
|
13571
|
-
theme:
|
|
13572
|
-
language:
|
|
13573
|
-
config: 15
|
|
13583
|
+
app: 1,
|
|
13584
|
+
theme: 2,
|
|
13585
|
+
language: 3,
|
|
13586
|
+
config: 15,
|
|
13587
|
+
colors: 0
|
|
13574
13588
|
});
|
|
13575
13589
|
}
|
|
13576
13590
|
};
|
|
@@ -14938,19 +14952,19 @@ function create_if_block_32(ctx) {
|
|
|
14938
14952
|
props: {
|
|
14939
14953
|
app: (
|
|
14940
14954
|
/*app*/
|
|
14941
|
-
ctx[
|
|
14955
|
+
ctx[0]
|
|
14942
14956
|
),
|
|
14943
14957
|
theme: (
|
|
14944
14958
|
/*theme*/
|
|
14945
|
-
ctx[
|
|
14959
|
+
ctx[1]
|
|
14946
14960
|
),
|
|
14947
14961
|
language: (
|
|
14948
14962
|
/*language*/
|
|
14949
|
-
ctx[
|
|
14963
|
+
ctx[2]
|
|
14950
14964
|
),
|
|
14951
14965
|
config: (
|
|
14952
14966
|
/*config*/
|
|
14953
|
-
ctx[
|
|
14967
|
+
ctx[3].toolbar || {}
|
|
14954
14968
|
)
|
|
14955
14969
|
}
|
|
14956
14970
|
});
|
|
@@ -14965,21 +14979,21 @@ function create_if_block_32(ctx) {
|
|
|
14965
14979
|
p(ctx2, dirty) {
|
|
14966
14980
|
const toolbar_changes = {};
|
|
14967
14981
|
if (dirty & /*app*/
|
|
14968
|
-
|
|
14982
|
+
1)
|
|
14969
14983
|
toolbar_changes.app = /*app*/
|
|
14970
|
-
ctx2[
|
|
14984
|
+
ctx2[0];
|
|
14971
14985
|
if (dirty & /*theme*/
|
|
14972
|
-
|
|
14986
|
+
2)
|
|
14973
14987
|
toolbar_changes.theme = /*theme*/
|
|
14974
|
-
ctx2[
|
|
14988
|
+
ctx2[1];
|
|
14975
14989
|
if (dirty & /*language*/
|
|
14976
|
-
|
|
14990
|
+
4)
|
|
14977
14991
|
toolbar_changes.language = /*language*/
|
|
14978
|
-
ctx2[
|
|
14992
|
+
ctx2[2];
|
|
14979
14993
|
if (dirty & /*config*/
|
|
14980
|
-
|
|
14994
|
+
8)
|
|
14981
14995
|
toolbar_changes.config = /*config*/
|
|
14982
|
-
ctx2[
|
|
14996
|
+
ctx2[3].toolbar || {};
|
|
14983
14997
|
toolbar.$set(toolbar_changes);
|
|
14984
14998
|
},
|
|
14985
14999
|
i(local) {
|
|
@@ -15004,15 +15018,15 @@ function create_if_block_23(ctx) {
|
|
|
15004
15018
|
props: {
|
|
15005
15019
|
app: (
|
|
15006
15020
|
/*app*/
|
|
15007
|
-
ctx[
|
|
15021
|
+
ctx[0]
|
|
15008
15022
|
),
|
|
15009
15023
|
theme: (
|
|
15010
15024
|
/*theme*/
|
|
15011
|
-
ctx[
|
|
15025
|
+
ctx[1]
|
|
15012
15026
|
),
|
|
15013
15027
|
language: (
|
|
15014
15028
|
/*language*/
|
|
15015
|
-
ctx[
|
|
15029
|
+
ctx[2]
|
|
15016
15030
|
)
|
|
15017
15031
|
}
|
|
15018
15032
|
});
|
|
@@ -15027,17 +15041,17 @@ function create_if_block_23(ctx) {
|
|
|
15027
15041
|
p(ctx2, dirty) {
|
|
15028
15042
|
const redoundo_changes = {};
|
|
15029
15043
|
if (dirty & /*app*/
|
|
15030
|
-
|
|
15044
|
+
1)
|
|
15031
15045
|
redoundo_changes.app = /*app*/
|
|
15032
|
-
ctx2[
|
|
15046
|
+
ctx2[0];
|
|
15033
15047
|
if (dirty & /*theme*/
|
|
15034
|
-
|
|
15048
|
+
2)
|
|
15035
15049
|
redoundo_changes.theme = /*theme*/
|
|
15036
|
-
ctx2[
|
|
15050
|
+
ctx2[1];
|
|
15037
15051
|
if (dirty & /*language*/
|
|
15038
|
-
|
|
15052
|
+
4)
|
|
15039
15053
|
redoundo_changes.language = /*language*/
|
|
15040
|
-
ctx2[
|
|
15054
|
+
ctx2[2];
|
|
15041
15055
|
redoundo.$set(redoundo_changes);
|
|
15042
15056
|
},
|
|
15043
15057
|
i(local) {
|
|
@@ -15062,15 +15076,15 @@ function create_if_block_14(ctx) {
|
|
|
15062
15076
|
props: {
|
|
15063
15077
|
app: (
|
|
15064
15078
|
/*app*/
|
|
15065
|
-
ctx[
|
|
15079
|
+
ctx[0]
|
|
15066
15080
|
),
|
|
15067
15081
|
theme: (
|
|
15068
15082
|
/*theme*/
|
|
15069
|
-
ctx[
|
|
15083
|
+
ctx[1]
|
|
15070
15084
|
),
|
|
15071
15085
|
language: (
|
|
15072
15086
|
/*language*/
|
|
15073
|
-
ctx[
|
|
15087
|
+
ctx[2]
|
|
15074
15088
|
)
|
|
15075
15089
|
}
|
|
15076
15090
|
});
|
|
@@ -15085,17 +15099,17 @@ function create_if_block_14(ctx) {
|
|
|
15085
15099
|
p(ctx2, dirty) {
|
|
15086
15100
|
const zoomcontrol_changes = {};
|
|
15087
15101
|
if (dirty & /*app*/
|
|
15088
|
-
|
|
15102
|
+
1)
|
|
15089
15103
|
zoomcontrol_changes.app = /*app*/
|
|
15090
|
-
ctx2[
|
|
15104
|
+
ctx2[0];
|
|
15091
15105
|
if (dirty & /*theme*/
|
|
15092
|
-
|
|
15106
|
+
2)
|
|
15093
15107
|
zoomcontrol_changes.theme = /*theme*/
|
|
15094
|
-
ctx2[
|
|
15108
|
+
ctx2[1];
|
|
15095
15109
|
if (dirty & /*language*/
|
|
15096
|
-
|
|
15110
|
+
4)
|
|
15097
15111
|
zoomcontrol_changes.language = /*language*/
|
|
15098
|
-
ctx2[
|
|
15112
|
+
ctx2[2];
|
|
15099
15113
|
zoomcontrol.$set(zoomcontrol_changes);
|
|
15100
15114
|
},
|
|
15101
15115
|
i(local) {
|
|
@@ -15120,15 +15134,15 @@ function create_if_block18(ctx) {
|
|
|
15120
15134
|
props: {
|
|
15121
15135
|
app: (
|
|
15122
15136
|
/*app*/
|
|
15123
|
-
ctx[
|
|
15137
|
+
ctx[0]
|
|
15124
15138
|
),
|
|
15125
15139
|
theme: (
|
|
15126
15140
|
/*theme*/
|
|
15127
|
-
ctx[
|
|
15141
|
+
ctx[1]
|
|
15128
15142
|
),
|
|
15129
15143
|
language: (
|
|
15130
15144
|
/*language*/
|
|
15131
|
-
ctx[
|
|
15145
|
+
ctx[2]
|
|
15132
15146
|
)
|
|
15133
15147
|
}
|
|
15134
15148
|
});
|
|
@@ -15143,17 +15157,17 @@ function create_if_block18(ctx) {
|
|
|
15143
15157
|
p(ctx2, dirty) {
|
|
15144
15158
|
const pagecontrol_changes = {};
|
|
15145
15159
|
if (dirty & /*app*/
|
|
15146
|
-
|
|
15160
|
+
1)
|
|
15147
15161
|
pagecontrol_changes.app = /*app*/
|
|
15148
|
-
ctx2[
|
|
15162
|
+
ctx2[0];
|
|
15149
15163
|
if (dirty & /*theme*/
|
|
15150
|
-
|
|
15164
|
+
2)
|
|
15151
15165
|
pagecontrol_changes.theme = /*theme*/
|
|
15152
|
-
ctx2[
|
|
15166
|
+
ctx2[1];
|
|
15153
15167
|
if (dirty & /*language*/
|
|
15154
|
-
|
|
15168
|
+
4)
|
|
15155
15169
|
pagecontrol_changes.language = /*language*/
|
|
15156
|
-
ctx2[
|
|
15170
|
+
ctx2[2];
|
|
15157
15171
|
pagecontrol.$set(pagecontrol_changes);
|
|
15158
15172
|
},
|
|
15159
15173
|
i(local) {
|
|
@@ -15188,19 +15202,19 @@ function create_fragment71(ctx) {
|
|
|
15188
15202
|
let dispose;
|
|
15189
15203
|
let if_block0 = (
|
|
15190
15204
|
/*config*/
|
|
15191
|
-
((_a = ctx[
|
|
15205
|
+
((_a = ctx[3].toolbar) == null ? void 0 : _a.enable) !== false && create_if_block_32(ctx)
|
|
15192
15206
|
);
|
|
15193
15207
|
let if_block1 = (
|
|
15194
15208
|
/*config*/
|
|
15195
|
-
((_b = ctx[
|
|
15209
|
+
((_b = ctx[3].redo_undo) == null ? void 0 : _b.enable) !== false && create_if_block_23(ctx)
|
|
15196
15210
|
);
|
|
15197
15211
|
let if_block2 = (
|
|
15198
15212
|
/*config*/
|
|
15199
|
-
((_c = ctx[
|
|
15213
|
+
((_c = ctx[3].zoom_control) == null ? void 0 : _c.enable) !== false && create_if_block_14(ctx)
|
|
15200
15214
|
);
|
|
15201
15215
|
let if_block3 = (
|
|
15202
15216
|
/*config*/
|
|
15203
|
-
((_d = ctx[
|
|
15217
|
+
((_d = ctx[3].page_control) == null ? void 0 : _d.enable) !== false && create_if_block18(ctx)
|
|
15204
15218
|
);
|
|
15205
15219
|
return {
|
|
15206
15220
|
c() {
|
|
@@ -15224,7 +15238,7 @@ function create_fragment71(ctx) {
|
|
|
15224
15238
|
if_block3.c();
|
|
15225
15239
|
attr(div0, "class", name9 + "-view");
|
|
15226
15240
|
attr(div1, "class", div1_class_value = name9 + "-" + /*config*/
|
|
15227
|
-
(((_a2 = ctx[
|
|
15241
|
+
(((_a2 = ctx[3].toolbar) == null ? void 0 : _a2.placement) || "left"));
|
|
15228
15242
|
toggle_class(div1, "hidden", !/*toolbar_has_items*/
|
|
15229
15243
|
ctx[6] || !/*layout*/
|
|
15230
15244
|
(ctx[5] === "visible" || /*layout*/
|
|
@@ -15245,12 +15259,12 @@ function create_fragment71(ctx) {
|
|
|
15245
15259
|
);
|
|
15246
15260
|
attr(div4, "class", name9 + "-root");
|
|
15247
15261
|
toggle_class(div4, "loading", !/*app*/
|
|
15248
|
-
ctx[
|
|
15262
|
+
ctx[0]);
|
|
15249
15263
|
},
|
|
15250
15264
|
m(target, anchor) {
|
|
15251
15265
|
insert(target, div4, anchor);
|
|
15252
15266
|
append(div4, div0);
|
|
15253
|
-
ctx[
|
|
15267
|
+
ctx[16](div0);
|
|
15254
15268
|
append(div4, t0);
|
|
15255
15269
|
append(div4, div1);
|
|
15256
15270
|
if (if_block0)
|
|
@@ -15282,12 +15296,12 @@ function create_fragment71(ctx) {
|
|
|
15282
15296
|
var _a2, _b2, _c2, _d2, _e;
|
|
15283
15297
|
if (
|
|
15284
15298
|
/*config*/
|
|
15285
|
-
((_a2 = ctx2[
|
|
15299
|
+
((_a2 = ctx2[3].toolbar) == null ? void 0 : _a2.enable) !== false
|
|
15286
15300
|
) {
|
|
15287
15301
|
if (if_block0) {
|
|
15288
15302
|
if_block0.p(ctx2, dirty);
|
|
15289
15303
|
if (dirty & /*config*/
|
|
15290
|
-
|
|
15304
|
+
8) {
|
|
15291
15305
|
transition_in(if_block0, 1);
|
|
15292
15306
|
}
|
|
15293
15307
|
} else {
|
|
@@ -15304,12 +15318,12 @@ function create_fragment71(ctx) {
|
|
|
15304
15318
|
check_outros();
|
|
15305
15319
|
}
|
|
15306
15320
|
if (!current || dirty & /*config*/
|
|
15307
|
-
|
|
15308
|
-
(((_b2 = ctx2[
|
|
15321
|
+
8 && div1_class_value !== (div1_class_value = name9 + "-" + /*config*/
|
|
15322
|
+
(((_b2 = ctx2[3].toolbar) == null ? void 0 : _b2.placement) || "left"))) {
|
|
15309
15323
|
attr(div1, "class", div1_class_value);
|
|
15310
15324
|
}
|
|
15311
15325
|
if (!current || dirty & /*config, toolbar_has_items, layout*/
|
|
15312
|
-
|
|
15326
|
+
104) {
|
|
15313
15327
|
toggle_class(div1, "hidden", !/*toolbar_has_items*/
|
|
15314
15328
|
ctx2[6] || !/*layout*/
|
|
15315
15329
|
(ctx2[5] === "visible" || /*layout*/
|
|
@@ -15317,12 +15331,12 @@ function create_fragment71(ctx) {
|
|
|
15317
15331
|
}
|
|
15318
15332
|
if (
|
|
15319
15333
|
/*config*/
|
|
15320
|
-
((_c2 = ctx2[
|
|
15334
|
+
((_c2 = ctx2[3].redo_undo) == null ? void 0 : _c2.enable) !== false
|
|
15321
15335
|
) {
|
|
15322
15336
|
if (if_block1) {
|
|
15323
15337
|
if_block1.p(ctx2, dirty);
|
|
15324
15338
|
if (dirty & /*config*/
|
|
15325
|
-
|
|
15339
|
+
8) {
|
|
15326
15340
|
transition_in(if_block1, 1);
|
|
15327
15341
|
}
|
|
15328
15342
|
} else {
|
|
@@ -15340,12 +15354,12 @@ function create_fragment71(ctx) {
|
|
|
15340
15354
|
}
|
|
15341
15355
|
if (
|
|
15342
15356
|
/*config*/
|
|
15343
|
-
((_d2 = ctx2[
|
|
15357
|
+
((_d2 = ctx2[3].zoom_control) == null ? void 0 : _d2.enable) !== false
|
|
15344
15358
|
) {
|
|
15345
15359
|
if (if_block2) {
|
|
15346
15360
|
if_block2.p(ctx2, dirty);
|
|
15347
15361
|
if (dirty & /*config*/
|
|
15348
|
-
|
|
15362
|
+
8) {
|
|
15349
15363
|
transition_in(if_block2, 1);
|
|
15350
15364
|
}
|
|
15351
15365
|
} else {
|
|
@@ -15372,12 +15386,12 @@ function create_fragment71(ctx) {
|
|
|
15372
15386
|
}
|
|
15373
15387
|
if (
|
|
15374
15388
|
/*config*/
|
|
15375
|
-
((_e = ctx2[
|
|
15389
|
+
((_e = ctx2[3].page_control) == null ? void 0 : _e.enable) !== false
|
|
15376
15390
|
) {
|
|
15377
15391
|
if (if_block3) {
|
|
15378
15392
|
if_block3.p(ctx2, dirty);
|
|
15379
15393
|
if (dirty & /*config*/
|
|
15380
|
-
|
|
15394
|
+
8) {
|
|
15381
15395
|
transition_in(if_block3, 1);
|
|
15382
15396
|
}
|
|
15383
15397
|
} else {
|
|
@@ -15403,9 +15417,9 @@ function create_fragment71(ctx) {
|
|
|
15403
15417
|
);
|
|
15404
15418
|
}
|
|
15405
15419
|
if (!current || dirty & /*app*/
|
|
15406
|
-
|
|
15420
|
+
1) {
|
|
15407
15421
|
toggle_class(div4, "loading", !/*app*/
|
|
15408
|
-
ctx2[
|
|
15422
|
+
ctx2[0]);
|
|
15409
15423
|
}
|
|
15410
15424
|
},
|
|
15411
15425
|
i(local) {
|
|
@@ -15427,7 +15441,7 @@ function create_fragment71(ctx) {
|
|
|
15427
15441
|
d(detaching) {
|
|
15428
15442
|
if (detaching)
|
|
15429
15443
|
detach(div4);
|
|
15430
|
-
ctx[
|
|
15444
|
+
ctx[16](null);
|
|
15431
15445
|
if (if_block0)
|
|
15432
15446
|
if_block0.d();
|
|
15433
15447
|
if (if_block1)
|
|
@@ -15443,15 +15457,13 @@ function create_fragment71(ctx) {
|
|
|
15443
15457
|
}
|
|
15444
15458
|
var name9 = "fastboard";
|
|
15445
15459
|
function instance71($$self, $$props, $$invalidate) {
|
|
15446
|
-
let manager;
|
|
15447
|
-
let room;
|
|
15448
15460
|
let writable2;
|
|
15449
15461
|
let boxState;
|
|
15450
15462
|
let focusedApp;
|
|
15451
15463
|
let toolbar_has_items;
|
|
15452
|
-
let $focusedApp, $$unsubscribe_focusedApp = noop, $$subscribe_focusedApp = () => ($$unsubscribe_focusedApp(), $$unsubscribe_focusedApp = subscribe(focusedApp, ($$value) => $$invalidate(
|
|
15453
|
-
let $boxState, $$unsubscribe_boxState = noop, $$subscribe_boxState = () => ($$unsubscribe_boxState(), $$unsubscribe_boxState = subscribe(boxState, ($$value) => $$invalidate(
|
|
15454
|
-
let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(
|
|
15464
|
+
let $focusedApp, $$unsubscribe_focusedApp = noop, $$subscribe_focusedApp = () => ($$unsubscribe_focusedApp(), $$unsubscribe_focusedApp = subscribe(focusedApp, ($$value) => $$invalidate(13, $focusedApp = $$value)), focusedApp);
|
|
15465
|
+
let $boxState, $$unsubscribe_boxState = noop, $$subscribe_boxState = () => ($$unsubscribe_boxState(), $$unsubscribe_boxState = subscribe(boxState, ($$value) => $$invalidate(14, $boxState = $$value)), boxState);
|
|
15466
|
+
let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(15, $writable = $$value)), writable2);
|
|
15455
15467
|
$$self.$$.on_destroy.push(() => $$unsubscribe_focusedApp());
|
|
15456
15468
|
$$self.$$.on_destroy.push(() => $$unsubscribe_boxState());
|
|
15457
15469
|
$$self.$$.on_destroy.push(() => $$unsubscribe_writable());
|
|
@@ -15460,7 +15472,6 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15460
15472
|
let { language = "en" } = $$props;
|
|
15461
15473
|
let { containerRef = void 0 } = $$props;
|
|
15462
15474
|
let { config = {} } = $$props;
|
|
15463
|
-
let { colors: colors2 = void 0 } = $$props;
|
|
15464
15475
|
const AppsShowToolbar = ["DocsViewer", "Slide"];
|
|
15465
15476
|
let container;
|
|
15466
15477
|
let layout = "hidden";
|
|
@@ -15487,58 +15498,31 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15487
15498
|
}
|
|
15488
15499
|
$$self.$$set = ($$props2) => {
|
|
15489
15500
|
if ("app" in $$props2)
|
|
15490
|
-
$$invalidate(
|
|
15501
|
+
$$invalidate(0, app = $$props2.app);
|
|
15491
15502
|
if ("theme" in $$props2)
|
|
15492
|
-
$$invalidate(
|
|
15503
|
+
$$invalidate(1, theme = $$props2.theme);
|
|
15493
15504
|
if ("language" in $$props2)
|
|
15494
|
-
$$invalidate(
|
|
15505
|
+
$$invalidate(2, language = $$props2.language);
|
|
15495
15506
|
if ("containerRef" in $$props2)
|
|
15496
|
-
$$invalidate(
|
|
15507
|
+
$$invalidate(11, containerRef = $$props2.containerRef);
|
|
15497
15508
|
if ("config" in $$props2)
|
|
15498
|
-
$$invalidate(
|
|
15499
|
-
if ("colors" in $$props2)
|
|
15500
|
-
$$invalidate(11, colors2 = $$props2.colors);
|
|
15509
|
+
$$invalidate(3, config = $$props2.config);
|
|
15501
15510
|
};
|
|
15502
15511
|
$$self.$$.update = () => {
|
|
15503
15512
|
if ($$self.$$.dirty & /*app*/
|
|
15504
|
-
|
|
15505
|
-
$$invalidate(15, manager = app == null ? void 0 : app.manager);
|
|
15506
|
-
}
|
|
15507
|
-
if ($$self.$$.dirty & /*app*/
|
|
15508
|
-
2) {
|
|
15509
|
-
$$invalidate(14, room = app == null ? void 0 : app.manager.room);
|
|
15510
|
-
}
|
|
15511
|
-
if ($$self.$$.dirty & /*manager, room, config, colors*/
|
|
15512
|
-
51201) {
|
|
15513
|
-
if (manager && room) {
|
|
15514
|
-
const floatBarOptions = room.floatBarOptions;
|
|
15515
|
-
if (floatBarOptions.colors) {
|
|
15516
|
-
$$invalidate(11, colors2 = floatBarOptions.colors);
|
|
15517
|
-
}
|
|
15518
|
-
if (config == null ? void 0 : config.toolbar) {
|
|
15519
|
-
const _colors = config.toolbar.colors;
|
|
15520
|
-
if (!_colors && colors2) {
|
|
15521
|
-
$$invalidate(0, config = __spreadProps(__spreadValues({}, config), {
|
|
15522
|
-
toolbar: __spreadProps(__spreadValues({}, config.toolbar), { colors: colors2 })
|
|
15523
|
-
}));
|
|
15524
|
-
}
|
|
15525
|
-
}
|
|
15526
|
-
}
|
|
15527
|
-
}
|
|
15528
|
-
if ($$self.$$.dirty & /*app*/
|
|
15529
|
-
2) {
|
|
15513
|
+
1) {
|
|
15530
15514
|
$$subscribe_writable($$invalidate(9, writable2 = app == null ? void 0 : app.writable));
|
|
15531
15515
|
}
|
|
15532
15516
|
if ($$self.$$.dirty & /*app*/
|
|
15533
|
-
|
|
15517
|
+
1) {
|
|
15534
15518
|
$$subscribe_boxState($$invalidate(8, boxState = app == null ? void 0 : app.boxState));
|
|
15535
15519
|
}
|
|
15536
15520
|
if ($$self.$$.dirty & /*app*/
|
|
15537
|
-
|
|
15521
|
+
1) {
|
|
15538
15522
|
$$subscribe_focusedApp($$invalidate(7, focusedApp = app == null ? void 0 : app.focusedApp));
|
|
15539
15523
|
}
|
|
15540
15524
|
if ($$self.$$.dirty & /*$writable, $boxState, $focusedApp*/
|
|
15541
|
-
|
|
15525
|
+
57344) {
|
|
15542
15526
|
if (!$writable) {
|
|
15543
15527
|
$$invalidate(5, layout = "hidden");
|
|
15544
15528
|
} else if ($boxState === "maximized") {
|
|
@@ -15552,15 +15536,15 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15552
15536
|
}
|
|
15553
15537
|
}
|
|
15554
15538
|
if ($$self.$$.dirty & /*config*/
|
|
15555
|
-
|
|
15539
|
+
8) {
|
|
15556
15540
|
$$invalidate(6, toolbar_has_items = !config.toolbar || !config.toolbar.items || !config.toolbar.apps || config.toolbar.items.length > 0 || config.toolbar.apps.enable !== false);
|
|
15557
15541
|
}
|
|
15558
15542
|
if ($$self.$$.dirty & /*app, container*/
|
|
15559
|
-
|
|
15543
|
+
17) {
|
|
15560
15544
|
try {
|
|
15561
15545
|
if (app && container) {
|
|
15562
15546
|
app.bindContainer(container);
|
|
15563
|
-
$$invalidate(
|
|
15547
|
+
$$invalidate(12, mounted = true);
|
|
15564
15548
|
}
|
|
15565
15549
|
} catch (err) {
|
|
15566
15550
|
console.error("[fastboard] An error occurred while binding container");
|
|
@@ -15568,17 +15552,17 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15568
15552
|
}
|
|
15569
15553
|
}
|
|
15570
15554
|
if ($$self.$$.dirty & /*app, theme, mounted*/
|
|
15571
|
-
|
|
15555
|
+
4099) {
|
|
15572
15556
|
if (app && theme && mounted) {
|
|
15573
15557
|
app.manager.setPrefersColorScheme(theme);
|
|
15574
15558
|
}
|
|
15575
15559
|
}
|
|
15576
15560
|
};
|
|
15577
15561
|
return [
|
|
15578
|
-
config,
|
|
15579
15562
|
app,
|
|
15580
15563
|
theme,
|
|
15581
15564
|
language,
|
|
15565
|
+
config,
|
|
15582
15566
|
container,
|
|
15583
15567
|
layout,
|
|
15584
15568
|
toolbar_has_items,
|
|
@@ -15586,11 +15570,8 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15586
15570
|
boxState,
|
|
15587
15571
|
writable2,
|
|
15588
15572
|
focus_me,
|
|
15589
|
-
colors2,
|
|
15590
15573
|
containerRef,
|
|
15591
15574
|
mounted,
|
|
15592
|
-
room,
|
|
15593
|
-
manager,
|
|
15594
15575
|
$focusedApp,
|
|
15595
15576
|
$boxState,
|
|
15596
15577
|
$writable,
|
|
@@ -15601,12 +15582,11 @@ var Fastboard = class extends SvelteComponent {
|
|
|
15601
15582
|
constructor(options) {
|
|
15602
15583
|
super();
|
|
15603
15584
|
init(this, options, instance71, create_fragment71, not_equal, {
|
|
15604
|
-
app:
|
|
15605
|
-
theme:
|
|
15606
|
-
language:
|
|
15607
|
-
containerRef:
|
|
15608
|
-
config:
|
|
15609
|
-
colors: 11
|
|
15585
|
+
app: 0,
|
|
15586
|
+
theme: 1,
|
|
15587
|
+
language: 2,
|
|
15588
|
+
containerRef: 11,
|
|
15589
|
+
config: 3
|
|
15610
15590
|
});
|
|
15611
15591
|
}
|
|
15612
15592
|
};
|
|
@@ -15628,15 +15608,11 @@ function createUI(app, div) {
|
|
|
15628
15608
|
if (fastboard) {
|
|
15629
15609
|
fastboard.$destroy();
|
|
15630
15610
|
}
|
|
15631
|
-
if (
|
|
15632
|
-
|
|
15633
|
-
|
|
15634
|
-
props.config = __spreadProps(__spreadValues({}, props.config), {
|
|
15635
|
-
toolbar: __spreadProps(__spreadValues({}, props.config.toolbar), {
|
|
15636
|
-
colors: colors2
|
|
15637
|
-
})
|
|
15638
|
-
});
|
|
15611
|
+
if (colors2 && (props == null ? void 0 : props.config) && !((_a = props.config.toolbar) == null ? void 0 : _a.colors)) {
|
|
15612
|
+
if (!(props == null ? void 0 : props.config.toolbar)) {
|
|
15613
|
+
props.config.toolbar = {};
|
|
15639
15614
|
}
|
|
15615
|
+
props.config.toolbar.colors = colors2;
|
|
15640
15616
|
}
|
|
15641
15617
|
fastboard = new Fastboard_default({ target: div2, props: __spreadValues({ app }, props) });
|
|
15642
15618
|
return ui;
|
|
@@ -15644,15 +15620,11 @@ function createUI(app, div) {
|
|
|
15644
15620
|
update(props) {
|
|
15645
15621
|
var _a;
|
|
15646
15622
|
if (fastboard && props) {
|
|
15647
|
-
if (
|
|
15648
|
-
|
|
15649
|
-
|
|
15650
|
-
props.config = __spreadProps(__spreadValues({}, props.config), {
|
|
15651
|
-
toolbar: __spreadProps(__spreadValues({}, props.config.toolbar), {
|
|
15652
|
-
colors: colors2
|
|
15653
|
-
})
|
|
15654
|
-
});
|
|
15623
|
+
if (colors2 && (props == null ? void 0 : props.config) && !((_a = props.config.toolbar) == null ? void 0 : _a.colors)) {
|
|
15624
|
+
if (!(props == null ? void 0 : props.config.toolbar)) {
|
|
15625
|
+
props.config.toolbar = {};
|
|
15655
15626
|
}
|
|
15627
|
+
props.config.toolbar.colors = colors2;
|
|
15656
15628
|
}
|
|
15657
15629
|
fastboard.$set(props);
|
|
15658
15630
|
}
|