@netless/fastboard-ui 1.0.5-beta.1 → 1.0.6-beta.1
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/full.d.ts +32 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +215 -54
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +215 -54
- package/dist/index.mjs.map +1 -1
- package/dist/index.svelte.mjs +215 -54
- package/dist/index.svelte.mjs.map +1 -1
- package/dist/lite.d.ts +32 -0
- package/package.json +3 -3
- package/src/components/Fastboard/Fastboard.svelte +61 -6
- package/src/components/Fastboard/Fastboard.svelte.d.ts +8 -0
- package/src/components/Icons/index.ts +1 -1
- package/src/helpers/index.ts +84 -1
package/dist/full.d.ts
CHANGED
|
@@ -121,6 +121,14 @@ declare interface FastboardProps {
|
|
|
121
121
|
*/
|
|
122
122
|
containerRef?: (container: HTMLDivElement | null) => void;
|
|
123
123
|
config?: FastboardUIConfig;
|
|
124
|
+
/** Whether to forcibly display the toolbar */
|
|
125
|
+
force_show_toolbar?: boolean;
|
|
126
|
+
/** Whether to force the display of the redo undo button */
|
|
127
|
+
force_show_redo_undo?: boolean;
|
|
128
|
+
/** Whether to force the display of the zoom control button */
|
|
129
|
+
force_show_zoom_control?: boolean;
|
|
130
|
+
/** Whether to forcibly display the page control button */
|
|
131
|
+
force_show_page_control?: boolean;
|
|
124
132
|
}
|
|
125
133
|
|
|
126
134
|
declare class Fastboard extends SvelteComponentTyped<FastboardProps> {}
|
|
@@ -132,6 +140,30 @@ interface UI {
|
|
|
132
140
|
update(props?: FastboardProps): void;
|
|
133
141
|
/** remove UI */
|
|
134
142
|
destroy(): void;
|
|
143
|
+
/** force show toolbar */
|
|
144
|
+
forceShowToolbar(): void;
|
|
145
|
+
/** force hide toolbar */
|
|
146
|
+
forceHideToolbar(): void;
|
|
147
|
+
/** recover show toolbar */
|
|
148
|
+
recoverToolbar(): void;
|
|
149
|
+
/** force show redo undo */
|
|
150
|
+
forceShowRedoUndo(): void;
|
|
151
|
+
/** force hide redo undo */
|
|
152
|
+
forceHideRedoUndo(): void;
|
|
153
|
+
/** recover show redo undo */
|
|
154
|
+
recoverRedoUndo(): void;
|
|
155
|
+
/** force show zoom control */
|
|
156
|
+
forceShowZoomControl(): void;
|
|
157
|
+
/** force hide zoom control */
|
|
158
|
+
forceHideZoomControl(): void;
|
|
159
|
+
/** recover show zoom control */
|
|
160
|
+
recoverZoomControl(): void;
|
|
161
|
+
/** force show page control */
|
|
162
|
+
forceShowPageControl(): void;
|
|
163
|
+
/** force hide page control */
|
|
164
|
+
forceHidePageControl(): void;
|
|
165
|
+
/** recover show page control */
|
|
166
|
+
recoverPageControl(): void;
|
|
135
167
|
}
|
|
136
168
|
/**
|
|
137
169
|
* @example
|
package/dist/index.d.ts
CHANGED
|
@@ -121,6 +121,14 @@ declare interface FastboardProps {
|
|
|
121
121
|
*/
|
|
122
122
|
containerRef?: (container: HTMLDivElement | null) => void;
|
|
123
123
|
config?: FastboardUIConfig;
|
|
124
|
+
/** Whether to forcibly display the toolbar */
|
|
125
|
+
force_show_toolbar?: boolean;
|
|
126
|
+
/** Whether to force the display of the redo undo button */
|
|
127
|
+
force_show_redo_undo?: boolean;
|
|
128
|
+
/** Whether to force the display of the zoom control button */
|
|
129
|
+
force_show_zoom_control?: boolean;
|
|
130
|
+
/** Whether to forcibly display the page control button */
|
|
131
|
+
force_show_page_control?: boolean;
|
|
124
132
|
}
|
|
125
133
|
|
|
126
134
|
declare class Fastboard extends SvelteComponentTyped<FastboardProps> {}
|
|
@@ -132,6 +140,30 @@ interface UI {
|
|
|
132
140
|
update(props?: FastboardProps): void;
|
|
133
141
|
/** remove UI */
|
|
134
142
|
destroy(): void;
|
|
143
|
+
/** force show toolbar */
|
|
144
|
+
forceShowToolbar(): void;
|
|
145
|
+
/** force hide toolbar */
|
|
146
|
+
forceHideToolbar(): void;
|
|
147
|
+
/** recover show toolbar */
|
|
148
|
+
recoverToolbar(): void;
|
|
149
|
+
/** force show redo undo */
|
|
150
|
+
forceShowRedoUndo(): void;
|
|
151
|
+
/** force hide redo undo */
|
|
152
|
+
forceHideRedoUndo(): void;
|
|
153
|
+
/** recover show redo undo */
|
|
154
|
+
recoverRedoUndo(): void;
|
|
155
|
+
/** force show zoom control */
|
|
156
|
+
forceShowZoomControl(): void;
|
|
157
|
+
/** force hide zoom control */
|
|
158
|
+
forceHideZoomControl(): void;
|
|
159
|
+
/** recover show zoom control */
|
|
160
|
+
recoverZoomControl(): void;
|
|
161
|
+
/** force show page control */
|
|
162
|
+
forceShowPageControl(): void;
|
|
163
|
+
/** force hide page control */
|
|
164
|
+
forceHidePageControl(): void;
|
|
165
|
+
/** recover show page control */
|
|
166
|
+
recoverPageControl(): void;
|
|
135
167
|
}
|
|
136
168
|
/**
|
|
137
169
|
* @example
|
package/dist/index.js
CHANGED
|
@@ -18034,11 +18034,13 @@ function create_fragment78(ctx) {
|
|
|
18034
18034
|
);
|
|
18035
18035
|
let if_block1 = (
|
|
18036
18036
|
/*config*/
|
|
18037
|
-
((_b = ctx[3].redo_undo) == null ? void 0 : _b.enable) !== false &&
|
|
18037
|
+
((_b = ctx[3].redo_undo) == null ? void 0 : _b.enable) !== false && !/*hidden_redo_undo*/
|
|
18038
|
+
ctx[6] && create_if_block_26(ctx)
|
|
18038
18039
|
);
|
|
18039
18040
|
let if_block2 = (
|
|
18040
18041
|
/*config*/
|
|
18041
|
-
((_c = ctx[3].zoom_control) == null ? void 0 : _c.enable) !== false &&
|
|
18042
|
+
((_c = ctx[3].zoom_control) == null ? void 0 : _c.enable) !== false && !/*hidden_zoom_control*/
|
|
18043
|
+
ctx[7] && create_if_block_112(ctx)
|
|
18042
18044
|
);
|
|
18043
18045
|
let if_block3 = (
|
|
18044
18046
|
/*config*/
|
|
@@ -18067,23 +18069,26 @@ function create_fragment78(ctx) {
|
|
|
18067
18069
|
attr(div0, "class", name9 + "-view");
|
|
18068
18070
|
attr(div1, "class", div1_class_value = name9 + "-" + /*config*/
|
|
18069
18071
|
(((_a2 = ctx[3].toolbar) == null ? void 0 : _a2.placement) || "left"));
|
|
18070
|
-
toggle_class(
|
|
18071
|
-
|
|
18072
|
-
|
|
18073
|
-
|
|
18072
|
+
toggle_class(
|
|
18073
|
+
div1,
|
|
18074
|
+
"hidden",
|
|
18075
|
+
/*hidden_toolbar*/
|
|
18076
|
+
ctx[5]
|
|
18077
|
+
);
|
|
18074
18078
|
attr(div2, "class", name9 + "-bottom-left");
|
|
18075
18079
|
toggle_class(
|
|
18076
18080
|
div2,
|
|
18077
18081
|
"hidden",
|
|
18078
|
-
/*
|
|
18079
|
-
ctx[5]
|
|
18082
|
+
/*hidden_toolbar*/
|
|
18083
|
+
ctx[5] && /*hidden_redo_undo*/
|
|
18084
|
+
ctx[6]
|
|
18080
18085
|
);
|
|
18081
18086
|
attr(div3, "class", name9 + "-bottom-right");
|
|
18082
18087
|
toggle_class(
|
|
18083
18088
|
div3,
|
|
18084
18089
|
"hidden",
|
|
18085
|
-
/*
|
|
18086
|
-
ctx[
|
|
18090
|
+
/*hidden_page_control*/
|
|
18091
|
+
ctx[8]
|
|
18087
18092
|
);
|
|
18088
18093
|
attr(div4, "class", name9 + "-root");
|
|
18089
18094
|
toggle_class(div4, "loading", !/*app*/
|
|
@@ -18092,7 +18097,7 @@ function create_fragment78(ctx) {
|
|
|
18092
18097
|
m(target, anchor) {
|
|
18093
18098
|
insert(target, div4, anchor);
|
|
18094
18099
|
append(div4, div0);
|
|
18095
|
-
ctx[
|
|
18100
|
+
ctx[26](div0);
|
|
18096
18101
|
append(div4, t0);
|
|
18097
18102
|
append(div4, div1);
|
|
18098
18103
|
if (if_block0)
|
|
@@ -18114,7 +18119,7 @@ function create_fragment78(ctx) {
|
|
|
18114
18119
|
div0,
|
|
18115
18120
|
"touchstart",
|
|
18116
18121
|
/*focus_me*/
|
|
18117
|
-
ctx[
|
|
18122
|
+
ctx[13],
|
|
18118
18123
|
{ passive: true, capture: true }
|
|
18119
18124
|
);
|
|
18120
18125
|
mounted = true;
|
|
@@ -18150,21 +18155,24 @@ function create_fragment78(ctx) {
|
|
|
18150
18155
|
(((_b2 = ctx2[3].toolbar) == null ? void 0 : _b2.placement) || "left"))) {
|
|
18151
18156
|
attr(div1, "class", div1_class_value);
|
|
18152
18157
|
}
|
|
18153
|
-
if (!current || dirty & /*config,
|
|
18154
|
-
|
|
18155
|
-
toggle_class(
|
|
18156
|
-
|
|
18157
|
-
|
|
18158
|
-
|
|
18158
|
+
if (!current || dirty & /*config, hidden_toolbar*/
|
|
18159
|
+
40) {
|
|
18160
|
+
toggle_class(
|
|
18161
|
+
div1,
|
|
18162
|
+
"hidden",
|
|
18163
|
+
/*hidden_toolbar*/
|
|
18164
|
+
ctx2[5]
|
|
18165
|
+
);
|
|
18159
18166
|
}
|
|
18160
18167
|
if (
|
|
18161
18168
|
/*config*/
|
|
18162
|
-
((_c2 = ctx2[3].redo_undo) == null ? void 0 : _c2.enable) !== false
|
|
18169
|
+
((_c2 = ctx2[3].redo_undo) == null ? void 0 : _c2.enable) !== false && !/*hidden_redo_undo*/
|
|
18170
|
+
ctx2[6]
|
|
18163
18171
|
) {
|
|
18164
18172
|
if (if_block1) {
|
|
18165
18173
|
if_block1.p(ctx2, dirty);
|
|
18166
|
-
if (dirty & /*config*/
|
|
18167
|
-
|
|
18174
|
+
if (dirty & /*config, hidden_redo_undo*/
|
|
18175
|
+
72) {
|
|
18168
18176
|
transition_in(if_block1, 1);
|
|
18169
18177
|
}
|
|
18170
18178
|
} else {
|
|
@@ -18182,12 +18190,13 @@ function create_fragment78(ctx) {
|
|
|
18182
18190
|
}
|
|
18183
18191
|
if (
|
|
18184
18192
|
/*config*/
|
|
18185
|
-
((_d2 = ctx2[3].zoom_control) == null ? void 0 : _d2.enable) !== false
|
|
18193
|
+
((_d2 = ctx2[3].zoom_control) == null ? void 0 : _d2.enable) !== false && !/*hidden_zoom_control*/
|
|
18194
|
+
ctx2[7]
|
|
18186
18195
|
) {
|
|
18187
18196
|
if (if_block2) {
|
|
18188
18197
|
if_block2.p(ctx2, dirty);
|
|
18189
|
-
if (dirty & /*config*/
|
|
18190
|
-
|
|
18198
|
+
if (dirty & /*config, hidden_zoom_control*/
|
|
18199
|
+
136) {
|
|
18191
18200
|
transition_in(if_block2, 1);
|
|
18192
18201
|
}
|
|
18193
18202
|
} else {
|
|
@@ -18203,13 +18212,14 @@ function create_fragment78(ctx) {
|
|
|
18203
18212
|
});
|
|
18204
18213
|
check_outros();
|
|
18205
18214
|
}
|
|
18206
|
-
if (!current || dirty & /*
|
|
18207
|
-
|
|
18215
|
+
if (!current || dirty & /*hidden_toolbar, hidden_redo_undo*/
|
|
18216
|
+
96) {
|
|
18208
18217
|
toggle_class(
|
|
18209
18218
|
div2,
|
|
18210
18219
|
"hidden",
|
|
18211
|
-
/*
|
|
18212
|
-
ctx2[5]
|
|
18220
|
+
/*hidden_toolbar*/
|
|
18221
|
+
ctx2[5] && /*hidden_redo_undo*/
|
|
18222
|
+
ctx2[6]
|
|
18213
18223
|
);
|
|
18214
18224
|
}
|
|
18215
18225
|
if (
|
|
@@ -18235,13 +18245,13 @@ function create_fragment78(ctx) {
|
|
|
18235
18245
|
});
|
|
18236
18246
|
check_outros();
|
|
18237
18247
|
}
|
|
18238
|
-
if (!current || dirty & /*
|
|
18239
|
-
|
|
18248
|
+
if (!current || dirty & /*hidden_page_control*/
|
|
18249
|
+
256) {
|
|
18240
18250
|
toggle_class(
|
|
18241
18251
|
div3,
|
|
18242
18252
|
"hidden",
|
|
18243
|
-
/*
|
|
18244
|
-
ctx2[
|
|
18253
|
+
/*hidden_page_control*/
|
|
18254
|
+
ctx2[8]
|
|
18245
18255
|
);
|
|
18246
18256
|
}
|
|
18247
18257
|
if (!current || dirty & /*app*/
|
|
@@ -18269,7 +18279,7 @@ function create_fragment78(ctx) {
|
|
|
18269
18279
|
d(detaching) {
|
|
18270
18280
|
if (detaching)
|
|
18271
18281
|
detach(div4);
|
|
18272
|
-
ctx[
|
|
18282
|
+
ctx[26](null);
|
|
18273
18283
|
if (if_block0)
|
|
18274
18284
|
if_block0.d();
|
|
18275
18285
|
if (if_block1)
|
|
@@ -18288,22 +18298,33 @@ function instance78($$self, $$props, $$invalidate) {
|
|
|
18288
18298
|
let writable2;
|
|
18289
18299
|
let boxState;
|
|
18290
18300
|
let focusedApp;
|
|
18301
|
+
let visibleApps;
|
|
18291
18302
|
let toolbar_has_items;
|
|
18292
|
-
let $focusedApp, $$unsubscribe_focusedApp = noop, $$subscribe_focusedApp = () => ($$unsubscribe_focusedApp(), $$unsubscribe_focusedApp = subscribe(focusedApp, ($$value) => $$invalidate(
|
|
18293
|
-
let $boxState, $$unsubscribe_boxState = noop, $$subscribe_boxState = () => ($$unsubscribe_boxState(), $$unsubscribe_boxState = subscribe(boxState, ($$value) => $$invalidate(
|
|
18294
|
-
let $
|
|
18303
|
+
let $focusedApp, $$unsubscribe_focusedApp = noop, $$subscribe_focusedApp = () => ($$unsubscribe_focusedApp(), $$unsubscribe_focusedApp = subscribe(focusedApp, ($$value) => $$invalidate(22, $focusedApp = $$value)), focusedApp);
|
|
18304
|
+
let $boxState, $$unsubscribe_boxState = noop, $$subscribe_boxState = () => ($$unsubscribe_boxState(), $$unsubscribe_boxState = subscribe(boxState, ($$value) => $$invalidate(23, $boxState = $$value)), boxState);
|
|
18305
|
+
let $visibleApps, $$unsubscribe_visibleApps = noop, $$subscribe_visibleApps = () => ($$unsubscribe_visibleApps(), $$unsubscribe_visibleApps = subscribe(visibleApps, ($$value) => $$invalidate(24, $visibleApps = $$value)), visibleApps);
|
|
18306
|
+
let $writable, $$unsubscribe_writable = noop, $$subscribe_writable = () => ($$unsubscribe_writable(), $$unsubscribe_writable = subscribe(writable2, ($$value) => $$invalidate(25, $writable = $$value)), writable2);
|
|
18295
18307
|
$$self.$$.on_destroy.push(() => $$unsubscribe_focusedApp());
|
|
18296
18308
|
$$self.$$.on_destroy.push(() => $$unsubscribe_boxState());
|
|
18309
|
+
$$self.$$.on_destroy.push(() => $$unsubscribe_visibleApps());
|
|
18297
18310
|
$$self.$$.on_destroy.push(() => $$unsubscribe_writable());
|
|
18298
18311
|
let { app = null } = $$props;
|
|
18299
18312
|
let { theme = "light" } = $$props;
|
|
18300
18313
|
let { language = "en" } = $$props;
|
|
18301
18314
|
let { containerRef = void 0 } = $$props;
|
|
18302
18315
|
let { config = {} } = $$props;
|
|
18303
|
-
|
|
18316
|
+
let { force_show_toolbar = void 0 } = $$props;
|
|
18317
|
+
let { force_show_redo_undo = void 0 } = $$props;
|
|
18318
|
+
let { force_show_zoom_control = void 0 } = $$props;
|
|
18319
|
+
let { force_show_page_control = void 0 } = $$props;
|
|
18320
|
+
const AppsShowToolbar = ["DocsViewer", "Slide", "PDFjs"];
|
|
18304
18321
|
let container;
|
|
18305
18322
|
let layout = "hidden";
|
|
18306
18323
|
let mounted = false;
|
|
18324
|
+
let hidden_toolbar = false;
|
|
18325
|
+
let hidden_redo_undo = false;
|
|
18326
|
+
let hidden_zoom_control = false;
|
|
18327
|
+
let hidden_page_control = false;
|
|
18307
18328
|
onMount(() => {
|
|
18308
18329
|
if (containerRef) {
|
|
18309
18330
|
containerRef(container);
|
|
@@ -18332,47 +18353,73 @@ function instance78($$self, $$props, $$invalidate) {
|
|
|
18332
18353
|
if ("language" in $$props2)
|
|
18333
18354
|
$$invalidate(2, language = $$props2.language);
|
|
18334
18355
|
if ("containerRef" in $$props2)
|
|
18335
|
-
$$invalidate(
|
|
18356
|
+
$$invalidate(14, containerRef = $$props2.containerRef);
|
|
18336
18357
|
if ("config" in $$props2)
|
|
18337
18358
|
$$invalidate(3, config = $$props2.config);
|
|
18359
|
+
if ("force_show_toolbar" in $$props2)
|
|
18360
|
+
$$invalidate(15, force_show_toolbar = $$props2.force_show_toolbar);
|
|
18361
|
+
if ("force_show_redo_undo" in $$props2)
|
|
18362
|
+
$$invalidate(16, force_show_redo_undo = $$props2.force_show_redo_undo);
|
|
18363
|
+
if ("force_show_zoom_control" in $$props2)
|
|
18364
|
+
$$invalidate(17, force_show_zoom_control = $$props2.force_show_zoom_control);
|
|
18365
|
+
if ("force_show_page_control" in $$props2)
|
|
18366
|
+
$$invalidate(18, force_show_page_control = $$props2.force_show_page_control);
|
|
18338
18367
|
};
|
|
18339
18368
|
$$self.$$.update = () => {
|
|
18340
18369
|
if ($$self.$$.dirty & /*app*/
|
|
18341
18370
|
1) {
|
|
18342
|
-
$$subscribe_writable($$invalidate(
|
|
18371
|
+
$$subscribe_writable($$invalidate(12, writable2 = app == null ? void 0 : app.writable));
|
|
18372
|
+
}
|
|
18373
|
+
if ($$self.$$.dirty & /*app*/
|
|
18374
|
+
1) {
|
|
18375
|
+
$$subscribe_boxState($$invalidate(11, boxState = app == null ? void 0 : app.boxState));
|
|
18343
18376
|
}
|
|
18344
18377
|
if ($$self.$$.dirty & /*app*/
|
|
18345
18378
|
1) {
|
|
18346
|
-
$$
|
|
18379
|
+
$$subscribe_focusedApp($$invalidate(10, focusedApp = app == null ? void 0 : app.focusedApp));
|
|
18347
18380
|
}
|
|
18348
18381
|
if ($$self.$$.dirty & /*app*/
|
|
18349
18382
|
1) {
|
|
18350
|
-
$$
|
|
18383
|
+
$$subscribe_visibleApps($$invalidate(9, visibleApps = app == null ? void 0 : app.visibleApps));
|
|
18351
18384
|
}
|
|
18352
|
-
if ($$self.$$.dirty & /*$writable, $boxState, $focusedApp*/
|
|
18353
|
-
|
|
18385
|
+
if ($$self.$$.dirty & /*$writable, app, $visibleApps, $boxState, $focusedApp*/
|
|
18386
|
+
62914561) {
|
|
18354
18387
|
if (!$writable) {
|
|
18355
|
-
$$invalidate(
|
|
18388
|
+
$$invalidate(19, layout = "hidden");
|
|
18389
|
+
} else if (app == null ? void 0 : app.appInMainViewPlugin) {
|
|
18390
|
+
if ($visibleApps && $visibleApps.size > 0) {
|
|
18391
|
+
if ($boxState === "maximized") {
|
|
18392
|
+
if (AppsShowToolbar.some((kind) => ($focusedApp || "").includes(kind))) {
|
|
18393
|
+
$$invalidate(19, layout = "toolbar-only");
|
|
18394
|
+
} else {
|
|
18395
|
+
$$invalidate(19, layout = "hidden");
|
|
18396
|
+
}
|
|
18397
|
+
} else {
|
|
18398
|
+
$$invalidate(19, layout = "visible");
|
|
18399
|
+
}
|
|
18400
|
+
} else {
|
|
18401
|
+
$$invalidate(19, layout = "visible");
|
|
18402
|
+
}
|
|
18356
18403
|
} else if ($boxState === "maximized") {
|
|
18357
18404
|
if ($focusedApp && AppsShowToolbar.some((kind) => ($focusedApp || "").includes(kind))) {
|
|
18358
|
-
$$invalidate(
|
|
18405
|
+
$$invalidate(19, layout = "toolbar-only");
|
|
18359
18406
|
} else {
|
|
18360
|
-
$$invalidate(
|
|
18407
|
+
$$invalidate(19, layout = "hidden");
|
|
18361
18408
|
}
|
|
18362
18409
|
} else {
|
|
18363
|
-
$$invalidate(
|
|
18410
|
+
$$invalidate(19, layout = "visible");
|
|
18364
18411
|
}
|
|
18365
18412
|
}
|
|
18366
18413
|
if ($$self.$$.dirty & /*config*/
|
|
18367
18414
|
8) {
|
|
18368
|
-
$$invalidate(
|
|
18415
|
+
$$invalidate(21, toolbar_has_items = !config.toolbar || !config.toolbar.items || !config.toolbar.apps || config.toolbar.items.length > 0 || config.toolbar.apps.enable !== false);
|
|
18369
18416
|
}
|
|
18370
18417
|
if ($$self.$$.dirty & /*app, container*/
|
|
18371
18418
|
17) {
|
|
18372
18419
|
try {
|
|
18373
18420
|
if (app && container) {
|
|
18374
18421
|
app.bindContainer(container);
|
|
18375
|
-
$$invalidate(
|
|
18422
|
+
$$invalidate(20, mounted = true);
|
|
18376
18423
|
}
|
|
18377
18424
|
} catch (err) {
|
|
18378
18425
|
console.error("[fastboard] An error occurred while binding container");
|
|
@@ -18380,11 +18427,51 @@ function instance78($$self, $$props, $$invalidate) {
|
|
|
18380
18427
|
}
|
|
18381
18428
|
}
|
|
18382
18429
|
if ($$self.$$.dirty & /*app, theme, mounted*/
|
|
18383
|
-
|
|
18430
|
+
1048579) {
|
|
18384
18431
|
if (app && theme && mounted) {
|
|
18385
18432
|
app.manager.setPrefersColorScheme(theme);
|
|
18386
18433
|
}
|
|
18387
18434
|
}
|
|
18435
|
+
if ($$self.$$.dirty & /*force_show_toolbar, toolbar_has_items, layout*/
|
|
18436
|
+
2654208) {
|
|
18437
|
+
if (force_show_toolbar === false) {
|
|
18438
|
+
$$invalidate(5, hidden_toolbar = true);
|
|
18439
|
+
} else if (force_show_toolbar === true) {
|
|
18440
|
+
$$invalidate(5, hidden_toolbar = false);
|
|
18441
|
+
} else {
|
|
18442
|
+
$$invalidate(5, hidden_toolbar = !toolbar_has_items || !(layout === "visible" || layout === "toolbar-only"));
|
|
18443
|
+
}
|
|
18444
|
+
}
|
|
18445
|
+
if ($$self.$$.dirty & /*force_show_redo_undo, layout*/
|
|
18446
|
+
589824) {
|
|
18447
|
+
if (force_show_redo_undo === false) {
|
|
18448
|
+
$$invalidate(6, hidden_redo_undo = true);
|
|
18449
|
+
} else if (force_show_redo_undo === true) {
|
|
18450
|
+
$$invalidate(6, hidden_redo_undo = false);
|
|
18451
|
+
} else {
|
|
18452
|
+
$$invalidate(6, hidden_redo_undo = layout !== "visible");
|
|
18453
|
+
}
|
|
18454
|
+
}
|
|
18455
|
+
if ($$self.$$.dirty & /*force_show_zoom_control, layout*/
|
|
18456
|
+
655360) {
|
|
18457
|
+
if (force_show_zoom_control === false) {
|
|
18458
|
+
$$invalidate(7, hidden_zoom_control = true);
|
|
18459
|
+
} else if (force_show_zoom_control === true) {
|
|
18460
|
+
$$invalidate(7, hidden_zoom_control = false);
|
|
18461
|
+
} else {
|
|
18462
|
+
$$invalidate(7, hidden_zoom_control = layout !== "visible");
|
|
18463
|
+
}
|
|
18464
|
+
}
|
|
18465
|
+
if ($$self.$$.dirty & /*force_show_page_control, layout*/
|
|
18466
|
+
786432) {
|
|
18467
|
+
if (force_show_page_control === false) {
|
|
18468
|
+
$$invalidate(8, hidden_page_control = true);
|
|
18469
|
+
} else if (force_show_page_control === true) {
|
|
18470
|
+
$$invalidate(8, hidden_page_control = false);
|
|
18471
|
+
} else {
|
|
18472
|
+
$$invalidate(8, hidden_page_control = layout !== "visible");
|
|
18473
|
+
}
|
|
18474
|
+
}
|
|
18388
18475
|
};
|
|
18389
18476
|
return [
|
|
18390
18477
|
app,
|
|
@@ -18392,16 +18479,26 @@ function instance78($$self, $$props, $$invalidate) {
|
|
|
18392
18479
|
language,
|
|
18393
18480
|
config,
|
|
18394
18481
|
container,
|
|
18395
|
-
|
|
18396
|
-
|
|
18482
|
+
hidden_toolbar,
|
|
18483
|
+
hidden_redo_undo,
|
|
18484
|
+
hidden_zoom_control,
|
|
18485
|
+
hidden_page_control,
|
|
18486
|
+
visibleApps,
|
|
18397
18487
|
focusedApp,
|
|
18398
18488
|
boxState,
|
|
18399
18489
|
writable2,
|
|
18400
18490
|
focus_me,
|
|
18401
18491
|
containerRef,
|
|
18492
|
+
force_show_toolbar,
|
|
18493
|
+
force_show_redo_undo,
|
|
18494
|
+
force_show_zoom_control,
|
|
18495
|
+
force_show_page_control,
|
|
18496
|
+
layout,
|
|
18402
18497
|
mounted,
|
|
18498
|
+
toolbar_has_items,
|
|
18403
18499
|
$focusedApp,
|
|
18404
18500
|
$boxState,
|
|
18501
|
+
$visibleApps,
|
|
18405
18502
|
$writable,
|
|
18406
18503
|
div0_binding
|
|
18407
18504
|
];
|
|
@@ -18413,8 +18510,12 @@ var Fastboard = class extends SvelteComponent {
|
|
|
18413
18510
|
app: 0,
|
|
18414
18511
|
theme: 1,
|
|
18415
18512
|
language: 2,
|
|
18416
|
-
containerRef:
|
|
18417
|
-
config: 3
|
|
18513
|
+
containerRef: 14,
|
|
18514
|
+
config: 3,
|
|
18515
|
+
force_show_toolbar: 15,
|
|
18516
|
+
force_show_redo_undo: 16,
|
|
18517
|
+
force_show_zoom_control: 17,
|
|
18518
|
+
force_show_page_control: 18
|
|
18418
18519
|
});
|
|
18419
18520
|
}
|
|
18420
18521
|
};
|
|
@@ -18462,6 +18563,66 @@ function createUI(app, div) {
|
|
|
18462
18563
|
fastboard.$destroy();
|
|
18463
18564
|
}
|
|
18464
18565
|
fastboard = void 0;
|
|
18566
|
+
},
|
|
18567
|
+
forceShowToolbar() {
|
|
18568
|
+
if (fastboard) {
|
|
18569
|
+
fastboard.$set({ force_show_toolbar: true });
|
|
18570
|
+
}
|
|
18571
|
+
},
|
|
18572
|
+
forceHideToolbar() {
|
|
18573
|
+
if (fastboard) {
|
|
18574
|
+
fastboard.$set({ force_show_toolbar: false });
|
|
18575
|
+
}
|
|
18576
|
+
},
|
|
18577
|
+
recoverToolbar() {
|
|
18578
|
+
if (fastboard) {
|
|
18579
|
+
fastboard.$set({ force_show_toolbar: void 0 });
|
|
18580
|
+
}
|
|
18581
|
+
},
|
|
18582
|
+
forceShowPageControl() {
|
|
18583
|
+
if (fastboard) {
|
|
18584
|
+
fastboard.$set({ force_show_page_control: true });
|
|
18585
|
+
}
|
|
18586
|
+
},
|
|
18587
|
+
forceHidePageControl() {
|
|
18588
|
+
if (fastboard) {
|
|
18589
|
+
fastboard.$set({ force_show_page_control: false });
|
|
18590
|
+
}
|
|
18591
|
+
},
|
|
18592
|
+
recoverPageControl() {
|
|
18593
|
+
if (fastboard) {
|
|
18594
|
+
fastboard.$set({ force_show_page_control: void 0 });
|
|
18595
|
+
}
|
|
18596
|
+
},
|
|
18597
|
+
forceShowRedoUndo() {
|
|
18598
|
+
if (fastboard) {
|
|
18599
|
+
fastboard.$set({ force_show_redo_undo: true });
|
|
18600
|
+
}
|
|
18601
|
+
},
|
|
18602
|
+
forceHideRedoUndo() {
|
|
18603
|
+
if (fastboard) {
|
|
18604
|
+
fastboard.$set({ force_show_redo_undo: false });
|
|
18605
|
+
}
|
|
18606
|
+
},
|
|
18607
|
+
recoverRedoUndo() {
|
|
18608
|
+
if (fastboard) {
|
|
18609
|
+
fastboard.$set({ force_show_redo_undo: void 0 });
|
|
18610
|
+
}
|
|
18611
|
+
},
|
|
18612
|
+
forceShowZoomControl() {
|
|
18613
|
+
if (fastboard) {
|
|
18614
|
+
fastboard.$set({ force_show_zoom_control: true });
|
|
18615
|
+
}
|
|
18616
|
+
},
|
|
18617
|
+
forceHideZoomControl() {
|
|
18618
|
+
if (fastboard) {
|
|
18619
|
+
fastboard.$set({ force_show_zoom_control: false });
|
|
18620
|
+
}
|
|
18621
|
+
},
|
|
18622
|
+
recoverZoomControl() {
|
|
18623
|
+
if (fastboard) {
|
|
18624
|
+
fastboard.$set({ force_show_zoom_control: void 0 });
|
|
18625
|
+
}
|
|
18465
18626
|
}
|
|
18466
18627
|
};
|
|
18467
18628
|
if (div) {
|