@netless/fastboard-ui 0.3.22-beta.1 → 0.3.22-beta.3
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 +152 -195
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +152 -195
- package/dist/index.mjs.map +1 -1
- package/dist/index.svelte.mjs +152 -195
- package/dist/index.svelte.mjs.map +1 -1
- package/package.json +4 -4
- 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
|
@@ -5428,10 +5428,7 @@ function create_fragment50(ctx) {
|
|
|
5428
5428
|
}
|
|
5429
5429
|
var i18n = {
|
|
5430
5430
|
en: { redo: "Redo", undo: "Undo" },
|
|
5431
|
-
"zh-CN": {
|
|
5432
|
-
redo: "\u91CD\u505A",
|
|
5433
|
-
undo: "\u64A4\u9500"
|
|
5434
|
-
}
|
|
5431
|
+
"zh-CN": { redo: "\u91CD\u505A", undo: "\u64A4\u9500" }
|
|
5435
5432
|
};
|
|
5436
5433
|
var name = "fastboard-redo-undo";
|
|
5437
5434
|
function instance50($$self, $$props, $$invalidate) {
|
|
@@ -6124,11 +6121,7 @@ var i18n2 = {
|
|
|
6124
6121
|
next: "Next Page",
|
|
6125
6122
|
add: "Add Page"
|
|
6126
6123
|
},
|
|
6127
|
-
"zh-CN": {
|
|
6128
|
-
prev: "\u4E0A\u4E00\u9875",
|
|
6129
|
-
next: "\u4E0B\u4E00\u9875",
|
|
6130
|
-
add: "\u6DFB\u52A0\u9875\u9762"
|
|
6131
|
-
}
|
|
6124
|
+
"zh-CN": { prev: "\u4E0A\u4E00\u9875", next: "\u4E0B\u4E00\u9875", add: "\u6DFB\u52A0\u9875\u9762" }
|
|
6132
6125
|
};
|
|
6133
6126
|
var name2 = "fastboard-page-control";
|
|
6134
6127
|
function instance51($$self, $$props, $$invalidate) {
|
|
@@ -6817,11 +6810,7 @@ var i18n3 = {
|
|
|
6817
6810
|
minus: "Zoom Out",
|
|
6818
6811
|
reset: "Reset"
|
|
6819
6812
|
},
|
|
6820
|
-
"zh-CN": {
|
|
6821
|
-
plus: "\u653E\u5927",
|
|
6822
|
-
minus: "\u7F29\u5C0F",
|
|
6823
|
-
reset: "\u91CD\u7F6E"
|
|
6824
|
-
}
|
|
6813
|
+
"zh-CN": { plus: "\u653E\u5927", minus: "\u7F29\u5C0F", reset: "\u91CD\u7F6E" }
|
|
6825
6814
|
};
|
|
6826
6815
|
var scales = [
|
|
6827
6816
|
0.3,
|
|
@@ -13211,15 +13200,15 @@ function create_fragment68(ctx) {
|
|
|
13211
13200
|
props: {
|
|
13212
13201
|
app: (
|
|
13213
13202
|
/*app*/
|
|
13214
|
-
ctx[
|
|
13203
|
+
ctx[1]
|
|
13215
13204
|
),
|
|
13216
13205
|
theme: (
|
|
13217
13206
|
/*theme*/
|
|
13218
|
-
ctx[
|
|
13207
|
+
ctx[2]
|
|
13219
13208
|
),
|
|
13220
13209
|
language: (
|
|
13221
13210
|
/*language*/
|
|
13222
|
-
ctx[
|
|
13211
|
+
ctx[3]
|
|
13223
13212
|
),
|
|
13224
13213
|
disabled: (
|
|
13225
13214
|
/*disabled*/
|
|
@@ -13251,14 +13240,14 @@ function create_fragment68(ctx) {
|
|
|
13251
13240
|
),
|
|
13252
13241
|
colors: (
|
|
13253
13242
|
/*colors*/
|
|
13254
|
-
ctx[
|
|
13243
|
+
ctx[0]
|
|
13255
13244
|
)
|
|
13256
13245
|
}
|
|
13257
13246
|
});
|
|
13258
13247
|
function select_block_type(ctx2, dirty) {
|
|
13259
13248
|
if (
|
|
13260
13249
|
/*collapsed*/
|
|
13261
|
-
ctx2[
|
|
13250
|
+
ctx2[4]
|
|
13262
13251
|
)
|
|
13263
13252
|
return create_if_block15;
|
|
13264
13253
|
return create_else_block14;
|
|
@@ -13279,7 +13268,7 @@ function create_fragment68(ctx) {
|
|
|
13279
13268
|
path1 = svg_element("path");
|
|
13280
13269
|
if_block.c();
|
|
13281
13270
|
attr(div0, "class", div0_class_value = name6 + "-contents " + /*theme*/
|
|
13282
|
-
ctx[
|
|
13271
|
+
ctx[2]);
|
|
13283
13272
|
set_style(
|
|
13284
13273
|
div0,
|
|
13285
13274
|
"height",
|
|
@@ -13301,14 +13290,14 @@ function create_fragment68(ctx) {
|
|
|
13301
13290
|
attr(svg, "stroke-width", "2");
|
|
13302
13291
|
attr(svg, "viewBox", "0 0 32 120");
|
|
13303
13292
|
attr(label, "class", label_class_value = name6 + "-handler " + /*theme*/
|
|
13304
|
-
ctx[
|
|
13293
|
+
ctx[2]);
|
|
13305
13294
|
attr(div1, "class", div1_class_value = name6 + " " + /*theme*/
|
|
13306
|
-
ctx[
|
|
13295
|
+
ctx[2]);
|
|
13307
13296
|
toggle_class(
|
|
13308
13297
|
div1,
|
|
13309
13298
|
"collapsed",
|
|
13310
13299
|
/*collapsed*/
|
|
13311
|
-
ctx[
|
|
13300
|
+
ctx[4]
|
|
13312
13301
|
);
|
|
13313
13302
|
},
|
|
13314
13303
|
m(target, anchor) {
|
|
@@ -13319,7 +13308,7 @@ function create_fragment68(ctx) {
|
|
|
13319
13308
|
append(div1, label);
|
|
13320
13309
|
append(label, input);
|
|
13321
13310
|
input.checked = /*collapsed*/
|
|
13322
|
-
ctx[
|
|
13311
|
+
ctx[4];
|
|
13323
13312
|
append(label, t1);
|
|
13324
13313
|
append(label, svg);
|
|
13325
13314
|
append(svg, path0);
|
|
@@ -13347,17 +13336,17 @@ function create_fragment68(ctx) {
|
|
|
13347
13336
|
p(ctx2, [dirty]) {
|
|
13348
13337
|
const contents_changes = {};
|
|
13349
13338
|
if (dirty & /*app*/
|
|
13350
|
-
|
|
13339
|
+
2)
|
|
13351
13340
|
contents_changes.app = /*app*/
|
|
13352
|
-
ctx2[
|
|
13341
|
+
ctx2[1];
|
|
13353
13342
|
if (dirty & /*theme*/
|
|
13354
|
-
|
|
13343
|
+
4)
|
|
13355
13344
|
contents_changes.theme = /*theme*/
|
|
13356
|
-
ctx2[
|
|
13345
|
+
ctx2[2];
|
|
13357
13346
|
if (dirty & /*language*/
|
|
13358
|
-
|
|
13347
|
+
8)
|
|
13359
13348
|
contents_changes.language = /*language*/
|
|
13360
|
-
ctx2[
|
|
13349
|
+
ctx2[3];
|
|
13361
13350
|
if (dirty & /*disabled*/
|
|
13362
13351
|
1024)
|
|
13363
13352
|
contents_changes.disabled = /*disabled*/
|
|
@@ -13383,13 +13372,13 @@ function create_fragment68(ctx) {
|
|
|
13383
13372
|
contents_changes.hide_apps = /*hide_apps*/
|
|
13384
13373
|
ctx2[5];
|
|
13385
13374
|
if (dirty & /*colors*/
|
|
13386
|
-
|
|
13375
|
+
1)
|
|
13387
13376
|
contents_changes.colors = /*colors*/
|
|
13388
|
-
ctx2[
|
|
13377
|
+
ctx2[0];
|
|
13389
13378
|
contents.$set(contents_changes);
|
|
13390
13379
|
if (!current || dirty & /*theme*/
|
|
13391
|
-
|
|
13392
|
-
ctx2[
|
|
13380
|
+
4 && div0_class_value !== (div0_class_value = name6 + "-contents " + /*theme*/
|
|
13381
|
+
ctx2[2])) {
|
|
13393
13382
|
attr(div0, "class", div0_class_value);
|
|
13394
13383
|
}
|
|
13395
13384
|
if (dirty & /*scrollable, computed_height*/
|
|
@@ -13405,9 +13394,9 @@ function create_fragment68(ctx) {
|
|
|
13405
13394
|
);
|
|
13406
13395
|
}
|
|
13407
13396
|
if (dirty & /*collapsed*/
|
|
13408
|
-
|
|
13397
|
+
16) {
|
|
13409
13398
|
input.checked = /*collapsed*/
|
|
13410
|
-
ctx2[
|
|
13399
|
+
ctx2[4];
|
|
13411
13400
|
}
|
|
13412
13401
|
if (current_block_type === (current_block_type = select_block_type(ctx2)) && if_block) {
|
|
13413
13402
|
if_block.p(ctx2, dirty);
|
|
@@ -13420,22 +13409,22 @@ function create_fragment68(ctx) {
|
|
|
13420
13409
|
}
|
|
13421
13410
|
}
|
|
13422
13411
|
if (!current || dirty & /*theme*/
|
|
13423
|
-
|
|
13424
|
-
ctx2[
|
|
13412
|
+
4 && label_class_value !== (label_class_value = name6 + "-handler " + /*theme*/
|
|
13413
|
+
ctx2[2])) {
|
|
13425
13414
|
attr(label, "class", label_class_value);
|
|
13426
13415
|
}
|
|
13427
13416
|
if (!current || dirty & /*theme*/
|
|
13428
|
-
|
|
13429
|
-
ctx2[
|
|
13417
|
+
4 && div1_class_value !== (div1_class_value = name6 + " " + /*theme*/
|
|
13418
|
+
ctx2[2])) {
|
|
13430
13419
|
attr(div1, "class", div1_class_value);
|
|
13431
13420
|
}
|
|
13432
13421
|
if (!current || dirty & /*theme, collapsed*/
|
|
13433
|
-
|
|
13422
|
+
20) {
|
|
13434
13423
|
toggle_class(
|
|
13435
13424
|
div1,
|
|
13436
13425
|
"collapsed",
|
|
13437
13426
|
/*collapsed*/
|
|
13438
|
-
ctx2[
|
|
13427
|
+
ctx2[4]
|
|
13439
13428
|
);
|
|
13440
13429
|
}
|
|
13441
13430
|
},
|
|
@@ -13469,7 +13458,6 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
13469
13458
|
let placement;
|
|
13470
13459
|
let items;
|
|
13471
13460
|
let hide_apps;
|
|
13472
|
-
let colors2;
|
|
13473
13461
|
let $container_height;
|
|
13474
13462
|
let $scroll_height;
|
|
13475
13463
|
let $phase, $$unsubscribe_phase = noop, $$subscribe_phase = () => ($$unsubscribe_phase(), $$unsubscribe_phase = subscribe(phase, ($$value) => $$invalidate(18, $phase = $$value)), phase);
|
|
@@ -13480,6 +13468,7 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
13480
13468
|
let { theme = "light" } = $$props;
|
|
13481
13469
|
let { language = "en" } = $$props;
|
|
13482
13470
|
let { config = {} } = $$props;
|
|
13471
|
+
let { colors: colors2 = void 0 } = $$props;
|
|
13483
13472
|
const extra_height = (32 + 4 + 4) * 2;
|
|
13484
13473
|
let collapsed = config.collapsed;
|
|
13485
13474
|
let container_height = writable(0);
|
|
@@ -13488,26 +13477,28 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
13488
13477
|
component_subscribe($$self, scroll_height, (value) => $$invalidate(17, $scroll_height = value));
|
|
13489
13478
|
function input_change_handler() {
|
|
13490
13479
|
collapsed = this.checked;
|
|
13491
|
-
$$invalidate(
|
|
13480
|
+
$$invalidate(4, collapsed);
|
|
13492
13481
|
}
|
|
13493
13482
|
$$self.$$set = ($$props2) => {
|
|
13494
13483
|
if ("app" in $$props2)
|
|
13495
|
-
$$invalidate(
|
|
13484
|
+
$$invalidate(1, app = $$props2.app);
|
|
13496
13485
|
if ("theme" in $$props2)
|
|
13497
|
-
$$invalidate(
|
|
13486
|
+
$$invalidate(2, theme = $$props2.theme);
|
|
13498
13487
|
if ("language" in $$props2)
|
|
13499
|
-
$$invalidate(
|
|
13488
|
+
$$invalidate(3, language = $$props2.language);
|
|
13500
13489
|
if ("config" in $$props2)
|
|
13501
13490
|
$$invalidate(15, config = $$props2.config);
|
|
13491
|
+
if ("colors" in $$props2)
|
|
13492
|
+
$$invalidate(0, colors2 = $$props2.colors);
|
|
13502
13493
|
};
|
|
13503
13494
|
$$self.$$.update = () => {
|
|
13504
|
-
var _a;
|
|
13495
|
+
var _a, _b;
|
|
13505
13496
|
if ($$self.$$.dirty & /*app*/
|
|
13506
|
-
|
|
13497
|
+
2) {
|
|
13507
13498
|
$$subscribe_writable($$invalidate(12, writable2 = app == null ? void 0 : app.writable));
|
|
13508
13499
|
}
|
|
13509
13500
|
if ($$self.$$.dirty & /*app*/
|
|
13510
|
-
|
|
13501
|
+
2) {
|
|
13511
13502
|
$$subscribe_phase($$invalidate(11, phase = app == null ? void 0 : app.phase));
|
|
13512
13503
|
}
|
|
13513
13504
|
if ($$self.$$.dirty & /*$writable, $phase*/
|
|
@@ -13534,17 +13525,28 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
13534
13525
|
32768) {
|
|
13535
13526
|
$$invalidate(5, hide_apps = ((_a = config.apps) == null ? void 0 : _a.enable) === false);
|
|
13536
13527
|
}
|
|
13537
|
-
if ($$self.$$.dirty & /*config*/
|
|
13538
|
-
|
|
13539
|
-
|
|
13528
|
+
if ($$self.$$.dirty & /*app, colors, config*/
|
|
13529
|
+
32771) {
|
|
13530
|
+
if ((app == null ? void 0 : app.manager) && (app == null ? void 0 : app.manager.room)) {
|
|
13531
|
+
if (colors2 && !((_b = config.colors) == null ? void 0 : _b.length)) {
|
|
13532
|
+
const floatBarOptions = app == null ? void 0 : app.manager.room.floatBarOptions;
|
|
13533
|
+
if (floatBarOptions.colors) {
|
|
13534
|
+
$$invalidate(0, colors2 = floatBarOptions.colors);
|
|
13535
|
+
}
|
|
13536
|
+
} else {
|
|
13537
|
+
$$invalidate(0, colors2 = config.colors);
|
|
13538
|
+
}
|
|
13539
|
+
} else {
|
|
13540
|
+
$$invalidate(0, colors2 = default_colors);
|
|
13541
|
+
}
|
|
13540
13542
|
}
|
|
13541
13543
|
};
|
|
13542
13544
|
return [
|
|
13545
|
+
colors2,
|
|
13543
13546
|
app,
|
|
13544
13547
|
theme,
|
|
13545
13548
|
language,
|
|
13546
13549
|
collapsed,
|
|
13547
|
-
colors2,
|
|
13548
13550
|
hide_apps,
|
|
13549
13551
|
items,
|
|
13550
13552
|
placement,
|
|
@@ -13567,10 +13569,11 @@ var Toolbar = class extends SvelteComponent {
|
|
|
13567
13569
|
constructor(options) {
|
|
13568
13570
|
super();
|
|
13569
13571
|
init(this, options, instance68, create_fragment68, safe_not_equal, {
|
|
13570
|
-
app:
|
|
13571
|
-
theme:
|
|
13572
|
-
language:
|
|
13573
|
-
config: 15
|
|
13572
|
+
app: 1,
|
|
13573
|
+
theme: 2,
|
|
13574
|
+
language: 3,
|
|
13575
|
+
config: 15,
|
|
13576
|
+
colors: 0
|
|
13574
13577
|
});
|
|
13575
13578
|
}
|
|
13576
13579
|
};
|
|
@@ -14518,11 +14521,7 @@ var i18n6 = {
|
|
|
14518
14521
|
pause: "Pause",
|
|
14519
14522
|
speed: "Speed"
|
|
14520
14523
|
},
|
|
14521
|
-
"zh-CN": {
|
|
14522
|
-
play: "\u64AD\u653E",
|
|
14523
|
-
pause: "\u6682\u505C",
|
|
14524
|
-
speed: "\u901F\u5EA6"
|
|
14525
|
-
}
|
|
14524
|
+
"zh-CN": { play: "\u64AD\u653E", pause: "\u6682\u505C", speed: "\u901F\u5EA6" }
|
|
14526
14525
|
};
|
|
14527
14526
|
function format(ms) {
|
|
14528
14527
|
const s = Math.floor(ms / 1e3);
|
|
@@ -14938,19 +14937,19 @@ function create_if_block_32(ctx) {
|
|
|
14938
14937
|
props: {
|
|
14939
14938
|
app: (
|
|
14940
14939
|
/*app*/
|
|
14941
|
-
ctx[
|
|
14940
|
+
ctx[0]
|
|
14942
14941
|
),
|
|
14943
14942
|
theme: (
|
|
14944
14943
|
/*theme*/
|
|
14945
|
-
ctx[
|
|
14944
|
+
ctx[1]
|
|
14946
14945
|
),
|
|
14947
14946
|
language: (
|
|
14948
14947
|
/*language*/
|
|
14949
|
-
ctx[
|
|
14948
|
+
ctx[2]
|
|
14950
14949
|
),
|
|
14951
14950
|
config: (
|
|
14952
14951
|
/*config*/
|
|
14953
|
-
ctx[
|
|
14952
|
+
ctx[3].toolbar || {}
|
|
14954
14953
|
)
|
|
14955
14954
|
}
|
|
14956
14955
|
});
|
|
@@ -14965,21 +14964,21 @@ function create_if_block_32(ctx) {
|
|
|
14965
14964
|
p(ctx2, dirty) {
|
|
14966
14965
|
const toolbar_changes = {};
|
|
14967
14966
|
if (dirty & /*app*/
|
|
14968
|
-
|
|
14967
|
+
1)
|
|
14969
14968
|
toolbar_changes.app = /*app*/
|
|
14970
|
-
ctx2[
|
|
14969
|
+
ctx2[0];
|
|
14971
14970
|
if (dirty & /*theme*/
|
|
14972
|
-
|
|
14971
|
+
2)
|
|
14973
14972
|
toolbar_changes.theme = /*theme*/
|
|
14974
|
-
ctx2[
|
|
14973
|
+
ctx2[1];
|
|
14975
14974
|
if (dirty & /*language*/
|
|
14976
|
-
|
|
14975
|
+
4)
|
|
14977
14976
|
toolbar_changes.language = /*language*/
|
|
14978
|
-
ctx2[
|
|
14977
|
+
ctx2[2];
|
|
14979
14978
|
if (dirty & /*config*/
|
|
14980
|
-
|
|
14979
|
+
8)
|
|
14981
14980
|
toolbar_changes.config = /*config*/
|
|
14982
|
-
ctx2[
|
|
14981
|
+
ctx2[3].toolbar || {};
|
|
14983
14982
|
toolbar.$set(toolbar_changes);
|
|
14984
14983
|
},
|
|
14985
14984
|
i(local) {
|
|
@@ -15004,15 +15003,15 @@ function create_if_block_23(ctx) {
|
|
|
15004
15003
|
props: {
|
|
15005
15004
|
app: (
|
|
15006
15005
|
/*app*/
|
|
15007
|
-
ctx[
|
|
15006
|
+
ctx[0]
|
|
15008
15007
|
),
|
|
15009
15008
|
theme: (
|
|
15010
15009
|
/*theme*/
|
|
15011
|
-
ctx[
|
|
15010
|
+
ctx[1]
|
|
15012
15011
|
),
|
|
15013
15012
|
language: (
|
|
15014
15013
|
/*language*/
|
|
15015
|
-
ctx[
|
|
15014
|
+
ctx[2]
|
|
15016
15015
|
)
|
|
15017
15016
|
}
|
|
15018
15017
|
});
|
|
@@ -15027,17 +15026,17 @@ function create_if_block_23(ctx) {
|
|
|
15027
15026
|
p(ctx2, dirty) {
|
|
15028
15027
|
const redoundo_changes = {};
|
|
15029
15028
|
if (dirty & /*app*/
|
|
15030
|
-
|
|
15029
|
+
1)
|
|
15031
15030
|
redoundo_changes.app = /*app*/
|
|
15032
|
-
ctx2[
|
|
15031
|
+
ctx2[0];
|
|
15033
15032
|
if (dirty & /*theme*/
|
|
15034
|
-
|
|
15033
|
+
2)
|
|
15035
15034
|
redoundo_changes.theme = /*theme*/
|
|
15036
|
-
ctx2[
|
|
15035
|
+
ctx2[1];
|
|
15037
15036
|
if (dirty & /*language*/
|
|
15038
|
-
|
|
15037
|
+
4)
|
|
15039
15038
|
redoundo_changes.language = /*language*/
|
|
15040
|
-
ctx2[
|
|
15039
|
+
ctx2[2];
|
|
15041
15040
|
redoundo.$set(redoundo_changes);
|
|
15042
15041
|
},
|
|
15043
15042
|
i(local) {
|
|
@@ -15062,15 +15061,15 @@ function create_if_block_14(ctx) {
|
|
|
15062
15061
|
props: {
|
|
15063
15062
|
app: (
|
|
15064
15063
|
/*app*/
|
|
15065
|
-
ctx[
|
|
15064
|
+
ctx[0]
|
|
15066
15065
|
),
|
|
15067
15066
|
theme: (
|
|
15068
15067
|
/*theme*/
|
|
15069
|
-
ctx[
|
|
15068
|
+
ctx[1]
|
|
15070
15069
|
),
|
|
15071
15070
|
language: (
|
|
15072
15071
|
/*language*/
|
|
15073
|
-
ctx[
|
|
15072
|
+
ctx[2]
|
|
15074
15073
|
)
|
|
15075
15074
|
}
|
|
15076
15075
|
});
|
|
@@ -15085,17 +15084,17 @@ function create_if_block_14(ctx) {
|
|
|
15085
15084
|
p(ctx2, dirty) {
|
|
15086
15085
|
const zoomcontrol_changes = {};
|
|
15087
15086
|
if (dirty & /*app*/
|
|
15088
|
-
|
|
15087
|
+
1)
|
|
15089
15088
|
zoomcontrol_changes.app = /*app*/
|
|
15090
|
-
ctx2[
|
|
15089
|
+
ctx2[0];
|
|
15091
15090
|
if (dirty & /*theme*/
|
|
15092
|
-
|
|
15091
|
+
2)
|
|
15093
15092
|
zoomcontrol_changes.theme = /*theme*/
|
|
15094
|
-
ctx2[
|
|
15093
|
+
ctx2[1];
|
|
15095
15094
|
if (dirty & /*language*/
|
|
15096
|
-
|
|
15095
|
+
4)
|
|
15097
15096
|
zoomcontrol_changes.language = /*language*/
|
|
15098
|
-
ctx2[
|
|
15097
|
+
ctx2[2];
|
|
15099
15098
|
zoomcontrol.$set(zoomcontrol_changes);
|
|
15100
15099
|
},
|
|
15101
15100
|
i(local) {
|
|
@@ -15120,15 +15119,15 @@ function create_if_block18(ctx) {
|
|
|
15120
15119
|
props: {
|
|
15121
15120
|
app: (
|
|
15122
15121
|
/*app*/
|
|
15123
|
-
ctx[
|
|
15122
|
+
ctx[0]
|
|
15124
15123
|
),
|
|
15125
15124
|
theme: (
|
|
15126
15125
|
/*theme*/
|
|
15127
|
-
ctx[
|
|
15126
|
+
ctx[1]
|
|
15128
15127
|
),
|
|
15129
15128
|
language: (
|
|
15130
15129
|
/*language*/
|
|
15131
|
-
ctx[
|
|
15130
|
+
ctx[2]
|
|
15132
15131
|
)
|
|
15133
15132
|
}
|
|
15134
15133
|
});
|
|
@@ -15143,17 +15142,17 @@ function create_if_block18(ctx) {
|
|
|
15143
15142
|
p(ctx2, dirty) {
|
|
15144
15143
|
const pagecontrol_changes = {};
|
|
15145
15144
|
if (dirty & /*app*/
|
|
15146
|
-
|
|
15145
|
+
1)
|
|
15147
15146
|
pagecontrol_changes.app = /*app*/
|
|
15148
|
-
ctx2[
|
|
15147
|
+
ctx2[0];
|
|
15149
15148
|
if (dirty & /*theme*/
|
|
15150
|
-
|
|
15149
|
+
2)
|
|
15151
15150
|
pagecontrol_changes.theme = /*theme*/
|
|
15152
|
-
ctx2[
|
|
15151
|
+
ctx2[1];
|
|
15153
15152
|
if (dirty & /*language*/
|
|
15154
|
-
|
|
15153
|
+
4)
|
|
15155
15154
|
pagecontrol_changes.language = /*language*/
|
|
15156
|
-
ctx2[
|
|
15155
|
+
ctx2[2];
|
|
15157
15156
|
pagecontrol.$set(pagecontrol_changes);
|
|
15158
15157
|
},
|
|
15159
15158
|
i(local) {
|
|
@@ -15188,19 +15187,19 @@ function create_fragment71(ctx) {
|
|
|
15188
15187
|
let dispose;
|
|
15189
15188
|
let if_block0 = (
|
|
15190
15189
|
/*config*/
|
|
15191
|
-
((_a = ctx[
|
|
15190
|
+
((_a = ctx[3].toolbar) == null ? void 0 : _a.enable) !== false && create_if_block_32(ctx)
|
|
15192
15191
|
);
|
|
15193
15192
|
let if_block1 = (
|
|
15194
15193
|
/*config*/
|
|
15195
|
-
((_b = ctx[
|
|
15194
|
+
((_b = ctx[3].redo_undo) == null ? void 0 : _b.enable) !== false && create_if_block_23(ctx)
|
|
15196
15195
|
);
|
|
15197
15196
|
let if_block2 = (
|
|
15198
15197
|
/*config*/
|
|
15199
|
-
((_c = ctx[
|
|
15198
|
+
((_c = ctx[3].zoom_control) == null ? void 0 : _c.enable) !== false && create_if_block_14(ctx)
|
|
15200
15199
|
);
|
|
15201
15200
|
let if_block3 = (
|
|
15202
15201
|
/*config*/
|
|
15203
|
-
((_d = ctx[
|
|
15202
|
+
((_d = ctx[3].page_control) == null ? void 0 : _d.enable) !== false && create_if_block18(ctx)
|
|
15204
15203
|
);
|
|
15205
15204
|
return {
|
|
15206
15205
|
c() {
|
|
@@ -15224,7 +15223,7 @@ function create_fragment71(ctx) {
|
|
|
15224
15223
|
if_block3.c();
|
|
15225
15224
|
attr(div0, "class", name9 + "-view");
|
|
15226
15225
|
attr(div1, "class", div1_class_value = name9 + "-" + /*config*/
|
|
15227
|
-
(((_a2 = ctx[
|
|
15226
|
+
(((_a2 = ctx[3].toolbar) == null ? void 0 : _a2.placement) || "left"));
|
|
15228
15227
|
toggle_class(div1, "hidden", !/*toolbar_has_items*/
|
|
15229
15228
|
ctx[6] || !/*layout*/
|
|
15230
15229
|
(ctx[5] === "visible" || /*layout*/
|
|
@@ -15245,12 +15244,12 @@ function create_fragment71(ctx) {
|
|
|
15245
15244
|
);
|
|
15246
15245
|
attr(div4, "class", name9 + "-root");
|
|
15247
15246
|
toggle_class(div4, "loading", !/*app*/
|
|
15248
|
-
ctx[
|
|
15247
|
+
ctx[0]);
|
|
15249
15248
|
},
|
|
15250
15249
|
m(target, anchor) {
|
|
15251
15250
|
insert(target, div4, anchor);
|
|
15252
15251
|
append(div4, div0);
|
|
15253
|
-
ctx[
|
|
15252
|
+
ctx[16](div0);
|
|
15254
15253
|
append(div4, t0);
|
|
15255
15254
|
append(div4, div1);
|
|
15256
15255
|
if (if_block0)
|
|
@@ -15282,12 +15281,12 @@ function create_fragment71(ctx) {
|
|
|
15282
15281
|
var _a2, _b2, _c2, _d2, _e;
|
|
15283
15282
|
if (
|
|
15284
15283
|
/*config*/
|
|
15285
|
-
((_a2 = ctx2[
|
|
15284
|
+
((_a2 = ctx2[3].toolbar) == null ? void 0 : _a2.enable) !== false
|
|
15286
15285
|
) {
|
|
15287
15286
|
if (if_block0) {
|
|
15288
15287
|
if_block0.p(ctx2, dirty);
|
|
15289
15288
|
if (dirty & /*config*/
|
|
15290
|
-
|
|
15289
|
+
8) {
|
|
15291
15290
|
transition_in(if_block0, 1);
|
|
15292
15291
|
}
|
|
15293
15292
|
} else {
|
|
@@ -15304,12 +15303,12 @@ function create_fragment71(ctx) {
|
|
|
15304
15303
|
check_outros();
|
|
15305
15304
|
}
|
|
15306
15305
|
if (!current || dirty & /*config*/
|
|
15307
|
-
|
|
15308
|
-
(((_b2 = ctx2[
|
|
15306
|
+
8 && div1_class_value !== (div1_class_value = name9 + "-" + /*config*/
|
|
15307
|
+
(((_b2 = ctx2[3].toolbar) == null ? void 0 : _b2.placement) || "left"))) {
|
|
15309
15308
|
attr(div1, "class", div1_class_value);
|
|
15310
15309
|
}
|
|
15311
15310
|
if (!current || dirty & /*config, toolbar_has_items, layout*/
|
|
15312
|
-
|
|
15311
|
+
104) {
|
|
15313
15312
|
toggle_class(div1, "hidden", !/*toolbar_has_items*/
|
|
15314
15313
|
ctx2[6] || !/*layout*/
|
|
15315
15314
|
(ctx2[5] === "visible" || /*layout*/
|
|
@@ -15317,12 +15316,12 @@ function create_fragment71(ctx) {
|
|
|
15317
15316
|
}
|
|
15318
15317
|
if (
|
|
15319
15318
|
/*config*/
|
|
15320
|
-
((_c2 = ctx2[
|
|
15319
|
+
((_c2 = ctx2[3].redo_undo) == null ? void 0 : _c2.enable) !== false
|
|
15321
15320
|
) {
|
|
15322
15321
|
if (if_block1) {
|
|
15323
15322
|
if_block1.p(ctx2, dirty);
|
|
15324
15323
|
if (dirty & /*config*/
|
|
15325
|
-
|
|
15324
|
+
8) {
|
|
15326
15325
|
transition_in(if_block1, 1);
|
|
15327
15326
|
}
|
|
15328
15327
|
} else {
|
|
@@ -15340,12 +15339,12 @@ function create_fragment71(ctx) {
|
|
|
15340
15339
|
}
|
|
15341
15340
|
if (
|
|
15342
15341
|
/*config*/
|
|
15343
|
-
((_d2 = ctx2[
|
|
15342
|
+
((_d2 = ctx2[3].zoom_control) == null ? void 0 : _d2.enable) !== false
|
|
15344
15343
|
) {
|
|
15345
15344
|
if (if_block2) {
|
|
15346
15345
|
if_block2.p(ctx2, dirty);
|
|
15347
15346
|
if (dirty & /*config*/
|
|
15348
|
-
|
|
15347
|
+
8) {
|
|
15349
15348
|
transition_in(if_block2, 1);
|
|
15350
15349
|
}
|
|
15351
15350
|
} else {
|
|
@@ -15372,12 +15371,12 @@ function create_fragment71(ctx) {
|
|
|
15372
15371
|
}
|
|
15373
15372
|
if (
|
|
15374
15373
|
/*config*/
|
|
15375
|
-
((_e = ctx2[
|
|
15374
|
+
((_e = ctx2[3].page_control) == null ? void 0 : _e.enable) !== false
|
|
15376
15375
|
) {
|
|
15377
15376
|
if (if_block3) {
|
|
15378
15377
|
if_block3.p(ctx2, dirty);
|
|
15379
15378
|
if (dirty & /*config*/
|
|
15380
|
-
|
|
15379
|
+
8) {
|
|
15381
15380
|
transition_in(if_block3, 1);
|
|
15382
15381
|
}
|
|
15383
15382
|
} else {
|
|
@@ -15403,9 +15402,9 @@ function create_fragment71(ctx) {
|
|
|
15403
15402
|
);
|
|
15404
15403
|
}
|
|
15405
15404
|
if (!current || dirty & /*app*/
|
|
15406
|
-
|
|
15405
|
+
1) {
|
|
15407
15406
|
toggle_class(div4, "loading", !/*app*/
|
|
15408
|
-
ctx2[
|
|
15407
|
+
ctx2[0]);
|
|
15409
15408
|
}
|
|
15410
15409
|
},
|
|
15411
15410
|
i(local) {
|
|
@@ -15427,7 +15426,7 @@ function create_fragment71(ctx) {
|
|
|
15427
15426
|
d(detaching) {
|
|
15428
15427
|
if (detaching)
|
|
15429
15428
|
detach(div4);
|
|
15430
|
-
ctx[
|
|
15429
|
+
ctx[16](null);
|
|
15431
15430
|
if (if_block0)
|
|
15432
15431
|
if_block0.d();
|
|
15433
15432
|
if (if_block1)
|
|
@@ -15443,15 +15442,13 @@ function create_fragment71(ctx) {
|
|
|
15443
15442
|
}
|
|
15444
15443
|
var name9 = "fastboard";
|
|
15445
15444
|
function instance71($$self, $$props, $$invalidate) {
|
|
15446
|
-
let manager;
|
|
15447
|
-
let room;
|
|
15448
15445
|
let writable2;
|
|
15449
15446
|
let boxState;
|
|
15450
15447
|
let focusedApp;
|
|
15451
15448
|
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(
|
|
15449
|
+
let $focusedApp, $$unsubscribe_focusedApp = noop, $$subscribe_focusedApp = () => ($$unsubscribe_focusedApp(), $$unsubscribe_focusedApp = subscribe(focusedApp, ($$value) => $$invalidate(13, $focusedApp = $$value)), focusedApp);
|
|
15450
|
+
let $boxState, $$unsubscribe_boxState = noop, $$subscribe_boxState = () => ($$unsubscribe_boxState(), $$unsubscribe_boxState = subscribe(boxState, ($$value) => $$invalidate(14, $boxState = $$value)), boxState);
|
|
15451
|
+
let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(15, $writable = $$value)), writable2);
|
|
15455
15452
|
$$self.$$.on_destroy.push(() => $$unsubscribe_focusedApp());
|
|
15456
15453
|
$$self.$$.on_destroy.push(() => $$unsubscribe_boxState());
|
|
15457
15454
|
$$self.$$.on_destroy.push(() => $$unsubscribe_writable());
|
|
@@ -15460,7 +15457,6 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15460
15457
|
let { language = "en" } = $$props;
|
|
15461
15458
|
let { containerRef = void 0 } = $$props;
|
|
15462
15459
|
let { config = {} } = $$props;
|
|
15463
|
-
let { colors: colors2 = void 0 } = $$props;
|
|
15464
15460
|
const AppsShowToolbar = ["DocsViewer", "Slide"];
|
|
15465
15461
|
let container;
|
|
15466
15462
|
let layout = "hidden";
|
|
@@ -15487,58 +15483,31 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15487
15483
|
}
|
|
15488
15484
|
$$self.$$set = ($$props2) => {
|
|
15489
15485
|
if ("app" in $$props2)
|
|
15490
|
-
$$invalidate(
|
|
15486
|
+
$$invalidate(0, app = $$props2.app);
|
|
15491
15487
|
if ("theme" in $$props2)
|
|
15492
|
-
$$invalidate(
|
|
15488
|
+
$$invalidate(1, theme = $$props2.theme);
|
|
15493
15489
|
if ("language" in $$props2)
|
|
15494
|
-
$$invalidate(
|
|
15490
|
+
$$invalidate(2, language = $$props2.language);
|
|
15495
15491
|
if ("containerRef" in $$props2)
|
|
15496
|
-
$$invalidate(
|
|
15492
|
+
$$invalidate(11, containerRef = $$props2.containerRef);
|
|
15497
15493
|
if ("config" in $$props2)
|
|
15498
|
-
$$invalidate(
|
|
15499
|
-
if ("colors" in $$props2)
|
|
15500
|
-
$$invalidate(11, colors2 = $$props2.colors);
|
|
15494
|
+
$$invalidate(3, config = $$props2.config);
|
|
15501
15495
|
};
|
|
15502
15496
|
$$self.$$.update = () => {
|
|
15503
15497
|
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) {
|
|
15498
|
+
1) {
|
|
15530
15499
|
$$subscribe_writable($$invalidate(9, writable2 = app == null ? void 0 : app.writable));
|
|
15531
15500
|
}
|
|
15532
15501
|
if ($$self.$$.dirty & /*app*/
|
|
15533
|
-
|
|
15502
|
+
1) {
|
|
15534
15503
|
$$subscribe_boxState($$invalidate(8, boxState = app == null ? void 0 : app.boxState));
|
|
15535
15504
|
}
|
|
15536
15505
|
if ($$self.$$.dirty & /*app*/
|
|
15537
|
-
|
|
15506
|
+
1) {
|
|
15538
15507
|
$$subscribe_focusedApp($$invalidate(7, focusedApp = app == null ? void 0 : app.focusedApp));
|
|
15539
15508
|
}
|
|
15540
15509
|
if ($$self.$$.dirty & /*$writable, $boxState, $focusedApp*/
|
|
15541
|
-
|
|
15510
|
+
57344) {
|
|
15542
15511
|
if (!$writable) {
|
|
15543
15512
|
$$invalidate(5, layout = "hidden");
|
|
15544
15513
|
} else if ($boxState === "maximized") {
|
|
@@ -15552,15 +15521,15 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15552
15521
|
}
|
|
15553
15522
|
}
|
|
15554
15523
|
if ($$self.$$.dirty & /*config*/
|
|
15555
|
-
|
|
15524
|
+
8) {
|
|
15556
15525
|
$$invalidate(6, toolbar_has_items = !config.toolbar || !config.toolbar.items || !config.toolbar.apps || config.toolbar.items.length > 0 || config.toolbar.apps.enable !== false);
|
|
15557
15526
|
}
|
|
15558
15527
|
if ($$self.$$.dirty & /*app, container*/
|
|
15559
|
-
|
|
15528
|
+
17) {
|
|
15560
15529
|
try {
|
|
15561
15530
|
if (app && container) {
|
|
15562
15531
|
app.bindContainer(container);
|
|
15563
|
-
$$invalidate(
|
|
15532
|
+
$$invalidate(12, mounted = true);
|
|
15564
15533
|
}
|
|
15565
15534
|
} catch (err) {
|
|
15566
15535
|
console.error("[fastboard] An error occurred while binding container");
|
|
@@ -15568,17 +15537,17 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15568
15537
|
}
|
|
15569
15538
|
}
|
|
15570
15539
|
if ($$self.$$.dirty & /*app, theme, mounted*/
|
|
15571
|
-
|
|
15540
|
+
4099) {
|
|
15572
15541
|
if (app && theme && mounted) {
|
|
15573
15542
|
app.manager.setPrefersColorScheme(theme);
|
|
15574
15543
|
}
|
|
15575
15544
|
}
|
|
15576
15545
|
};
|
|
15577
15546
|
return [
|
|
15578
|
-
config,
|
|
15579
15547
|
app,
|
|
15580
15548
|
theme,
|
|
15581
15549
|
language,
|
|
15550
|
+
config,
|
|
15582
15551
|
container,
|
|
15583
15552
|
layout,
|
|
15584
15553
|
toolbar_has_items,
|
|
@@ -15586,11 +15555,8 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
15586
15555
|
boxState,
|
|
15587
15556
|
writable2,
|
|
15588
15557
|
focus_me,
|
|
15589
|
-
colors2,
|
|
15590
15558
|
containerRef,
|
|
15591
15559
|
mounted,
|
|
15592
|
-
room,
|
|
15593
|
-
manager,
|
|
15594
15560
|
$focusedApp,
|
|
15595
15561
|
$boxState,
|
|
15596
15562
|
$writable,
|
|
@@ -15601,12 +15567,11 @@ var Fastboard = class extends SvelteComponent {
|
|
|
15601
15567
|
constructor(options) {
|
|
15602
15568
|
super();
|
|
15603
15569
|
init(this, options, instance71, create_fragment71, not_equal, {
|
|
15604
|
-
app:
|
|
15605
|
-
theme:
|
|
15606
|
-
language:
|
|
15607
|
-
containerRef:
|
|
15608
|
-
config:
|
|
15609
|
-
colors: 11
|
|
15570
|
+
app: 0,
|
|
15571
|
+
theme: 1,
|
|
15572
|
+
language: 2,
|
|
15573
|
+
containerRef: 11,
|
|
15574
|
+
config: 3
|
|
15610
15575
|
});
|
|
15611
15576
|
}
|
|
15612
15577
|
};
|
|
@@ -15628,15 +15593,11 @@ function createUI(app, div) {
|
|
|
15628
15593
|
if (fastboard) {
|
|
15629
15594
|
fastboard.$destroy();
|
|
15630
15595
|
}
|
|
15631
|
-
if (
|
|
15632
|
-
|
|
15633
|
-
|
|
15634
|
-
props.config = __spreadProps(__spreadValues({}, props.config), {
|
|
15635
|
-
toolbar: __spreadProps(__spreadValues({}, props.config.toolbar), {
|
|
15636
|
-
colors: colors2
|
|
15637
|
-
})
|
|
15638
|
-
});
|
|
15596
|
+
if (colors2 && (props == null ? void 0 : props.config) && !((_a = props.config.toolbar) == null ? void 0 : _a.colors)) {
|
|
15597
|
+
if (!(props == null ? void 0 : props.config.toolbar)) {
|
|
15598
|
+
props.config.toolbar = {};
|
|
15639
15599
|
}
|
|
15600
|
+
props.config.toolbar.colors = colors2;
|
|
15640
15601
|
}
|
|
15641
15602
|
fastboard = new Fastboard_default({ target: div2, props: __spreadValues({ app }, props) });
|
|
15642
15603
|
return ui;
|
|
@@ -15644,15 +15605,11 @@ function createUI(app, div) {
|
|
|
15644
15605
|
update(props) {
|
|
15645
15606
|
var _a;
|
|
15646
15607
|
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
|
-
});
|
|
15608
|
+
if (colors2 && (props == null ? void 0 : props.config) && !((_a = props.config.toolbar) == null ? void 0 : _a.colors)) {
|
|
15609
|
+
if (!(props == null ? void 0 : props.config.toolbar)) {
|
|
15610
|
+
props.config.toolbar = {};
|
|
15655
15611
|
}
|
|
15612
|
+
props.config.toolbar.colors = colors2;
|
|
15656
15613
|
}
|
|
15657
15614
|
fastboard.$set(props);
|
|
15658
15615
|
}
|