@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.svelte.mjs
CHANGED
|
@@ -12477,15 +12477,15 @@ function create_fragment68(ctx) {
|
|
|
12477
12477
|
props: {
|
|
12478
12478
|
app: (
|
|
12479
12479
|
/*app*/
|
|
12480
|
-
ctx[
|
|
12480
|
+
ctx[1]
|
|
12481
12481
|
),
|
|
12482
12482
|
theme: (
|
|
12483
12483
|
/*theme*/
|
|
12484
|
-
ctx[
|
|
12484
|
+
ctx[2]
|
|
12485
12485
|
),
|
|
12486
12486
|
language: (
|
|
12487
12487
|
/*language*/
|
|
12488
|
-
ctx[
|
|
12488
|
+
ctx[3]
|
|
12489
12489
|
),
|
|
12490
12490
|
disabled: (
|
|
12491
12491
|
/*disabled*/
|
|
@@ -12517,14 +12517,14 @@ function create_fragment68(ctx) {
|
|
|
12517
12517
|
),
|
|
12518
12518
|
colors: (
|
|
12519
12519
|
/*colors*/
|
|
12520
|
-
ctx[
|
|
12520
|
+
ctx[0]
|
|
12521
12521
|
)
|
|
12522
12522
|
}
|
|
12523
12523
|
});
|
|
12524
12524
|
function select_block_type(ctx2, dirty) {
|
|
12525
12525
|
if (
|
|
12526
12526
|
/*collapsed*/
|
|
12527
|
-
ctx2[
|
|
12527
|
+
ctx2[4]
|
|
12528
12528
|
)
|
|
12529
12529
|
return create_if_block15;
|
|
12530
12530
|
return create_else_block14;
|
|
@@ -12545,7 +12545,7 @@ function create_fragment68(ctx) {
|
|
|
12545
12545
|
path1 = svg_element("path");
|
|
12546
12546
|
if_block.c();
|
|
12547
12547
|
attr(div0, "class", div0_class_value = name6 + "-contents " + /*theme*/
|
|
12548
|
-
ctx[
|
|
12548
|
+
ctx[2]);
|
|
12549
12549
|
set_style(
|
|
12550
12550
|
div0,
|
|
12551
12551
|
"height",
|
|
@@ -12567,14 +12567,14 @@ function create_fragment68(ctx) {
|
|
|
12567
12567
|
attr(svg, "stroke-width", "2");
|
|
12568
12568
|
attr(svg, "viewBox", "0 0 32 120");
|
|
12569
12569
|
attr(label, "class", label_class_value = name6 + "-handler " + /*theme*/
|
|
12570
|
-
ctx[
|
|
12570
|
+
ctx[2]);
|
|
12571
12571
|
attr(div1, "class", div1_class_value = name6 + " " + /*theme*/
|
|
12572
|
-
ctx[
|
|
12572
|
+
ctx[2]);
|
|
12573
12573
|
toggle_class(
|
|
12574
12574
|
div1,
|
|
12575
12575
|
"collapsed",
|
|
12576
12576
|
/*collapsed*/
|
|
12577
|
-
ctx[
|
|
12577
|
+
ctx[4]
|
|
12578
12578
|
);
|
|
12579
12579
|
},
|
|
12580
12580
|
m(target, anchor) {
|
|
@@ -12585,7 +12585,7 @@ function create_fragment68(ctx) {
|
|
|
12585
12585
|
append(div1, label);
|
|
12586
12586
|
append(label, input);
|
|
12587
12587
|
input.checked = /*collapsed*/
|
|
12588
|
-
ctx[
|
|
12588
|
+
ctx[4];
|
|
12589
12589
|
append(label, t1);
|
|
12590
12590
|
append(label, svg);
|
|
12591
12591
|
append(svg, path0);
|
|
@@ -12613,17 +12613,17 @@ function create_fragment68(ctx) {
|
|
|
12613
12613
|
p(ctx2, [dirty]) {
|
|
12614
12614
|
const contents_changes = {};
|
|
12615
12615
|
if (dirty & /*app*/
|
|
12616
|
-
|
|
12616
|
+
2)
|
|
12617
12617
|
contents_changes.app = /*app*/
|
|
12618
|
-
ctx2[
|
|
12618
|
+
ctx2[1];
|
|
12619
12619
|
if (dirty & /*theme*/
|
|
12620
|
-
|
|
12620
|
+
4)
|
|
12621
12621
|
contents_changes.theme = /*theme*/
|
|
12622
|
-
ctx2[
|
|
12622
|
+
ctx2[2];
|
|
12623
12623
|
if (dirty & /*language*/
|
|
12624
|
-
|
|
12624
|
+
8)
|
|
12625
12625
|
contents_changes.language = /*language*/
|
|
12626
|
-
ctx2[
|
|
12626
|
+
ctx2[3];
|
|
12627
12627
|
if (dirty & /*disabled*/
|
|
12628
12628
|
1024)
|
|
12629
12629
|
contents_changes.disabled = /*disabled*/
|
|
@@ -12649,13 +12649,13 @@ function create_fragment68(ctx) {
|
|
|
12649
12649
|
contents_changes.hide_apps = /*hide_apps*/
|
|
12650
12650
|
ctx2[5];
|
|
12651
12651
|
if (dirty & /*colors*/
|
|
12652
|
-
|
|
12652
|
+
1)
|
|
12653
12653
|
contents_changes.colors = /*colors*/
|
|
12654
|
-
ctx2[
|
|
12654
|
+
ctx2[0];
|
|
12655
12655
|
contents.$set(contents_changes);
|
|
12656
12656
|
if (!current || dirty & /*theme*/
|
|
12657
|
-
|
|
12658
|
-
ctx2[
|
|
12657
|
+
4 && div0_class_value !== (div0_class_value = name6 + "-contents " + /*theme*/
|
|
12658
|
+
ctx2[2])) {
|
|
12659
12659
|
attr(div0, "class", div0_class_value);
|
|
12660
12660
|
}
|
|
12661
12661
|
if (dirty & /*scrollable, computed_height*/
|
|
@@ -12671,9 +12671,9 @@ function create_fragment68(ctx) {
|
|
|
12671
12671
|
);
|
|
12672
12672
|
}
|
|
12673
12673
|
if (dirty & /*collapsed*/
|
|
12674
|
-
|
|
12674
|
+
16) {
|
|
12675
12675
|
input.checked = /*collapsed*/
|
|
12676
|
-
ctx2[
|
|
12676
|
+
ctx2[4];
|
|
12677
12677
|
}
|
|
12678
12678
|
if (current_block_type === (current_block_type = select_block_type(ctx2)) && if_block) {
|
|
12679
12679
|
if_block.p(ctx2, dirty);
|
|
@@ -12686,22 +12686,22 @@ function create_fragment68(ctx) {
|
|
|
12686
12686
|
}
|
|
12687
12687
|
}
|
|
12688
12688
|
if (!current || dirty & /*theme*/
|
|
12689
|
-
|
|
12690
|
-
ctx2[
|
|
12689
|
+
4 && label_class_value !== (label_class_value = name6 + "-handler " + /*theme*/
|
|
12690
|
+
ctx2[2])) {
|
|
12691
12691
|
attr(label, "class", label_class_value);
|
|
12692
12692
|
}
|
|
12693
12693
|
if (!current || dirty & /*theme*/
|
|
12694
|
-
|
|
12695
|
-
ctx2[
|
|
12694
|
+
4 && div1_class_value !== (div1_class_value = name6 + " " + /*theme*/
|
|
12695
|
+
ctx2[2])) {
|
|
12696
12696
|
attr(div1, "class", div1_class_value);
|
|
12697
12697
|
}
|
|
12698
12698
|
if (!current || dirty & /*theme, collapsed*/
|
|
12699
|
-
|
|
12699
|
+
20) {
|
|
12700
12700
|
toggle_class(
|
|
12701
12701
|
div1,
|
|
12702
12702
|
"collapsed",
|
|
12703
12703
|
/*collapsed*/
|
|
12704
|
-
ctx2[
|
|
12704
|
+
ctx2[4]
|
|
12705
12705
|
);
|
|
12706
12706
|
}
|
|
12707
12707
|
},
|
|
@@ -12735,7 +12735,6 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
12735
12735
|
let placement;
|
|
12736
12736
|
let items;
|
|
12737
12737
|
let hide_apps;
|
|
12738
|
-
let colors2;
|
|
12739
12738
|
let $container_height;
|
|
12740
12739
|
let $scroll_height;
|
|
12741
12740
|
let $phase, $$unsubscribe_phase = noop, $$subscribe_phase = () => ($$unsubscribe_phase(), $$unsubscribe_phase = subscribe(phase, ($$value) => $$invalidate(18, $phase = $$value)), phase);
|
|
@@ -12746,6 +12745,7 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
12746
12745
|
let { theme = "light" } = $$props;
|
|
12747
12746
|
let { language = "en" } = $$props;
|
|
12748
12747
|
let { config = {} } = $$props;
|
|
12748
|
+
let { colors: colors2 = void 0 } = $$props;
|
|
12749
12749
|
const extra_height = (32 + 4 + 4) * 2;
|
|
12750
12750
|
let collapsed = config.collapsed;
|
|
12751
12751
|
let container_height = writable(0);
|
|
@@ -12754,26 +12754,28 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
12754
12754
|
component_subscribe($$self, scroll_height, (value) => $$invalidate(17, $scroll_height = value));
|
|
12755
12755
|
function input_change_handler() {
|
|
12756
12756
|
collapsed = this.checked;
|
|
12757
|
-
$$invalidate(
|
|
12757
|
+
$$invalidate(4, collapsed);
|
|
12758
12758
|
}
|
|
12759
12759
|
$$self.$$set = ($$props2) => {
|
|
12760
12760
|
if ("app" in $$props2)
|
|
12761
|
-
$$invalidate(
|
|
12761
|
+
$$invalidate(1, app = $$props2.app);
|
|
12762
12762
|
if ("theme" in $$props2)
|
|
12763
|
-
$$invalidate(
|
|
12763
|
+
$$invalidate(2, theme = $$props2.theme);
|
|
12764
12764
|
if ("language" in $$props2)
|
|
12765
|
-
$$invalidate(
|
|
12765
|
+
$$invalidate(3, language = $$props2.language);
|
|
12766
12766
|
if ("config" in $$props2)
|
|
12767
12767
|
$$invalidate(15, config = $$props2.config);
|
|
12768
|
+
if ("colors" in $$props2)
|
|
12769
|
+
$$invalidate(0, colors2 = $$props2.colors);
|
|
12768
12770
|
};
|
|
12769
12771
|
$$self.$$.update = () => {
|
|
12770
|
-
var _a;
|
|
12772
|
+
var _a, _b;
|
|
12771
12773
|
if ($$self.$$.dirty & /*app*/
|
|
12772
|
-
|
|
12774
|
+
2) {
|
|
12773
12775
|
$$subscribe_writable($$invalidate(12, writable2 = app == null ? void 0 : app.writable));
|
|
12774
12776
|
}
|
|
12775
12777
|
if ($$self.$$.dirty & /*app*/
|
|
12776
|
-
|
|
12778
|
+
2) {
|
|
12777
12779
|
$$subscribe_phase($$invalidate(11, phase = app == null ? void 0 : app.phase));
|
|
12778
12780
|
}
|
|
12779
12781
|
if ($$self.$$.dirty & /*$writable, $phase*/
|
|
@@ -12800,17 +12802,28 @@ function instance68($$self, $$props, $$invalidate) {
|
|
|
12800
12802
|
32768) {
|
|
12801
12803
|
$$invalidate(5, hide_apps = ((_a = config.apps) == null ? void 0 : _a.enable) === false);
|
|
12802
12804
|
}
|
|
12803
|
-
if ($$self.$$.dirty & /*config*/
|
|
12804
|
-
|
|
12805
|
-
|
|
12805
|
+
if ($$self.$$.dirty & /*app, colors, config*/
|
|
12806
|
+
32771) {
|
|
12807
|
+
if ((app == null ? void 0 : app.manager) && (app == null ? void 0 : app.manager.room)) {
|
|
12808
|
+
if (colors2 && !((_b = config.colors) == null ? void 0 : _b.length)) {
|
|
12809
|
+
const floatBarOptions = app == null ? void 0 : app.manager.room.floatBarOptions;
|
|
12810
|
+
if (floatBarOptions.colors) {
|
|
12811
|
+
$$invalidate(0, colors2 = floatBarOptions.colors);
|
|
12812
|
+
}
|
|
12813
|
+
} else {
|
|
12814
|
+
$$invalidate(0, colors2 = config.colors);
|
|
12815
|
+
}
|
|
12816
|
+
} else {
|
|
12817
|
+
$$invalidate(0, colors2 = default_colors);
|
|
12818
|
+
}
|
|
12806
12819
|
}
|
|
12807
12820
|
};
|
|
12808
12821
|
return [
|
|
12822
|
+
colors2,
|
|
12809
12823
|
app,
|
|
12810
12824
|
theme,
|
|
12811
12825
|
language,
|
|
12812
12826
|
collapsed,
|
|
12813
|
-
colors2,
|
|
12814
12827
|
hide_apps,
|
|
12815
12828
|
items,
|
|
12816
12829
|
placement,
|
|
@@ -12833,10 +12846,11 @@ var Toolbar = class extends SvelteComponent {
|
|
|
12833
12846
|
constructor(options) {
|
|
12834
12847
|
super();
|
|
12835
12848
|
init(this, options, instance68, create_fragment68, safe_not_equal, {
|
|
12836
|
-
app:
|
|
12837
|
-
theme:
|
|
12838
|
-
language:
|
|
12839
|
-
config: 15
|
|
12849
|
+
app: 1,
|
|
12850
|
+
theme: 2,
|
|
12851
|
+
language: 3,
|
|
12852
|
+
config: 15,
|
|
12853
|
+
colors: 0
|
|
12840
12854
|
});
|
|
12841
12855
|
}
|
|
12842
12856
|
};
|
|
@@ -14198,19 +14212,19 @@ function create_if_block_32(ctx) {
|
|
|
14198
14212
|
props: {
|
|
14199
14213
|
app: (
|
|
14200
14214
|
/*app*/
|
|
14201
|
-
ctx[
|
|
14215
|
+
ctx[0]
|
|
14202
14216
|
),
|
|
14203
14217
|
theme: (
|
|
14204
14218
|
/*theme*/
|
|
14205
|
-
ctx[
|
|
14219
|
+
ctx[1]
|
|
14206
14220
|
),
|
|
14207
14221
|
language: (
|
|
14208
14222
|
/*language*/
|
|
14209
|
-
ctx[
|
|
14223
|
+
ctx[2]
|
|
14210
14224
|
),
|
|
14211
14225
|
config: (
|
|
14212
14226
|
/*config*/
|
|
14213
|
-
ctx[
|
|
14227
|
+
ctx[3].toolbar || {}
|
|
14214
14228
|
)
|
|
14215
14229
|
}
|
|
14216
14230
|
});
|
|
@@ -14225,21 +14239,21 @@ function create_if_block_32(ctx) {
|
|
|
14225
14239
|
p(ctx2, dirty) {
|
|
14226
14240
|
const toolbar_changes = {};
|
|
14227
14241
|
if (dirty & /*app*/
|
|
14228
|
-
|
|
14242
|
+
1)
|
|
14229
14243
|
toolbar_changes.app = /*app*/
|
|
14230
|
-
ctx2[
|
|
14244
|
+
ctx2[0];
|
|
14231
14245
|
if (dirty & /*theme*/
|
|
14232
|
-
|
|
14246
|
+
2)
|
|
14233
14247
|
toolbar_changes.theme = /*theme*/
|
|
14234
|
-
ctx2[
|
|
14248
|
+
ctx2[1];
|
|
14235
14249
|
if (dirty & /*language*/
|
|
14236
|
-
|
|
14250
|
+
4)
|
|
14237
14251
|
toolbar_changes.language = /*language*/
|
|
14238
|
-
ctx2[
|
|
14252
|
+
ctx2[2];
|
|
14239
14253
|
if (dirty & /*config*/
|
|
14240
|
-
|
|
14254
|
+
8)
|
|
14241
14255
|
toolbar_changes.config = /*config*/
|
|
14242
|
-
ctx2[
|
|
14256
|
+
ctx2[3].toolbar || {};
|
|
14243
14257
|
toolbar.$set(toolbar_changes);
|
|
14244
14258
|
},
|
|
14245
14259
|
i(local) {
|
|
@@ -14264,15 +14278,15 @@ function create_if_block_23(ctx) {
|
|
|
14264
14278
|
props: {
|
|
14265
14279
|
app: (
|
|
14266
14280
|
/*app*/
|
|
14267
|
-
ctx[
|
|
14281
|
+
ctx[0]
|
|
14268
14282
|
),
|
|
14269
14283
|
theme: (
|
|
14270
14284
|
/*theme*/
|
|
14271
|
-
ctx[
|
|
14285
|
+
ctx[1]
|
|
14272
14286
|
),
|
|
14273
14287
|
language: (
|
|
14274
14288
|
/*language*/
|
|
14275
|
-
ctx[
|
|
14289
|
+
ctx[2]
|
|
14276
14290
|
)
|
|
14277
14291
|
}
|
|
14278
14292
|
});
|
|
@@ -14287,17 +14301,17 @@ function create_if_block_23(ctx) {
|
|
|
14287
14301
|
p(ctx2, dirty) {
|
|
14288
14302
|
const redoundo_changes = {};
|
|
14289
14303
|
if (dirty & /*app*/
|
|
14290
|
-
|
|
14304
|
+
1)
|
|
14291
14305
|
redoundo_changes.app = /*app*/
|
|
14292
|
-
ctx2[
|
|
14306
|
+
ctx2[0];
|
|
14293
14307
|
if (dirty & /*theme*/
|
|
14294
|
-
|
|
14308
|
+
2)
|
|
14295
14309
|
redoundo_changes.theme = /*theme*/
|
|
14296
|
-
ctx2[
|
|
14310
|
+
ctx2[1];
|
|
14297
14311
|
if (dirty & /*language*/
|
|
14298
|
-
|
|
14312
|
+
4)
|
|
14299
14313
|
redoundo_changes.language = /*language*/
|
|
14300
|
-
ctx2[
|
|
14314
|
+
ctx2[2];
|
|
14301
14315
|
redoundo.$set(redoundo_changes);
|
|
14302
14316
|
},
|
|
14303
14317
|
i(local) {
|
|
@@ -14322,15 +14336,15 @@ function create_if_block_14(ctx) {
|
|
|
14322
14336
|
props: {
|
|
14323
14337
|
app: (
|
|
14324
14338
|
/*app*/
|
|
14325
|
-
ctx[
|
|
14339
|
+
ctx[0]
|
|
14326
14340
|
),
|
|
14327
14341
|
theme: (
|
|
14328
14342
|
/*theme*/
|
|
14329
|
-
ctx[
|
|
14343
|
+
ctx[1]
|
|
14330
14344
|
),
|
|
14331
14345
|
language: (
|
|
14332
14346
|
/*language*/
|
|
14333
|
-
ctx[
|
|
14347
|
+
ctx[2]
|
|
14334
14348
|
)
|
|
14335
14349
|
}
|
|
14336
14350
|
});
|
|
@@ -14345,17 +14359,17 @@ function create_if_block_14(ctx) {
|
|
|
14345
14359
|
p(ctx2, dirty) {
|
|
14346
14360
|
const zoomcontrol_changes = {};
|
|
14347
14361
|
if (dirty & /*app*/
|
|
14348
|
-
|
|
14362
|
+
1)
|
|
14349
14363
|
zoomcontrol_changes.app = /*app*/
|
|
14350
|
-
ctx2[
|
|
14364
|
+
ctx2[0];
|
|
14351
14365
|
if (dirty & /*theme*/
|
|
14352
|
-
|
|
14366
|
+
2)
|
|
14353
14367
|
zoomcontrol_changes.theme = /*theme*/
|
|
14354
|
-
ctx2[
|
|
14368
|
+
ctx2[1];
|
|
14355
14369
|
if (dirty & /*language*/
|
|
14356
|
-
|
|
14370
|
+
4)
|
|
14357
14371
|
zoomcontrol_changes.language = /*language*/
|
|
14358
|
-
ctx2[
|
|
14372
|
+
ctx2[2];
|
|
14359
14373
|
zoomcontrol.$set(zoomcontrol_changes);
|
|
14360
14374
|
},
|
|
14361
14375
|
i(local) {
|
|
@@ -14380,15 +14394,15 @@ function create_if_block18(ctx) {
|
|
|
14380
14394
|
props: {
|
|
14381
14395
|
app: (
|
|
14382
14396
|
/*app*/
|
|
14383
|
-
ctx[
|
|
14397
|
+
ctx[0]
|
|
14384
14398
|
),
|
|
14385
14399
|
theme: (
|
|
14386
14400
|
/*theme*/
|
|
14387
|
-
ctx[
|
|
14401
|
+
ctx[1]
|
|
14388
14402
|
),
|
|
14389
14403
|
language: (
|
|
14390
14404
|
/*language*/
|
|
14391
|
-
ctx[
|
|
14405
|
+
ctx[2]
|
|
14392
14406
|
)
|
|
14393
14407
|
}
|
|
14394
14408
|
});
|
|
@@ -14403,17 +14417,17 @@ function create_if_block18(ctx) {
|
|
|
14403
14417
|
p(ctx2, dirty) {
|
|
14404
14418
|
const pagecontrol_changes = {};
|
|
14405
14419
|
if (dirty & /*app*/
|
|
14406
|
-
|
|
14420
|
+
1)
|
|
14407
14421
|
pagecontrol_changes.app = /*app*/
|
|
14408
|
-
ctx2[
|
|
14422
|
+
ctx2[0];
|
|
14409
14423
|
if (dirty & /*theme*/
|
|
14410
|
-
|
|
14424
|
+
2)
|
|
14411
14425
|
pagecontrol_changes.theme = /*theme*/
|
|
14412
|
-
ctx2[
|
|
14426
|
+
ctx2[1];
|
|
14413
14427
|
if (dirty & /*language*/
|
|
14414
|
-
|
|
14428
|
+
4)
|
|
14415
14429
|
pagecontrol_changes.language = /*language*/
|
|
14416
|
-
ctx2[
|
|
14430
|
+
ctx2[2];
|
|
14417
14431
|
pagecontrol.$set(pagecontrol_changes);
|
|
14418
14432
|
},
|
|
14419
14433
|
i(local) {
|
|
@@ -14448,19 +14462,19 @@ function create_fragment71(ctx) {
|
|
|
14448
14462
|
let dispose;
|
|
14449
14463
|
let if_block0 = (
|
|
14450
14464
|
/*config*/
|
|
14451
|
-
((_a = ctx[
|
|
14465
|
+
((_a = ctx[3].toolbar) == null ? void 0 : _a.enable) !== false && create_if_block_32(ctx)
|
|
14452
14466
|
);
|
|
14453
14467
|
let if_block1 = (
|
|
14454
14468
|
/*config*/
|
|
14455
|
-
((_b = ctx[
|
|
14469
|
+
((_b = ctx[3].redo_undo) == null ? void 0 : _b.enable) !== false && create_if_block_23(ctx)
|
|
14456
14470
|
);
|
|
14457
14471
|
let if_block2 = (
|
|
14458
14472
|
/*config*/
|
|
14459
|
-
((_c = ctx[
|
|
14473
|
+
((_c = ctx[3].zoom_control) == null ? void 0 : _c.enable) !== false && create_if_block_14(ctx)
|
|
14460
14474
|
);
|
|
14461
14475
|
let if_block3 = (
|
|
14462
14476
|
/*config*/
|
|
14463
|
-
((_d = ctx[
|
|
14477
|
+
((_d = ctx[3].page_control) == null ? void 0 : _d.enable) !== false && create_if_block18(ctx)
|
|
14464
14478
|
);
|
|
14465
14479
|
return {
|
|
14466
14480
|
c() {
|
|
@@ -14484,7 +14498,7 @@ function create_fragment71(ctx) {
|
|
|
14484
14498
|
if_block3.c();
|
|
14485
14499
|
attr(div0, "class", name9 + "-view");
|
|
14486
14500
|
attr(div1, "class", div1_class_value = name9 + "-" + /*config*/
|
|
14487
|
-
(((_a2 = ctx[
|
|
14501
|
+
(((_a2 = ctx[3].toolbar) == null ? void 0 : _a2.placement) || "left"));
|
|
14488
14502
|
toggle_class(div1, "hidden", !/*toolbar_has_items*/
|
|
14489
14503
|
ctx[6] || !/*layout*/
|
|
14490
14504
|
(ctx[5] === "visible" || /*layout*/
|
|
@@ -14505,12 +14519,12 @@ function create_fragment71(ctx) {
|
|
|
14505
14519
|
);
|
|
14506
14520
|
attr(div4, "class", name9 + "-root");
|
|
14507
14521
|
toggle_class(div4, "loading", !/*app*/
|
|
14508
|
-
ctx[
|
|
14522
|
+
ctx[0]);
|
|
14509
14523
|
},
|
|
14510
14524
|
m(target, anchor) {
|
|
14511
14525
|
insert(target, div4, anchor);
|
|
14512
14526
|
append(div4, div0);
|
|
14513
|
-
ctx[
|
|
14527
|
+
ctx[16](div0);
|
|
14514
14528
|
append(div4, t0);
|
|
14515
14529
|
append(div4, div1);
|
|
14516
14530
|
if (if_block0)
|
|
@@ -14542,12 +14556,12 @@ function create_fragment71(ctx) {
|
|
|
14542
14556
|
var _a2, _b2, _c2, _d2, _e;
|
|
14543
14557
|
if (
|
|
14544
14558
|
/*config*/
|
|
14545
|
-
((_a2 = ctx2[
|
|
14559
|
+
((_a2 = ctx2[3].toolbar) == null ? void 0 : _a2.enable) !== false
|
|
14546
14560
|
) {
|
|
14547
14561
|
if (if_block0) {
|
|
14548
14562
|
if_block0.p(ctx2, dirty);
|
|
14549
14563
|
if (dirty & /*config*/
|
|
14550
|
-
|
|
14564
|
+
8) {
|
|
14551
14565
|
transition_in(if_block0, 1);
|
|
14552
14566
|
}
|
|
14553
14567
|
} else {
|
|
@@ -14564,12 +14578,12 @@ function create_fragment71(ctx) {
|
|
|
14564
14578
|
check_outros();
|
|
14565
14579
|
}
|
|
14566
14580
|
if (!current || dirty & /*config*/
|
|
14567
|
-
|
|
14568
|
-
(((_b2 = ctx2[
|
|
14581
|
+
8 && div1_class_value !== (div1_class_value = name9 + "-" + /*config*/
|
|
14582
|
+
(((_b2 = ctx2[3].toolbar) == null ? void 0 : _b2.placement) || "left"))) {
|
|
14569
14583
|
attr(div1, "class", div1_class_value);
|
|
14570
14584
|
}
|
|
14571
14585
|
if (!current || dirty & /*config, toolbar_has_items, layout*/
|
|
14572
|
-
|
|
14586
|
+
104) {
|
|
14573
14587
|
toggle_class(div1, "hidden", !/*toolbar_has_items*/
|
|
14574
14588
|
ctx2[6] || !/*layout*/
|
|
14575
14589
|
(ctx2[5] === "visible" || /*layout*/
|
|
@@ -14577,12 +14591,12 @@ function create_fragment71(ctx) {
|
|
|
14577
14591
|
}
|
|
14578
14592
|
if (
|
|
14579
14593
|
/*config*/
|
|
14580
|
-
((_c2 = ctx2[
|
|
14594
|
+
((_c2 = ctx2[3].redo_undo) == null ? void 0 : _c2.enable) !== false
|
|
14581
14595
|
) {
|
|
14582
14596
|
if (if_block1) {
|
|
14583
14597
|
if_block1.p(ctx2, dirty);
|
|
14584
14598
|
if (dirty & /*config*/
|
|
14585
|
-
|
|
14599
|
+
8) {
|
|
14586
14600
|
transition_in(if_block1, 1);
|
|
14587
14601
|
}
|
|
14588
14602
|
} else {
|
|
@@ -14600,12 +14614,12 @@ function create_fragment71(ctx) {
|
|
|
14600
14614
|
}
|
|
14601
14615
|
if (
|
|
14602
14616
|
/*config*/
|
|
14603
|
-
((_d2 = ctx2[
|
|
14617
|
+
((_d2 = ctx2[3].zoom_control) == null ? void 0 : _d2.enable) !== false
|
|
14604
14618
|
) {
|
|
14605
14619
|
if (if_block2) {
|
|
14606
14620
|
if_block2.p(ctx2, dirty);
|
|
14607
14621
|
if (dirty & /*config*/
|
|
14608
|
-
|
|
14622
|
+
8) {
|
|
14609
14623
|
transition_in(if_block2, 1);
|
|
14610
14624
|
}
|
|
14611
14625
|
} else {
|
|
@@ -14632,12 +14646,12 @@ function create_fragment71(ctx) {
|
|
|
14632
14646
|
}
|
|
14633
14647
|
if (
|
|
14634
14648
|
/*config*/
|
|
14635
|
-
((_e = ctx2[
|
|
14649
|
+
((_e = ctx2[3].page_control) == null ? void 0 : _e.enable) !== false
|
|
14636
14650
|
) {
|
|
14637
14651
|
if (if_block3) {
|
|
14638
14652
|
if_block3.p(ctx2, dirty);
|
|
14639
14653
|
if (dirty & /*config*/
|
|
14640
|
-
|
|
14654
|
+
8) {
|
|
14641
14655
|
transition_in(if_block3, 1);
|
|
14642
14656
|
}
|
|
14643
14657
|
} else {
|
|
@@ -14663,9 +14677,9 @@ function create_fragment71(ctx) {
|
|
|
14663
14677
|
);
|
|
14664
14678
|
}
|
|
14665
14679
|
if (!current || dirty & /*app*/
|
|
14666
|
-
|
|
14680
|
+
1) {
|
|
14667
14681
|
toggle_class(div4, "loading", !/*app*/
|
|
14668
|
-
ctx2[
|
|
14682
|
+
ctx2[0]);
|
|
14669
14683
|
}
|
|
14670
14684
|
},
|
|
14671
14685
|
i(local) {
|
|
@@ -14687,7 +14701,7 @@ function create_fragment71(ctx) {
|
|
|
14687
14701
|
d(detaching) {
|
|
14688
14702
|
if (detaching)
|
|
14689
14703
|
detach(div4);
|
|
14690
|
-
ctx[
|
|
14704
|
+
ctx[16](null);
|
|
14691
14705
|
if (if_block0)
|
|
14692
14706
|
if_block0.d();
|
|
14693
14707
|
if (if_block1)
|
|
@@ -14703,15 +14717,13 @@ function create_fragment71(ctx) {
|
|
|
14703
14717
|
}
|
|
14704
14718
|
var name9 = "fastboard";
|
|
14705
14719
|
function instance71($$self, $$props, $$invalidate) {
|
|
14706
|
-
let manager;
|
|
14707
|
-
let room;
|
|
14708
14720
|
let writable2;
|
|
14709
14721
|
let boxState;
|
|
14710
14722
|
let focusedApp;
|
|
14711
14723
|
let toolbar_has_items;
|
|
14712
|
-
let $focusedApp, $$unsubscribe_focusedApp = noop, $$subscribe_focusedApp = () => ($$unsubscribe_focusedApp(), $$unsubscribe_focusedApp = subscribe(focusedApp, ($$value) => $$invalidate(
|
|
14713
|
-
let $boxState, $$unsubscribe_boxState = noop, $$subscribe_boxState = () => ($$unsubscribe_boxState(), $$unsubscribe_boxState = subscribe(boxState, ($$value) => $$invalidate(
|
|
14714
|
-
let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(
|
|
14724
|
+
let $focusedApp, $$unsubscribe_focusedApp = noop, $$subscribe_focusedApp = () => ($$unsubscribe_focusedApp(), $$unsubscribe_focusedApp = subscribe(focusedApp, ($$value) => $$invalidate(13, $focusedApp = $$value)), focusedApp);
|
|
14725
|
+
let $boxState, $$unsubscribe_boxState = noop, $$subscribe_boxState = () => ($$unsubscribe_boxState(), $$unsubscribe_boxState = subscribe(boxState, ($$value) => $$invalidate(14, $boxState = $$value)), boxState);
|
|
14726
|
+
let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(15, $writable = $$value)), writable2);
|
|
14715
14727
|
$$self.$$.on_destroy.push(() => $$unsubscribe_focusedApp());
|
|
14716
14728
|
$$self.$$.on_destroy.push(() => $$unsubscribe_boxState());
|
|
14717
14729
|
$$self.$$.on_destroy.push(() => $$unsubscribe_writable());
|
|
@@ -14720,7 +14732,6 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
14720
14732
|
let { language = "en" } = $$props;
|
|
14721
14733
|
let { containerRef = void 0 } = $$props;
|
|
14722
14734
|
let { config = {} } = $$props;
|
|
14723
|
-
let { colors: colors2 = void 0 } = $$props;
|
|
14724
14735
|
const AppsShowToolbar = ["DocsViewer", "Slide"];
|
|
14725
14736
|
let container;
|
|
14726
14737
|
let layout = "hidden";
|
|
@@ -14747,58 +14758,31 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
14747
14758
|
}
|
|
14748
14759
|
$$self.$$set = ($$props2) => {
|
|
14749
14760
|
if ("app" in $$props2)
|
|
14750
|
-
$$invalidate(
|
|
14761
|
+
$$invalidate(0, app = $$props2.app);
|
|
14751
14762
|
if ("theme" in $$props2)
|
|
14752
|
-
$$invalidate(
|
|
14763
|
+
$$invalidate(1, theme = $$props2.theme);
|
|
14753
14764
|
if ("language" in $$props2)
|
|
14754
|
-
$$invalidate(
|
|
14765
|
+
$$invalidate(2, language = $$props2.language);
|
|
14755
14766
|
if ("containerRef" in $$props2)
|
|
14756
|
-
$$invalidate(
|
|
14767
|
+
$$invalidate(11, containerRef = $$props2.containerRef);
|
|
14757
14768
|
if ("config" in $$props2)
|
|
14758
|
-
$$invalidate(
|
|
14759
|
-
if ("colors" in $$props2)
|
|
14760
|
-
$$invalidate(11, colors2 = $$props2.colors);
|
|
14769
|
+
$$invalidate(3, config = $$props2.config);
|
|
14761
14770
|
};
|
|
14762
14771
|
$$self.$$.update = () => {
|
|
14763
14772
|
if ($$self.$$.dirty & /*app*/
|
|
14764
|
-
|
|
14765
|
-
$$invalidate(15, manager = app == null ? void 0 : app.manager);
|
|
14766
|
-
}
|
|
14767
|
-
if ($$self.$$.dirty & /*app*/
|
|
14768
|
-
2) {
|
|
14769
|
-
$$invalidate(14, room = app == null ? void 0 : app.manager.room);
|
|
14770
|
-
}
|
|
14771
|
-
if ($$self.$$.dirty & /*manager, room, config, colors*/
|
|
14772
|
-
51201) {
|
|
14773
|
-
if (manager && room) {
|
|
14774
|
-
const floatBarOptions = room.floatBarOptions;
|
|
14775
|
-
if (floatBarOptions.colors) {
|
|
14776
|
-
$$invalidate(11, colors2 = floatBarOptions.colors);
|
|
14777
|
-
}
|
|
14778
|
-
if (config == null ? void 0 : config.toolbar) {
|
|
14779
|
-
const _colors = config.toolbar.colors;
|
|
14780
|
-
if (!_colors && colors2) {
|
|
14781
|
-
$$invalidate(0, config = __spreadProps(__spreadValues({}, config), {
|
|
14782
|
-
toolbar: __spreadProps(__spreadValues({}, config.toolbar), { colors: colors2 })
|
|
14783
|
-
}));
|
|
14784
|
-
}
|
|
14785
|
-
}
|
|
14786
|
-
}
|
|
14787
|
-
}
|
|
14788
|
-
if ($$self.$$.dirty & /*app*/
|
|
14789
|
-
2) {
|
|
14773
|
+
1) {
|
|
14790
14774
|
$$subscribe_writable($$invalidate(9, writable2 = app == null ? void 0 : app.writable));
|
|
14791
14775
|
}
|
|
14792
14776
|
if ($$self.$$.dirty & /*app*/
|
|
14793
|
-
|
|
14777
|
+
1) {
|
|
14794
14778
|
$$subscribe_boxState($$invalidate(8, boxState = app == null ? void 0 : app.boxState));
|
|
14795
14779
|
}
|
|
14796
14780
|
if ($$self.$$.dirty & /*app*/
|
|
14797
|
-
|
|
14781
|
+
1) {
|
|
14798
14782
|
$$subscribe_focusedApp($$invalidate(7, focusedApp = app == null ? void 0 : app.focusedApp));
|
|
14799
14783
|
}
|
|
14800
14784
|
if ($$self.$$.dirty & /*$writable, $boxState, $focusedApp*/
|
|
14801
|
-
|
|
14785
|
+
57344) {
|
|
14802
14786
|
if (!$writable) {
|
|
14803
14787
|
$$invalidate(5, layout = "hidden");
|
|
14804
14788
|
} else if ($boxState === "maximized") {
|
|
@@ -14812,15 +14796,15 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
14812
14796
|
}
|
|
14813
14797
|
}
|
|
14814
14798
|
if ($$self.$$.dirty & /*config*/
|
|
14815
|
-
|
|
14799
|
+
8) {
|
|
14816
14800
|
$$invalidate(6, toolbar_has_items = !config.toolbar || !config.toolbar.items || !config.toolbar.apps || config.toolbar.items.length > 0 || config.toolbar.apps.enable !== false);
|
|
14817
14801
|
}
|
|
14818
14802
|
if ($$self.$$.dirty & /*app, container*/
|
|
14819
|
-
|
|
14803
|
+
17) {
|
|
14820
14804
|
try {
|
|
14821
14805
|
if (app && container) {
|
|
14822
14806
|
app.bindContainer(container);
|
|
14823
|
-
$$invalidate(
|
|
14807
|
+
$$invalidate(12, mounted = true);
|
|
14824
14808
|
}
|
|
14825
14809
|
} catch (err) {
|
|
14826
14810
|
console.error("[fastboard] An error occurred while binding container");
|
|
@@ -14828,17 +14812,17 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
14828
14812
|
}
|
|
14829
14813
|
}
|
|
14830
14814
|
if ($$self.$$.dirty & /*app, theme, mounted*/
|
|
14831
|
-
|
|
14815
|
+
4099) {
|
|
14832
14816
|
if (app && theme && mounted) {
|
|
14833
14817
|
app.manager.setPrefersColorScheme(theme);
|
|
14834
14818
|
}
|
|
14835
14819
|
}
|
|
14836
14820
|
};
|
|
14837
14821
|
return [
|
|
14838
|
-
config,
|
|
14839
14822
|
app,
|
|
14840
14823
|
theme,
|
|
14841
14824
|
language,
|
|
14825
|
+
config,
|
|
14842
14826
|
container,
|
|
14843
14827
|
layout,
|
|
14844
14828
|
toolbar_has_items,
|
|
@@ -14846,11 +14830,8 @@ function instance71($$self, $$props, $$invalidate) {
|
|
|
14846
14830
|
boxState,
|
|
14847
14831
|
writable2,
|
|
14848
14832
|
focus_me,
|
|
14849
|
-
colors2,
|
|
14850
14833
|
containerRef,
|
|
14851
14834
|
mounted,
|
|
14852
|
-
room,
|
|
14853
|
-
manager,
|
|
14854
14835
|
$focusedApp,
|
|
14855
14836
|
$boxState,
|
|
14856
14837
|
$writable,
|
|
@@ -14861,12 +14842,11 @@ var Fastboard = class extends SvelteComponent {
|
|
|
14861
14842
|
constructor(options) {
|
|
14862
14843
|
super();
|
|
14863
14844
|
init(this, options, instance71, create_fragment71, not_equal, {
|
|
14864
|
-
app:
|
|
14865
|
-
theme:
|
|
14866
|
-
language:
|
|
14867
|
-
containerRef:
|
|
14868
|
-
config:
|
|
14869
|
-
colors: 11
|
|
14845
|
+
app: 0,
|
|
14846
|
+
theme: 1,
|
|
14847
|
+
language: 2,
|
|
14848
|
+
containerRef: 11,
|
|
14849
|
+
config: 3
|
|
14870
14850
|
});
|
|
14871
14851
|
}
|
|
14872
14852
|
};
|
|
@@ -14888,15 +14868,11 @@ function createUI(app, div) {
|
|
|
14888
14868
|
if (fastboard) {
|
|
14889
14869
|
fastboard.$destroy();
|
|
14890
14870
|
}
|
|
14891
|
-
if (
|
|
14892
|
-
|
|
14893
|
-
|
|
14894
|
-
props.config = __spreadProps(__spreadValues({}, props.config), {
|
|
14895
|
-
toolbar: __spreadProps(__spreadValues({}, props.config.toolbar), {
|
|
14896
|
-
colors: colors2
|
|
14897
|
-
})
|
|
14898
|
-
});
|
|
14871
|
+
if (colors2 && (props == null ? void 0 : props.config) && !((_a = props.config.toolbar) == null ? void 0 : _a.colors)) {
|
|
14872
|
+
if (!(props == null ? void 0 : props.config.toolbar)) {
|
|
14873
|
+
props.config.toolbar = {};
|
|
14899
14874
|
}
|
|
14875
|
+
props.config.toolbar.colors = colors2;
|
|
14900
14876
|
}
|
|
14901
14877
|
fastboard = new Fastboard_default({ target: div2, props: __spreadValues({ app }, props) });
|
|
14902
14878
|
return ui;
|
|
@@ -14904,15 +14880,11 @@ function createUI(app, div) {
|
|
|
14904
14880
|
update(props) {
|
|
14905
14881
|
var _a;
|
|
14906
14882
|
if (fastboard && props) {
|
|
14907
|
-
if (
|
|
14908
|
-
|
|
14909
|
-
|
|
14910
|
-
props.config = __spreadProps(__spreadValues({}, props.config), {
|
|
14911
|
-
toolbar: __spreadProps(__spreadValues({}, props.config.toolbar), {
|
|
14912
|
-
colors: colors2
|
|
14913
|
-
})
|
|
14914
|
-
});
|
|
14883
|
+
if (colors2 && (props == null ? void 0 : props.config) && !((_a = props.config.toolbar) == null ? void 0 : _a.colors)) {
|
|
14884
|
+
if (!(props == null ? void 0 : props.config.toolbar)) {
|
|
14885
|
+
props.config.toolbar = {};
|
|
14915
14886
|
}
|
|
14887
|
+
props.config.toolbar.colors = colors2;
|
|
14916
14888
|
}
|
|
14917
14889
|
fastboard.$set(props);
|
|
14918
14890
|
}
|