@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 CHANGED
@@ -5434,10 +5434,7 @@ function create_fragment50(ctx) {
5434
5434
  }
5435
5435
  var i18n = {
5436
5436
  en: { redo: "Redo", undo: "Undo" },
5437
- "zh-CN": {
5438
- redo: "\u91CD\u505A",
5439
- undo: "\u64A4\u9500"
5440
- }
5437
+ "zh-CN": { redo: "\u91CD\u505A", undo: "\u64A4\u9500" }
5441
5438
  };
5442
5439
  var name = "fastboard-redo-undo";
5443
5440
  function instance50($$self, $$props, $$invalidate) {
@@ -6130,11 +6127,7 @@ var i18n2 = {
6130
6127
  next: "Next Page",
6131
6128
  add: "Add Page"
6132
6129
  },
6133
- "zh-CN": {
6134
- prev: "\u4E0A\u4E00\u9875",
6135
- next: "\u4E0B\u4E00\u9875",
6136
- add: "\u6DFB\u52A0\u9875\u9762"
6137
- }
6130
+ "zh-CN": { prev: "\u4E0A\u4E00\u9875", next: "\u4E0B\u4E00\u9875", add: "\u6DFB\u52A0\u9875\u9762" }
6138
6131
  };
6139
6132
  var name2 = "fastboard-page-control";
6140
6133
  function instance51($$self, $$props, $$invalidate) {
@@ -6823,11 +6816,7 @@ var i18n3 = {
6823
6816
  minus: "Zoom Out",
6824
6817
  reset: "Reset"
6825
6818
  },
6826
- "zh-CN": {
6827
- plus: "\u653E\u5927",
6828
- minus: "\u7F29\u5C0F",
6829
- reset: "\u91CD\u7F6E"
6830
- }
6819
+ "zh-CN": { plus: "\u653E\u5927", minus: "\u7F29\u5C0F", reset: "\u91CD\u7F6E" }
6831
6820
  };
