@netless/fastboard-ui 0.3.0-canary.1 → 0.3.0-canary.4
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.d.ts +2 -2
- package/dist/index.js +47 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +47 -14
- package/dist/index.mjs.map +1 -1
- package/dist/index.svelte.mjs +49 -14
- package/dist/index.svelte.mjs.map +1 -1
- package/package.json +3 -3
- package/src/components/Fastboard/Fastboard.svelte +4 -3
- package/src/components/Fastboard/Fastboard.svelte.ts +1 -1
- package/src/components/Fastboard/ReplayFastboard.svelte +4 -3
- package/src/components/Fastboard/ReplayFastboard.svelte.ts +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ declare interface ReplayFastboardProps {
|
|
|
58
58
|
player?: FastboardPlayer | null;
|
|
59
59
|
theme?: Theme;
|
|
60
60
|
language?: Language;
|
|
61
|
-
|
|
61
|
+
containerRef?: (container: HTMLDivElement | null) => void;
|
|
62
62
|
}
|
|
63
63
|
declare class ReplayFastboard extends SvelteComponentTyped<ReplayFastboardProps> {
|
|
64
64
|
}
|
|
@@ -67,7 +67,7 @@ declare interface FastboardProps {
|
|
|
67
67
|
app?: FastboardApp | null;
|
|
68
68
|
theme?: Theme;
|
|
69
69
|
language?: Language;
|
|
70
|
-
|
|
70
|
+
containerRef?: (container: HTMLDivElement | null) => void;
|
|
71
71
|
}
|
|
72
72
|
declare class Fastboard extends SvelteComponentTyped<FastboardProps> {
|
|
73
73
|
}
|
package/dist/index.js
CHANGED
|
@@ -3544,6 +3544,13 @@ var tippy = function(node, props) {
|
|
|
3544
3544
|
}
|
|
3545
3545
|
};
|
|
3546
3546
|
};
|
|
3547
|
+
function tippy_hide_all() {
|
|
3548
|
+
document.querySelectorAll("[data-tippy-root]").forEach((el) => {
|
|
3549
|
+
const instance59 = el._tippy;
|
|
3550
|
+
if (instance59)
|
|
3551
|
+
instance59.hide();
|
|
3552
|
+
});
|
|
3553
|
+
}
|
|
3547
3554
|
var tippy_menu = {
|
|
3548
3555
|
delay: 0,
|
|
3549
3556
|
placement: "right-start",
|
|
@@ -9839,6 +9846,8 @@ function create_fragment57(ctx) {
|
|
|
9839
9846
|
let div1_class_value;
|
|
9840
9847
|
let div2_class_value;
|
|
9841
9848
|
let current;
|
|
9849
|
+
let mounted;
|
|
9850
|
+
let dispose;
|
|
9842
9851
|
playercontrol = new PlayerControl_default({
|
|
9843
9852
|
props: {
|
|
9844
9853
|
player: ctx[0],
|
|
@@ -9866,6 +9875,10 @@ function create_fragment57(ctx) {
|
|
|
9866
9875
|
append(div2, div1);
|
|
9867
9876
|
mount_component(playercontrol, div1, null);
|
|
9868
9877
|
current = true;
|
|
9878
|
+
if (!mounted) {
|
|
9879
|
+
dispose = listen(div0, "touchstart", tippy_hide_all, true);
|
|
9880
|
+
mounted = true;
|
|
9881
|
+
}
|
|
9869
9882
|
},
|
|
9870
9883
|
p(ctx2, [dirty]) {
|
|
9871
9884
|
const playercontrol_changes = {};
|
|
@@ -9895,6 +9908,8 @@ function create_fragment57(ctx) {
|
|
|
9895
9908
|
detach(div2);
|
|
9896
9909
|
ctx[5](null);
|
|
9897
9910
|
destroy_component(playercontrol);
|
|
9911
|
+
mounted = false;
|
|
9912
|
+
dispose();
|
|
9898
9913
|
}
|
|
9899
9914
|
};
|
|
9900
9915
|
}
|
|
@@ -9903,7 +9918,7 @@ function instance57($$self, $$props, $$invalidate) {
|
|
|
9903
9918
|
let { player = null } = $$props;
|
|
9904
9919
|
let { theme = "light" } = $$props;
|
|
9905
9920
|
let { language = "en" } = $$props;
|
|
9906
|
-
let {
|
|
9921
|
+
let { containerRef = void 0 } = $$props;
|
|
9907
9922
|
let container;
|
|
9908
9923
|
function div0_binding($$value) {
|
|
9909
9924
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
@@ -9918,8 +9933,8 @@ function instance57($$self, $$props, $$invalidate) {
|
|
|
9918
9933
|
$$invalidate(1, theme = $$props2.theme);
|
|
9919
9934
|
if ("language" in $$props2)
|
|
9920
9935
|
$$invalidate(2, language = $$props2.language);
|
|
9921
|
-
if ("
|
|
9922
|
-
$$invalidate(4,
|
|
9936
|
+
if ("containerRef" in $$props2)
|
|
9937
|
+
$$invalidate(4, containerRef = $$props2.containerRef);
|
|
9923
9938
|
};
|
|
9924
9939
|
$$self.$$.update = () => {
|
|
9925
9940
|
if ($$self.$$.dirty & 9) {
|
|
@@ -9929,16 +9944,21 @@ function instance57($$self, $$props, $$invalidate) {
|
|
|
9929
9944
|
}
|
|
9930
9945
|
if ($$self.$$.dirty & 24) {
|
|
9931
9946
|
$:
|
|
9932
|
-
if (
|
|
9933
|
-
|
|
9947
|
+
if (containerRef)
|
|
9948
|
+
containerRef(container || null);
|
|
9934
9949
|
}
|
|
9935
9950
|
};
|
|
9936
|
-
return [player, theme, language, container,
|
|
9951
|
+
return [player, theme, language, container, containerRef, div0_binding];
|
|
9937
9952
|
}
|
|
9938
9953
|
var ReplayFastboard = class extends SvelteComponent {
|
|
9939
9954
|
constructor(options) {
|
|
9940
9955
|
super();
|
|
9941
|
-
init(this, options, instance57, create_fragment57, safe_not_equal, {
|
|
9956
|
+
init(this, options, instance57, create_fragment57, safe_not_equal, {
|
|
9957
|
+
player: 0,
|
|
9958
|
+
theme: 1,
|
|
9959
|
+
language: 2,
|
|
9960
|
+
containerRef: 4
|
|
9961
|
+
});
|
|
9942
9962
|
}
|
|
9943
9963
|
};
|
|
9944
9964
|
var ReplayFastboard_default = ReplayFastboard;
|
|
@@ -9964,6 +9984,8 @@ function create_fragment58(ctx) {
|
|
|
9964
9984
|
let div3_class_value;
|
|
9965
9985
|
let div4_class_value;
|
|
9966
9986
|
let current;
|
|
9987
|
+
let mounted;
|
|
9988
|
+
let dispose;
|
|
9967
9989
|
toolbar = new Toolbar_default({
|
|
9968
9990
|
props: {
|
|
9969
9991
|
app: ctx[0],
|
|
@@ -10030,6 +10052,10 @@ function create_fragment58(ctx) {
|
|
|
10030
10052
|
append(div4, div3);
|
|
10031
10053
|
mount_component(pagecontrol, div3, null);
|
|
10032
10054
|
current = true;
|
|
10055
|
+
if (!mounted) {
|
|
10056
|
+
dispose = listen(div0, "touchstart", tippy_hide_all, true);
|
|
10057
|
+
mounted = true;
|
|
10058
|
+
}
|
|
10033
10059
|
},
|
|
10034
10060
|
p(ctx2, [dirty]) {
|
|
10035
10061
|
const toolbar_changes = {};
|
|
@@ -10092,6 +10118,8 @@ function create_fragment58(ctx) {
|
|
|
10092
10118
|
destroy_component(redoundo);
|
|
10093
10119
|
destroy_component(zoomcontrol);
|
|
10094
10120
|
destroy_component(pagecontrol);
|
|
10121
|
+
mounted = false;
|
|
10122
|
+
dispose();
|
|
10095
10123
|
}
|
|
10096
10124
|
};
|
|
10097
10125
|
}
|
|
@@ -10100,7 +10128,7 @@ function instance58($$self, $$props, $$invalidate) {
|
|
|
10100
10128
|
let { app = null } = $$props;
|
|
10101
10129
|
let { theme = "light" } = $$props;
|
|
10102
10130
|
let { language = "en" } = $$props;
|
|
10103
|
-
let {
|
|
10131
|
+
let { containerRef = void 0 } = $$props;
|
|
10104
10132
|
let container;
|
|
10105
10133
|
function div0_binding($$value) {
|
|
10106
10134
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|
|
@@ -10115,8 +10143,8 @@ function instance58($$self, $$props, $$invalidate) {
|
|
|
10115
10143
|
$$invalidate(1, theme = $$props2.theme);
|
|
10116
10144
|
if ("language" in $$props2)
|
|
10117
10145
|
$$invalidate(2, language = $$props2.language);
|
|
10118
|
-
if ("
|
|
10119
|
-
$$invalidate(4,
|
|
10146
|
+
if ("containerRef" in $$props2)
|
|
10147
|
+
$$invalidate(4, containerRef = $$props2.containerRef);
|
|
10120
10148
|
};
|
|
10121
10149
|
$$self.$$.update = () => {
|
|
10122
10150
|
if ($$self.$$.dirty & 9) {
|
|
@@ -10126,16 +10154,21 @@ function instance58($$self, $$props, $$invalidate) {
|
|
|
10126
10154
|
}
|
|
10127
10155
|
if ($$self.$$.dirty & 24) {
|
|
10128
10156
|
$:
|
|
10129
|
-
if (
|
|
10130
|
-
|
|
10157
|
+
if (containerRef)
|
|
10158
|
+
containerRef(container || null);
|
|
10131
10159
|
}
|
|
10132
10160
|
};
|
|
10133
|
-
return [app, theme, language, container,
|
|
10161
|
+
return [app, theme, language, container, containerRef, div0_binding];
|
|
10134
10162
|
}
|
|
10135
10163
|
var Fastboard = class extends SvelteComponent {
|
|
10136
10164
|
constructor(options) {
|
|
10137
10165
|
super();
|
|
10138
|
-
init(this, options, instance58, create_fragment58, safe_not_equal, {
|
|
10166
|
+
init(this, options, instance58, create_fragment58, safe_not_equal, {
|
|
10167
|
+
app: 0,
|
|
10168
|
+
theme: 1,
|
|
10169
|
+
language: 2,
|
|
10170
|
+
containerRef: 4
|
|
10171
|
+
});
|
|
10139
10172
|
}
|
|
10140
10173
|
};
|
|
10141
10174
|
var Fastboard_default = Fastboard;
|