@opentinyvue/vue-fullscreen 2.21.0
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/LICENSE +22 -0
- package/index.d.ts +13 -0
- package/lib/index.js +120 -0
- package/package.json +20 -0
- package/src/pc.vue.d.ts +2 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 - present TinyVue Authors.
|
|
4
|
+
Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022 - present TinyVue Authors.
|
|
3
|
+
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license.
|
|
6
|
+
*
|
|
7
|
+
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
|
8
|
+
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
|
9
|
+
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
import Fullscreen from './src/pc.vue';
|
|
13
|
+
export default Fullscreen;
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { defineComponent, $prefix, setup } from '@opentinyvue/vue-common';
|
|
2
|
+
import { renderless, api } from '@opentinyvue/vue-renderless/fullscreen/vue';
|
|
3
|
+
import FullscreenApi from '@opentinyvue/vue-renderless/common/deps/fullscreen/apis';
|
|
4
|
+
import '@opentinyvue/vue-theme/fullscreen/index.css';
|
|
5
|
+
|
|
6
|
+
function normalizeComponent(scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
7
|
+
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
8
|
+
if (render) {
|
|
9
|
+
options.render = render;
|
|
10
|
+
options.staticRenderFns = staticRenderFns;
|
|
11
|
+
options._compiled = true;
|
|
12
|
+
}
|
|
13
|
+
var hook;
|
|
14
|
+
if (injectStyles) {
|
|
15
|
+
hook = injectStyles;
|
|
16
|
+
}
|
|
17
|
+
if (hook) {
|
|
18
|
+
if (options.functional) {
|
|
19
|
+
options._injectStyles = hook;
|
|
20
|
+
var originalRender = options.render;
|
|
21
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
22
|
+
hook.call(context);
|
|
23
|
+
return originalRender(h, context);
|
|
24
|
+
};
|
|
25
|
+
} else {
|
|
26
|
+
var existing = options.beforeCreate;
|
|
27
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
exports: scriptExports,
|
|
32
|
+
options
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var __vue2_script = defineComponent({
|
|
37
|
+
name: $prefix + "Fullscreen",
|
|
38
|
+
emits: ["change", "update:modelValue", "update:fullscreen"],
|
|
39
|
+
props: {
|
|
40
|
+
fullscreen: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: false
|
|
43
|
+
},
|
|
44
|
+
exitOnClickWrapper: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: true
|
|
47
|
+
},
|
|
48
|
+
fullscreenClass: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: ""
|
|
51
|
+
},
|
|
52
|
+
pageOnly: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: false
|
|
55
|
+
},
|
|
56
|
+
teleport: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false
|
|
59
|
+
},
|
|
60
|
+
zIndex: {
|
|
61
|
+
type: Number,
|
|
62
|
+
default: 0
|
|
63
|
+
},
|
|
64
|
+
beforeChange: Function
|
|
65
|
+
},
|
|
66
|
+
setup: function setup$1(props, context) {
|
|
67
|
+
return setup({
|
|
68
|
+
props,
|
|
69
|
+
context,
|
|
70
|
+
renderless,
|
|
71
|
+
api,
|
|
72
|
+
mono: true
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
var render = function render2() {
|
|
77
|
+
var _class;
|
|
78
|
+
var _vm = this;
|
|
79
|
+
var _h = _vm.$createElement;
|
|
80
|
+
var _c = _vm._self._c || _h;
|
|
81
|
+
return _c("div", _vm._b({
|
|
82
|
+
ref: "wrapper",
|
|
83
|
+
staticClass: "tiny-fullscreen",
|
|
84
|
+
class: (_class = {}, _class[_vm.fullscreenClass] = _vm.state.isFullscreen, _class),
|
|
85
|
+
style: _vm.state.wrapperStyle,
|
|
86
|
+
on: {
|
|
87
|
+
"click": function click($event) {
|
|
88
|
+
return _vm.shadeClick($event);
|
|
89
|
+
},
|
|
90
|
+
"keyup": function keyup($event) {
|
|
91
|
+
if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "esc", 27, $event.key, ["Esc", "Escape"])) return null;
|
|
92
|
+
return _vm.exit.apply(null, arguments);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}, "div", _vm.$attrs, false), [_vm._t("default")], 2);
|
|
96
|
+
};
|
|
97
|
+
var staticRenderFns = [];
|
|
98
|
+
var __cssModules = {};
|
|
99
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles);
|
|
100
|
+
function __vue2_injectStyles(context) {
|
|
101
|
+
for (var o in __cssModules) {
|
|
102
|
+
this[o] = __cssModules[o];
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
var Fullscreen = /* @__PURE__ */ function() {
|
|
106
|
+
return __component__.exports;
|
|
107
|
+
}();
|
|
108
|
+
var version = "2.21.0";
|
|
109
|
+
var apis = ["exit", "enter", "element", "getState", "isEnabled", "isFullscreen", "options", "request", "support", "toggle"];
|
|
110
|
+
apis.forEach(function(api2) {
|
|
111
|
+
if (FullscreenApi[api2] && !Fullscreen[api2]) {
|
|
112
|
+
Fullscreen[api2] = FullscreenApi[api2];
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
Fullscreen.install = function(Vue) {
|
|
116
|
+
Vue.component(Fullscreen.name, Fullscreen);
|
|
117
|
+
};
|
|
118
|
+
Fullscreen.version = version;
|
|
119
|
+
|
|
120
|
+
export { Fullscreen as default };
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@opentinyvue/vue-fullscreen",
|
|
3
|
+
"version": "2.21.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "./lib/index.js",
|
|
6
|
+
"module": "./lib/index.js",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"type": "module",
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@opentinyvue/vue-common": "~2.21.0",
|
|
11
|
+
"@opentinyvue/vue-renderless": "~3.21.0",
|
|
12
|
+
"@opentinyvue/vue-theme": "~3.21.0"
|
|
13
|
+
},
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"types": "index.d.ts",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "pnpm -w build:ui $npm_package_name",
|
|
18
|
+
"//postversion": "pnpm build"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/src/pc.vue.d.ts
ADDED