6832
6821
  var scales = [
6833
6822
  0.3,
@@ -13217,15 +13206,15 @@ function create_fragment68(ctx) {
13217
13206
  props: {
13218
13207
  app: (
13219
13208
  /*app*/
13220
- ctx[0]
13209
+ ctx[1]
13221
13210
  ),
13222
13211
  theme: (
13223
13212
  /*theme*/
13224
- ctx[1]
13213
+ ctx[2]
13225
13214
  ),
13226
13215
  language: (
13227
13216
  /*language*/
13228
- ctx[2]
13217
+ ctx[3]
13229
13218
  ),
13230
13219
  disabled: (
13231
13220
  /*disabled*/
@@ -13257,14 +13246,14 @@ function create_fragment68(ctx) {
13257
13246
  ),
13258
13247
  colors: (
13259
13248
  /*colors*/
13260
- ctx[4]
13249
+ ctx[0]
13261
13250
  )
13262
13251
  }
13263
13252
  });
13264
13253
  function select_block_type(ctx2, dirty) {
13265
13254
  if (
13266
13255
  /*collapsed*/
13267
- ctx2[3]
13256
+ ctx2[4]
13268
13257
  )
13269
13258
  return create_if_block15;
13270
13259
  return create_else_block14;
@@ -13285,7 +13274,7 @@ function create_fragment68(ctx) {
13285
13274
  path1 = svg_element("path");
13286
13275
  if_block.c();
13287
13276
  attr(div0, "class", div0_class_value = name6 + "-contents " + /*theme*/
13288
- ctx[1]);
13277
+ ctx[2]);
13289
13278
  set_style(
13290
13279
  div0,
13291
13280
  "height",
@@ -13307,14 +13296,14 @@ function create_fragment68(ctx) {
13307
13296
  attr(svg, "stroke-width", "2");
13308
13297
  attr(svg, "viewBox", "0 0 32 120");
13309
13298
  attr(label, "class", label_class_value = name6 + "-handler " + /*theme*/
13310
- ctx[1]);
13299
+ ctx[2]);
13311
13300
  attr(div1, "class", div1_class_value = name6 + " " + /*theme*/
13312
- ctx[1]);
13301
+ ctx[2]);
13313
13302
  toggle_class(
13314
13303
  div1,
13315
13304
  "collapsed",
13316
13305
  /*collapsed*/
13317
- ctx[3]
13306
+ ctx[4]
13318
13307
  );
13319
13308
  },
13320
13309
  m(target, anchor) {
@@ -13325,7 +13314,7 @@ function create_fragment68(ctx) {
13325
13314
  append(div1, label);
13326
13315
  append(label, input);
13327
13316
  input.checked = /*collapsed*/
13328
- ctx[3];
13317
+ ctx[4];
13329
13318
  append(label, t1);
13330
13319
  append(label, svg);
13331
13320
  append(svg, path0);
@@ -13353,17 +13342,17 @@ function create_fragment68(ctx) {
13353
13342
  p(ctx2, [dirty]) {
13354
13343
  const contents_changes = {};
13355
13344
  if (dirty & /*app*/
13356
- 1)
13345
+ 2)
13357
13346
  contents_changes.app = /*app*/
13358
- ctx2[0];
13347
+ ctx2[1];
13359
13348
  if (dirty & /*theme*/
13360
- 2)
13349
+ 4)
13361
13350
  contents_changes.theme = /*theme*/
13362
- ctx2[1];
13351
+ ctx2[2];
13363
13352
  if (dirty & /*language*/
13364
- 4)
13353
+ 8)
13365
13354
  contents_changes.language = /*language*/
13366
- ctx2[2];
13355
+ ctx2[3];
13367
13356
  if (dirty & /*disabled*/
13368
13357
  1024)
13369
13358
  contents_changes.disabled = /*disabled*/
@@ -13389,13 +13378,13 @@ function create_fragment68(ctx) {
13389
13378
  contents_changes.hide_apps = /*hide_apps*/
13390
13379
  ctx2[5];
13391
13380
  if (dirty & /*colors*/
13392
- 16)
13381
+ 1)
13393
13382
  contents_changes.colors = /*colors*/
13394
- ctx2[4];
13383
+ ctx2[0];
13395
13384
  contents.$set(contents_changes);
13396
13385
  if (!current || dirty & /*theme*/
13397
- 2 && div0_class_value !== (div0_class_value = name6 + "-contents " + /*theme*/
13398
- ctx2[1])) {
13386
+ 4 && div0_class_value !== (div0_class_value = name6 + "-contents " + /*theme*/
13387
+ ctx2[2])) {
13399
13388
  attr(div0, "class", div0_class_value);
13400
13389
  }
13401
13390
  if (dirty & /*scrollable, computed_height*/
@@ -13411,9 +13400,9 @@ function create_fragment68(ctx) {
13411
13400
  );
13412
13401
  }
13413
13402
  if (dirty & /*collapsed*/
13414
- 8) {
13403
+ 16) {
13415
13404
  input.checked = /*collapsed*/
13416
- ctx2[3];
13405
+ ctx2[4];
13417
13406
  }
13418
13407
  if (current_block_type === (current_block_type = select_block_type(ctx2)) && if_block) {
13419
13408
  if_block.p(ctx2, dirty);
@@ -13426,22 +13415,22 @@ function create_fragment68(ctx) {
13426
13415
  }
13427
13416
  }
13428
13417
  if (!current || dirty & /*theme*/
13429
- 2 && label_class_value !== (label_class_value = name6 + "-handler " + /*theme*/
13430
- ctx2[1])) {
13418
+ 4 && label_class_value !== (label_class_value = name6 + "-handler " + /*theme*/
13419
+ ctx2[2])) {
13431
13420
  attr(label, "class", label_class_value);
13432
13421
  }
13433
13422
  if (!current || dirty & /*theme*/
13434
- 2 && div1_class_value !== (div1_class_value = name6 + " " + /*theme*/
13435
- ctx2[1])) {
13423
+ 4 && div1_class_value !== (div1_class_value = name6 + " " + /*theme*/
13424
+ ctx2[2])) {
13436
13425
  attr(div1, "class", div1_class_value);
13437
13426
  }
13438
13427
  if (!current || dirty & /*theme, collapsed*/
13439
- 10) {
13428
+ 20) {
13440
13429
  toggle_class(
13441
13430
  div1,
13442
13431
  "collapsed",
13443
13432
  /*collapsed*/
13444
- ctx2[3]
13433
+ ctx2[4]
13445
13434
  );
13446
13435
  }
13447
13436
  },
@@ -13475,7 +13464,6 @@ function instance68($$self, $$props, $$invalidate) {
13475
13464
  let placement;
13476
13465
  let items;
13477
13466
  let hide_apps;
13478
- let colors2;
13479
13467
  let $container_height;
13480
13468
  let $scroll_height;
13481
13469
  let $phase, $$unsubscribe_phase = noop, $$subscribe_phase = () => ($$unsubscribe_phase(), $$unsubscribe_phase = subscribe(phase, ($$value) => $$invalidate(18, $phase = $$value)), phase);
@@ -13486,6 +13474,7 @@ function instance68($$self, $$props, $$invalidate) {
13486
13474
  let { theme = "light" } = $$props;
13487
13475
  let { language = "en" } = $$props;
13488
13476
  let { config = {} } = $$props;
13477
+ let { colors: colors2 = void 0 } = $$props;
13489
13478
  const extra_height = (32 + 4 + 4) * 2;
13490
13479
  let collapsed = config.collapsed;
13491
13480
  let container_height = writable(0);
@@ -13494,26 +13483,28 @@ function instance68($$self, $$props, $$invalidate) {
13494
13483
  component_subscribe($$self, scroll_height, (value) => $$invalidate(17, $scroll_height = value));
13495
13484
  function input_change_handler() {
13496
13485
  collapsed = this.checked;
13497
- $$invalidate(3, collapsed);
13486
+ $$invalidate(4, collapsed);
13498
13487
  }
13499
13488
  $$self.$$set = ($$props2) => {
13500
13489
  if ("app" in $$props2)
13501
- $$invalidate(0, app = $$props2.app);
13490
+ $$invalidate(1, app = $$props2.app);
13502
13491
  if ("theme" in $$props2)
13503
- $$invalidate(1, theme = $$props2.theme);
13492
+ $$invalidate(2, theme = $$props2.theme);
13504
13493
  if ("language" in $$props2)
13505
- $$invalidate(2, language = $$props2.language);
13494
+ $$invalidate(3, language = $$props2.language);
13506
13495
  if ("config" in $$props2)
13507
13496
  $$invalidate(15, config = $$props2.config);
13497
+ if ("colors" in $$props2)
13498
+ $$invalidate(0, colors2 = $$props2.colors);
13508
13499
  };
13509
13500
  $$self.$$.update = () => {
13510
- var _a;
13501
+ var _a, _b;
13511
13502
  if ($$self.$$.dirty & /*app*/
13512
- 1) {
13503
+ 2) {
13513
13504
  $$subscribe_writable($$invalidate(12, writable2 = app == null ? void 0 : app.writable));
13514
13505
  }
13515
13506
  if ($$self.$$.dirty & /*app*/
13516
- 1) {
13507
+ 2) {
13517
13508
  $$subscribe_phase($$invalidate(11, phase = app == null ? void 0 : app.phase));
13518
13509
  }
13519
13510
  if ($$self.$$.dirty & /*$writable, $phase*/
@@ -13540,17 +13531,28 @@ function instance68($$self, $$props, $$invalidate) {
13540
13531
  32768) {
13541
13532
  $$invalidate(5, hide_apps = ((_a = config.apps) == null ? void 0 : _a.enable) === false);
13542
13533
  }
13543
- if ($$self.$$.dirty & /*config*/
13544
- 32768) {
13545
- $$invalidate(4, colors2 = (config == null ? void 0 : config.colors) && config.colors.length && config.colors || default_colors);
13534
+ if ($$self.$$.dirty & /*app, colors, config*/
13535
+ 32771) {
13536
+ if ((app == null ? void 0 : app.manager) && (app == null ? void 0 : app.manager.room)) {
13537
+ if (colors2 && !((_b = config.colors) == null ? void 0 : _b.length)) {
13538
+ const floatBarOptions = app == null ? void 0 : app.manager.room.floatBarOptions;
13539
+ if (floatBarOptions.colors) {
13540
+ $$invalidate(0, colors2 = floatBarOptions.colors);
13541
+ }
13542
+ } else {
13543
+ $$invalidate(0, colors2 = config.colors);
13544
+ }
13545
+ } else {
13546
+ $$invalidate(0, colors2 = default_colors);
13547
+ }
13546
13548
  }
13547
13549
  };
13548
13550
  return [
13551
+ colors2,
13549
13552
  app,
13550
13553
  theme,
13551
13554
  language,
13552
13555
  collapsed,
13553
- colors2,
13554
13556
  hide_apps,
13555
13557
  items,
13556
13558
  placement,
@@ -13573,10 +13575,11 @@ var Toolbar = class extends SvelteComponent {
13573
13575
  constructor(options) {
13574
13576
  super();
13575
13577
  init(this, options, instance68, create_fragment68, safe_not_equal, {
13576
- app: 0,
13577
- theme: 1,
13578
- language: 2,
13579
- config: 15
13578
+ app: 1,
13579
+ theme: 2,
13580
+ language: 3,
13581
+ config: 15,
13582
+ colors: 0
13580
13583
  });
13581
13584
  }
13582
13585
  };
@@ -14524,11 +14527,7 @@ var i18n6 = {
14524
14527
  pause: "Pause",
14525
14528
  speed: "Speed"
14526
14529
  },
14527
- "zh-CN": {
14528
- play: "\u64AD\u653E",
14529
- pause: "\u6682\u505C",
14530
- speed: "\u901F\u5EA6"
14531
- }
14530
+ "zh-CN": { play: "\u64AD\u653E", pause: "\u6682\u505C", speed: "\u901F\u5EA6" }
14532
14531
  };
14533
14532
  function format(ms) {
14534
14533
  const s = Math.floor(ms / 1e3);
@@ -14944,19 +14943,19 @@ function create_if_block_32(ctx) {
14944
14943
  props: {
14945
14944
  app: (
14946
14945
  /*app*/
14947
- ctx[1]
14946
+ ctx[0]
14948
14947
  ),
14949
14948
  theme: (
14950
14949
  /*theme*/
14951
- ctx[2]
14950
+ ctx[1]
14952
14951
  ),
14953
14952
  language: (
14954
14953
  /*language*/
14955
- ctx[3]
14954
+ ctx[2]
14956
14955
  ),
14957
14956
  config: (
14958
14957
  /*config*/
14959
- ctx[0].toolbar || {}
14958
+ ctx[3].toolbar || {}
14960
14959
  )
14961
14960
  }
14962
14961
  });
@@ -14971,21 +14970,21 @@ function create_if_block_32(ctx) {
14971
14970
  p(ctx2, dirty) {
14972
14971
  const toolbar_changes = {};
14973
14972
  if (dirty & /*app*/
14974
- 2)
14973
+ 1)
14975
14974
  toolbar_changes.app = /*app*/
14976
- ctx2[1];
14975
+ ctx2[0];
14977
14976
  if (dirty & /*theme*/
14978
- 4)
14977
+ 2)
14979
14978
  toolbar_changes.theme = /*theme*/
14980
- ctx2[2];
14979
+ ctx2[1];
14981
14980
  if (dirty & /*language*/
14982
- 8)
14981
+ 4)
14983
14982
  toolbar_changes.language = /*language*/
14984
- ctx2[3];
14983
+ ctx2[2];
14985
14984
  if (dirty & /*config*/
14986
- 1)
14985
+ 8)
14987
14986
  toolbar_changes.config = /*config*/
14988
- ctx2[0].toolbar || {};
14987
+ ctx2[3].toolbar || {};
14989
14988
  toolbar.$set(toolbar_changes);
14990
14989
  },
14991
14990
  i(local) {
@@ -15010,15 +15009,15 @@ function create_if_block_23(ctx) {
15010
15009
  props: {
15011
15010
  app: (
15012
15011
  /*app*/
15013
- ctx[1]
15012
+ ctx[0]
15014
15013
  ),
15015
15014
  theme: (
15016
15015
  /*theme*/
15017
- ctx[2]
15016
+ ctx[1]
15018
15017
  ),
15019
15018
  language: (
15020
15019
  /*language*/
15021
- ctx[3]
15020
+ ctx[2]
15022
15021
  )
15023
15022
  }
15024
15023
  });
@@ -15033,17 +15032,17 @@ function create_if_block_23(ctx) {
15033
15032
  p(ctx2, dirty) {
15034
15033
  const redoundo_changes = {};
15035
15034
  if (dirty & /*app*/
15036
- 2)
15035
+ 1)
15037
15036
  redoundo_changes.app = /*app*/
15038
- ctx2[1];
15037
+ ctx2[0];
15039
15038
  if (dirty & /*theme*/
15040
- 4)
15039
+ 2)
15041
15040
  redoundo_changes.theme = /*theme*/
15042
- ctx2[2];
15041
+ ctx2[1];
15043
15042
  if (dirty & /*language*/
15044
- 8)
15043
+ 4)
15045
15044
  redoundo_changes.language = /*language*/
15046
- ctx2[3];
15045
+ ctx2[2];
15047
15046
  redoundo.$set(redoundo_changes);
15048
15047
  },
15049
15048
  i(local) {
@@ -15068,15 +15067,15 @@ function create_if_block_14(ctx) {
15068
15067
  props: {
15069
15068
  app: (
15070
15069
  /*app*/
15071
- ctx[1]
15070
+ ctx[0]
15072
15071
  ),
15073
15072
  theme: (
15074
15073
  /*theme*/
15075
- ctx[2]
15074
+ ctx[1]
15076
15075
  ),
15077
15076
  language: (
15078
15077
  /*language*/
15079
- ctx[3]
15078
+ ctx[2]
15080
15079
  )
15081
15080
  }
15082
15081
  });
@@ -15091,17 +15090,17 @@ function create_if_block_14(ctx) {
15091
15090
  p(ctx2, dirty) {
15092
15091
  const zoomcontrol_changes = {};
15093
15092
  if (dirty & /*app*/
15094
- 2)
15093
+ 1)
15095
15094
  zoomcontrol_changes.app = /*app*/
15096
- ctx2[1];
15095
+ ctx2[0];
15097
15096
  if (dirty & /*theme*/
15098
- 4)
15097
+ 2)
15099
15098
  zoomcontrol_changes.theme = /*theme*/
15100
- ctx2[2];
15099
+ ctx2[1];
15101
15100
  if (dirty & /*language*/
15102
- 8)
15101
+ 4)
15103
15102
  zoomcontrol_changes.language = /*language*/
15104
- ctx2[3];
15103
+ ctx2[2];
15105
15104
  zoomcontrol.$set(zoomcontrol_changes);
15106
15105
  },
15107
15106
  i(local) {
@@ -15126,15 +15125,15 @@ function create_if_block18(ctx) {
15126
15125
  props: {
15127
15126
  app: (
15128
15127
  /*app*/
15129
- ctx[1]
15128
+ ctx[0]
15130
15129
  ),
15131
15130
  theme: (
15132
15131
  /*theme*/
15133
- ctx[2]
15132
+ ctx[1]
15134
15133
  ),
15135
15134
  language: (
15136
15135
  /*language*/
15137
- ctx[3]
15136
+ ctx[2]
15138
15137
  )
15139
15138
  }
15140
15139
  });
@@ -15149,17 +15148,17 @@ function create_if_block18(ctx) {
15149
15148
  p(ctx2, dirty) {
15150
15149
  const pagecontrol_changes = {};
15151
15150
  if (dirty & /*app*/
15152
- 2)
15151
+ 1)
15153
15152
  pagecontrol_changes.app = /*app*/
15154
- ctx2[1];
15153
+ ctx2[0];
15155
15154
  if (dirty & /*theme*/
15156
- 4)
15155
+ 2)
15157
15156
  pagecontrol_changes.theme = /*theme*/
15158
- ctx2[2];
15157
+ ctx2[1];
15159
15158
  if (dirty & /*language*/
15160
- 8)
15159
+ 4)
15161
15160
  pagecontrol_changes.language = /*language*/
15162
- ctx2[3];
15161
+ ctx2[2];
15163
15162
  pagecontrol.$set(pagecontrol_changes);
15164
15163
  },
15165
15164
  i(local) {
@@ -15194,19 +15193,19 @@ function create_fragment71(ctx) {
15194
15193
  let dispose;
15195
15194
  let if_block0 = (
15196
15195
  /*config*/
15197
- ((_a = ctx[0].toolbar) == null ? void 0 : _a.enable) !== false && create_if_block_32(ctx)
15196
+ ((_a = ctx[3].toolbar) == null ? void 0 : _a.enable) !== false && create_if_block_32(ctx)
15198
15197
  );
15199
15198
  let if_block1 = (
15200
15199
  /*config*/
15201
- ((_b = ctx[0].redo_undo) == null ? void 0 : _b.enable) !== false && create_if_block_23(ctx)
15200
+ ((_b = ctx[3].redo_undo) == null ? void 0 : _b.enable) !== false && create_if_block_23(ctx)
15202
15201
  );
15203
15202
  let if_block2 = (
15204
15203
  /*config*/
15205
- ((_c = ctx[0].zoom_control) == null ? void 0 : _c.enable) !== false && create_if_block_14(ctx)
15204
+ ((_c = ctx[3].zoom_control) == null ? void 0 : _c.enable) !== false && create_if_block_14(ctx)
15206
15205
  );
15207
15206
  let if_block3 = (
15208
15207
  /*config*/
15209
- ((_d = ctx[0].page_control) == null ? void 0 : _d.enable) !== false && create_if_block18(ctx)
15208
+ ((_d = ctx[3].page_control) == null ? void 0 : _d.enable) !== false && create_if_block18(ctx)
15210
15209
  );
15211
15210
  return {
15212
15211
  c() {
@@ -15230,7 +15229,7 @@ function create_fragment71(ctx) {
15230
15229
  if_block3.c();
15231
15230
  attr(div0, "class", name9 + "-view");
15232
15231
  attr(div1, "class", div1_class_value = name9 + "-" + /*config*/
15233
- (((_a2 = ctx[0].toolbar) == null ? void 0 : _a2.placement) || "left"));
15232
+ (((_a2 = ctx[3].toolbar) == null ? void 0 : _a2.placement) || "left"));
15234
15233
  toggle_class(div1, "hidden", !/*toolbar_has_items*/
15235
15234
  ctx[6] || !/*layout*/
15236
15235
  (ctx[5] === "visible" || /*layout*/
@@ -15251,12 +15250,12 @@ function create_fragment71(ctx) {
15251
15250
  );
15252
15251
  attr(div4, "class", name9 + "-root");
15253
15252
  toggle_class(div4, "loading", !/*app*/
15254
- ctx[1]);
15253
+ ctx[0]);
15255
15254
  },
15256
15255
  m(target, anchor) {
15257
15256
  insert(target, div4, anchor);
15258
15257
  append(div4, div0);
15259
- ctx[19](div0);
15258
+ ctx[16](div0);
15260
15259
  append(div4, t0);
15261
15260
  append(div4, div1);
15262
15261
  if (if_block0)
@@ -15288,12 +15287,12 @@ function create_fragment71(ctx) {
15288
15287
  var _a2, _b2, _c2, _d2, _e;
15289
15288
  if (
15290
15289
  /*config*/
15291
- ((_a2 = ctx2[0].toolbar) == null ? void 0 : _a2.enable) !== false
15290
+ ((_a2 = ctx2[3].toolbar) == null ? void 0 : _a2.enable) !== false
15292
15291
  ) {
15293
15292
  if (if_block0) {
15294
15293
  if_block0.p(ctx2, dirty);
15295
15294
  if (dirty & /*config*/
15296
- 1) {
15295
+ 8) {
15297
15296
  transition_in(if_block0, 1);
15298
15297
  }
15299
15298
  } else {
@@ -15310,12 +15309,12 @@ function create_fragment71(ctx) {
15310
15309
  check_outros();
15311
15310
  }
15312
15311
  if (!current || dirty & /*config*/
15313
- 1 && div1_class_value !== (div1_class_value = name9 + "-" + /*config*/
15314
- (((_b2 = ctx2[0].toolbar) == null ? void 0 : _b2.placement) || "left"))) {
15312
+ 8 && div1_class_value !== (div1_class_value = name9 + "-" + /*config*/
15313
+ (((_b2 = ctx2[3].toolbar) == null ? void 0 : _b2.placement) || "left"))) {
15315
15314
  attr(div1, "class", div1_class_value);
15316
15315
  }
15317
15316
  if (!current || dirty & /*config, toolbar_has_items, layout*/
15318
- 97) {
15317
+ 104) {
15319
15318
  toggle_class(div1, "hidden", !/*toolbar_has_items*/
15320
15319
  ctx2[6] || !/*layout*/
15321
15320
  (ctx2[5] === "visible" || /*layout*/
@@ -15323,12 +15322,12 @@ function create_fragment71(ctx) {
15323
15322
  }
15324
15323
  if (
15325
15324
  /*config*/
15326
- ((_c2 = ctx2[0].redo_undo) == null ? void 0 : _c2.enable) !== false
15325
+ ((_c2 = ctx2[3].redo_undo) == null ? void 0 : _c2.enable) !== false
15327
15326
  ) {
15328
15327
  if (if_block1) {
15329
15328
  if_block1.p(ctx2, dirty);
15330
15329
  if (dirty & /*config*/
15331
- 1) {
15330
+ 8) {
15332
15331
  transition_in(if_block1, 1);
15333
15332
  }
15334
15333
  } else {
@@ -15346,12 +15345,12 @@ function create_fragment71(ctx) {
15346
15345
  }
15347
15346
  if (
15348
15347
  /*config*/
15349
- ((_d2 = ctx2[0].zoom_control) == null ? void 0 : _d2.enable) !== false
15348
+ ((_d2 = ctx2[3].zoom_control) == null ? void 0 : _d2.enable) !== false
15350
15349
  ) {
15351
15350
  if (if_block2) {
15352
15351
  if_block2.p(ctx2, dirty);
15353
15352
  if (dirty & /*config*/
15354
- 1) {
15353
+ 8) {
15355
15354
  transition_in(if_block2, 1);
15356
15355
  }
15357
15356
  } else {
@@ -15378,12 +15377,12 @@ function create_fragment71(ctx) {
15378
15377
  }
15379
15378
  if (
15380
15379
  /*config*/
15381
- ((_e = ctx2[0].page_control) == null ? void 0 : _e.enable) !== false
15380
+ ((_e = ctx2[3].page_control) == null ? void 0 : _e.enable) !== false
15382
15381
  ) {
15383
15382
  if (if_block3) {
15384
15383
  if_block3.p(ctx2, dirty);
15385
15384
  if (dirty & /*config*/
15386
- 1) {
15385
+ 8) {
15387
15386
  transition_in(if_block3, 1);
15388
15387
  }
15389
15388
  } else {
@@ -15409,9 +15408,9 @@ function create_fragment71(ctx) {
15409
15408
  );
15410
15409
  }
15411
15410
  if (!current || dirty & /*app*/
15412
- 2) {
15411
+ 1) {
15413
15412
  toggle_class(div4, "loading", !/*app*/
15414
- ctx2[1]);
15413
+ ctx2[0]);
15415
15414
  }
15416
15415
  },
15417
15416
  i(local) {
@@ -15433,7 +15432,7 @@ function create_fragment71(ctx) {
15433
15432
  d(detaching) {
15434
15433
  if (detaching)
15435
15434
  detach(div4);
15436
- ctx[19](null);
15435
+ ctx[16](null);
15437
15436
  if (if_block0)
15438
15437
  if_block0.d();
15439
15438
  if (if_block1)
@@ -15449,15 +15448,13 @@ function create_fragment71(ctx) {
15449
15448
  }
15450
15449
  var name9 = "fastboard";
15451
15450
  function instance71($$self, $$props, $$invalidate) {
15452
- let manager;
15453
- let room;
15454
15451
  let writable2;
15455
15452
  let boxState;
15456
15453
  let focusedApp;
15457
15454
  let toolbar_has_items;
15458
- let $focusedApp, $$unsubscribe_focusedApp = noop, $$subscribe_focusedApp = () => ($$unsubscribe_focusedApp(), $$unsubscribe_focusedApp = subscribe(focusedApp, ($$value) => $$invalidate(16, $focusedApp = $$value)), focusedApp);
15459
- let $boxState, $$unsubscribe_boxState = noop, $$subscribe_boxState = () => ($$unsubscribe_boxState(), $$unsubscribe_boxState = subscribe(boxState, ($$value) => $$invalidate(17, $boxState = $$value)), boxState);
15460
- let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(18, $writable = $$value)), writable2);
15455
+ let $focusedApp, $$unsubscribe_focusedApp = noop, $$subscribe_focusedApp = () => ($$unsubscribe_focusedApp(), $$unsubscribe_focusedApp = subscribe(focusedApp, ($$value) => $$invalidate(13, $focusedApp = $$value)), focusedApp);
15456
+ let $boxState, $$unsubscribe_boxState = noop, $$subscribe_boxState = () => ($$unsubscribe_boxState(), $$unsubscribe_boxState = subscribe(boxState, ($$value) => $$invalidate(14, $boxState = $$value)), boxState);
15457
+ let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(15, $writable = $$value)), writable2);
15461
15458
  $$self.$$.on_destroy.push(() => $$unsubscribe_focusedApp());
15462
15459
  $$self.$$.on_destroy.push(() => $$unsubscribe_boxState());
15463
15460
  $$self.$$.on_destroy.push(() => $$unsubscribe_writable());
@@ -15466,7 +15463,6 @@ function instance71($$self, $$props, $$invalidate) {
15466
15463
  let { language = "en" } = $$props;
15467
15464
  let { containerRef = void 0 } = $$props;
15468
15465
  let { config = {} } = $$props;
15469
- let { colors: colors2 = void 0 } = $$props;
15470
15466
  const AppsShowToolbar = ["DocsViewer", "Slide"];
15471
15467
  let container;
15472
15468
  let layout = "hidden";
@@ -15493,58 +15489,31 @@ function instance71($$self, $$props, $$invalidate) {
15493
15489
  }
15494
15490
  $$self.$$set = ($$props2) => {
15495
15491
  if ("app" in $$props2)
15496
- $$invalidate(1, app = $$props2.app);
15492
+ $$invalidate(0, app = $$props2.app);
15497
15493
  if ("theme" in $$props2)
15498
- $$invalidate(2, theme = $$props2.theme);
15494
+ $$invalidate(1, theme = $$props2.theme);
15499
15495
  if ("language" in $$props2)
15500
- $$invalidate(3, language = $$props2.language);
15496
+ $$invalidate(2, language = $$props2.language);
15501
15497
  if ("containerRef" in $$props2)
15502
- $$invalidate(12, containerRef = $$props2.containerRef);
15498
+ $$invalidate(11, containerRef = $$props2.containerRef);
15503
15499
  if ("config" in $$props2)
15504
- $$invalidate(0, config = $$props2.config);
15505
- if ("colors" in $$props2)
15506
- $$invalidate(11, colors2 = $$props2.colors);
15500
+ $$invalidate(3, config = $$props2.config);
15507
15501
  };
15508
15502
  $$self.$$.update = () => {
15509
15503
  if ($$self.$$.dirty & /*app*/
15510
- 2) {
15511
- $$invalidate(15, manager = app == null ? void 0 : app.manager);
15512
- }
15513
- if ($$self.$$.dirty & /*app*/
15514
- 2) {
15515
- $$invalidate(14, room = app == null ? void 0 : app.manager.room);
15516
- }
15517
- if ($$self.$$.dirty & /*manager, room, config, colors*/
15518
- 51201) {
15519
- if (manager && room) {
15520
- const floatBarOptions = room.floatBarOptions;
15521
- if (floatBarOptions.colors) {
15522
- $$invalidate(11, colors2 = floatBarOptions.colors);
15523
- }
15524
- if (config == null ? void 0 : config.toolbar) {
15525
- const _colors = config.toolbar.colors;
15526
- if (!_colors && colors2) {
15527
- $$invalidate(0, config = __spreadProps(__spreadValues({}, config), {
15528
- toolbar: __spreadProps(__spreadValues({}, config.toolbar), { colors: colors2 })
15529
- }));
15530
- }
15531
- }
15532
- }
15533
- }
15534
- if ($$self.$$.dirty & /*app*/
15535
- 2) {
15504
+ 1) {
15536
15505
  $$subscribe_writable($$invalidate(9, writable2 = app == null ? void 0 : app.writable));
15537
15506
  }
15538
15507
  if ($$self.$$.dirty & /*app*/
15539
- 2) {
15508
+ 1) {
15540
15509
  $$subscribe_boxState($$invalidate(8, boxState = app == null ? void 0 : app.boxState));
15541
15510
  }
15542
15511
  if ($$self.$$.dirty & /*app*/
15543
- 2) {
15512
+ 1) {
15544
15513
  $$subscribe_focusedApp($$invalidate(7, focusedApp = app == null ? void 0 : app.focusedApp));
15545
15514
  }
15546
15515
  if ($$self.$$.dirty & /*$writable, $boxState, $focusedApp*/
15547
- 458752) {
15516
+ 57344) {
15548
15517
  if (!$writable) {
15549
15518
  $$invalidate(5, layout = "hidden");
15550
15519
  } else if ($boxState === "maximized") {
@@ -15558,15 +15527,15 @@ function instance71($$self, $$props, $$invalidate) {
15558
15527
  }
15559
15528
  }
15560
15529
  if ($$self.$$.dirty & /*config*/
15561
- 1) {
15530
+ 8) {
15562
15531
  $$invalidate(6, toolbar_has_items = !config.toolbar || !config.toolbar.items || !config.toolbar.apps || config.toolbar.items.length > 0 || config.toolbar.apps.enable !== false);
15563
15532
  }
15564
15533
  if ($$self.$$.dirty & /*app, container*/
15565
- 18) {
15534
+ 17) {
15566
15535
  try {
15567
15536
  if (app && container) {
15568
15537
  app.bindContainer(container);
15569
- $$invalidate(13, mounted = true);
15538
+ $$invalidate(12, mounted = true);
15570
15539
  }
15571
15540
  } catch (err) {
15572
15541
  console.error("[fastboard] An error occurred while binding container");
@@ -15574,17 +15543,17 @@ function instance71($$self, $$props, $$invalidate) {
15574
15543
  }
15575
15544
  }
15576
15545
  if ($$self.$$.dirty & /*app, theme, mounted*/
15577
- 8198) {
15546
+ 4099) {
15578
15547
  if (app && theme && mounted) {
15579
15548
  app.manager.setPrefersColorScheme(theme);
15580
15549
  }
15581
15550
  }
15582
15551
  };
15583
15552
  return [
15584
- config,
15585
15553
  app,
15586
15554
  theme,
15587
15555
  language,
15556
+ config,
15588
15557
  container,
15589
15558
  layout,
15590
15559
  toolbar_has_items,
@@ -15592,11 +15561,8 @@ function instance71($$self, $$props, $$invalidate) {
15592
15561
  boxState,
15593
15562
  writable2,
15594
15563
  focus_me,
15595
- colors2,
15596
15564
  containerRef,
15597
15565
  mounted,
15598
- room,
15599
- manager,
15600
15566
  $focusedApp,
15601
15567
  $boxState,
15602
15568
  $writable,
@@ -15607,12 +15573,11 @@ var Fastboard = class extends SvelteComponent {
15607
15573
  constructor(options) {
15608
15574
  super();
15609
15575
  init(this, options, instance71, create_fragment71, not_equal, {
15610
- app: 1,
15611
- theme: 2,
15612
- language: 3,
15613
- containerRef: 12,
15614
- config: 0,
15615
- colors: 11
15576
+ app: 0,
15577
+ theme: 1,
15578
+ language: 2,
15579
+ containerRef: 11,
15580
+ config: 3
15616
15581
  });
15617
15582
  }
15618
15583
  };
@@ -15634,15 +15599,11 @@ function createUI(app, div) {
15634
15599
  if (fastboard) {
15635
15600
  fastboard.$destroy();
15636
15601
  }
15637
- if ((_a = props == null ? void 0 : props.config) == null ? void 0 : _a.toolbar) {
15638
- const _colors = props.config.toolbar.colors;
15639
- if (!_colors && colors2) {
15640
- props.config = __spreadProps(__spreadValues({}, props.config), {
15641
- toolbar: __spreadProps(__spreadValues({}, props.config.toolbar), {
15642
- colors: colors2
15643
- })
15644
- });
15602
+ if (colors2 && (props == null ? void 0 : props.config) && !((_a = props.config.toolbar) == null ? void 0 : _a.colors)) {
15603
+ if (!(props == null ? void 0 : props.config.toolbar)) {
15604
+ props.config.toolbar = {};
15645
15605
  }
15606
+ props.config.toolbar.colors = colors2;
15646
15607
  }
15647
15608
  fastboard = new Fastboard_default({ target: div2, props: __spreadValues({ app }, props) });
15648
15609
  return ui;
@@ -15650,15 +15611,11 @@ function createUI(app, div) {
15650
15611
  update(props) {
15651
15612
  var _a;
15652
15613
  if (fastboard && props) {
15653
- if ((_a = props == null ? void 0 : props.config) == null ? void 0 : _a.toolbar) {
15654
- const _colors = props.config.toolbar.colors;
15655
- if (!_colors && colors2) {
15656
- props.config = __spreadProps(__spreadValues({}, props.config), {
15657
- toolbar: __spreadProps(__spreadValues({}, props.config.toolbar), {
15658
- colors: colors2
15659
- })
15660
- });
15614
+ if (colors2 && (props == null ? void 0 : props.config) && !((_a = props.config.toolbar) == null ? void 0 : _a.colors)) {
15615
+ if (!(props == null ? void 0 : props.config.toolbar)) {
15616
+ props.config.toolbar = {};
15661
15617
  }
15618
+ props.config.toolbar.colors = colors2;
15662
15619
  }
15663
15620
  fastboard.$set(props);
15664
15621
  }