@opentinyvue/vue-fullscreen 2.21.0 → 3.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/lib/index.js CHANGED
@@ -1,39 +1,43 @@
1
1
  import { defineComponent, $prefix, setup } from '@opentinyvue/vue-common';
2
2
  import { renderless, api } from '@opentinyvue/vue-renderless/fullscreen/vue';
3
+ import { openBlock, createElementBlock, mergeProps, withKeys, renderSlot } from 'vue';
3
4
  import FullscreenApi from '@opentinyvue/vue-renderless/common/deps/fullscreen/apis';
4
5
  import '@opentinyvue/vue-theme/fullscreen/index.css';
5
6
 
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;
7
+ function _createForOfIteratorHelperLoose(r, e) {
8
+ var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
9
+ if (t) return (t = t.call(r)).next.bind(t);
10
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
11
+ t && (r = t);
12
+ var o = 0;
13
+ return function() {
14
+ return o >= r.length ? { done: true } : { done: false, value: r[o++] };
15
+ };
12
16
  }
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
- }
17
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
18
+ }
19
+ function _unsupportedIterableToArray(r, a) {
20
+ if (r) {
21
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
22
+ var t = {}.toString.call(r).slice(8, -1);
23
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
29
24
  }
30
- return {
31
- exports: scriptExports,
32
- options
33
- };
34
25
  }
26
+ function _arrayLikeToArray(r, a) {
27
+ (null == a || a > r.length) && (a = r.length);
28
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
29
+ return n;
30
+ }
31
+ var _export_sfc = function _export_sfc2(sfc, props) {
32
+ var target = sfc.__vccOpts || sfc;
33
+ for (var _iterator = _createForOfIteratorHelperLoose(props), _step; !(_step = _iterator()).done; ) {
34
+ var _step$value = _step.value, key = _step$value[0], val = _step$value[1];
35
+ target[key] = val;
36
+ }
37
+ return target;
38
+ };
35
39
 
36
- var __vue2_script = defineComponent({
40
+ var _sfc_main = defineComponent({
37
41
  name: $prefix + "Fullscreen",
38
42
  emits: ["change", "update:modelValue", "update:fullscreen"],
39
43
  props: {
@@ -73,39 +77,30 @@ var __vue2_script = defineComponent({
73
77
  });
74
78
  }
75
79
  });
76
- var render = function render2() {
80
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
77
81
  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
- }
82
+ return openBlock(), createElementBlock(
83
+ "div",
84
+ mergeProps({
85
+ ref: "wrapper",
86
+ class: "tiny-fullscreen"
87
+ }, _ctx.$attrs, {
88
+ style: _ctx.state.wrapperStyle,
89
+ class: (_class = {}, _class[_ctx.fullscreenClass] = _ctx.state.isFullscreen, _class),
90
+ onClick: _cache[0] || (_cache[0] = function($event) {
91
+ return _ctx.shadeClick($event);
92
+ }),
93
+ onKeyup: _cache[1] || (_cache[1] = withKeys(function() {
94
+ return _ctx.exit && _ctx.exit.apply(_ctx, arguments);
95
+ }, ["esc"]))
96
+ }),
97
+ [renderSlot(_ctx.$slots, "default")],
98
+ 16
99
+ /* FULL_PROPS */
100
+ );
104
101
  }
105
- var Fullscreen = /* @__PURE__ */ function() {
106
- return __component__.exports;
107
- }();
108
- var version = "2.21.0";
102
+ var Fullscreen = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
103
+ var version = "3.21.0";
109
104
  var apis = ["exit", "enter", "element", "getState", "isEnabled", "isFullscreen", "options", "request", "support", "toggle"];
110
105
  apis.forEach(function(api2) {
111
106
  if (FullscreenApi[api2] && !Fullscreen[api2]) {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-fullscreen",
3
- "version": "2.21.0",
3
+ "version": "3.21.0",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",
7
7
  "sideEffects": false,
8
8
  "type": "module",
9
9
  "dependencies": {
10
- "@opentinyvue/vue-common": "~2.21.0",
10
+ "@opentinyvue/vue-common": "~3.21.0",
11
11
  "@opentinyvue/vue-renderless": "~3.21.0",
12
12
  "@opentinyvue/vue-theme": "~3.21.0"
13
13
  },
package/src/pc.vue.d.ts CHANGED
@@ -1,2 +1,74 @@
1
- declare const _default: any;
1
+ declare const _default: import("@vue/runtime-core").DefineComponent<{
2
+ fullscreen: {
3
+ type: BooleanConstructor;
4
+ default: boolean;
5
+ };
6
+ exitOnClickWrapper: {
7
+ type: BooleanConstructor;
8
+ default: boolean;
9
+ };
10
+ fullscreenClass: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ pageOnly: {
15
+ type: BooleanConstructor;
16
+ default: boolean;
17
+ };
18
+ teleport: {
19
+ type: BooleanConstructor;
20
+ default: boolean;
21
+ };
22
+ zIndex: {
23
+ type: NumberConstructor;
24
+ default: number;
25
+ };
26
+ beforeChange: FunctionConstructor;
27
+ }, {
28
+ t: (this: any, path: any, options?: any) => any;
29
+ vm: any;
30
+ f: (props: any, attrs?: {}) => {};
31
+ a: (attrs: any, filters: any, include: any) => {};
32
+ d: (props: any) => void;
33
+ dp: (props: any) => void;
34
+ gcls: (key: any) => any;
35
+ m: (...cssClasses: any[]) => string;
36
+ }, unknown, {}, {}, import("@vue/runtime-core").ComponentOptionsMixin, import("@vue/runtime-core").ComponentOptionsMixin, ("change" | "update:modelValue" | "update:fullscreen")[], "change" | "update:modelValue" | "update:fullscreen", import("@vue/runtime-core").PublicProps, Readonly<import("@vue/runtime-core").ExtractPropTypes<{
37
+ fullscreen: {
38
+ type: BooleanConstructor;
39
+ default: boolean;
40
+ };
41
+ exitOnClickWrapper: {
42
+ type: BooleanConstructor;
43
+ default: boolean;
44
+ };
45
+ fullscreenClass: {
46
+ type: StringConstructor;
47
+ default: string;
48
+ };
49
+ pageOnly: {
50
+ type: BooleanConstructor;
51
+ default: boolean;
52
+ };
53
+ teleport: {
54
+ type: BooleanConstructor;
55
+ default: boolean;
56
+ };
57
+ zIndex: {
58
+ type: NumberConstructor;
59
+ default: number;
60
+ };
61
+ beforeChange: FunctionConstructor;
62
+ }>> & {
63
+ onChange?: ((...args: any[]) => any) | undefined;
64
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
65
+ "onUpdate:fullscreen"?: ((...args: any[]) => any) | undefined;
66
+ }, {
67
+ zIndex: number;
68
+ fullscreen: boolean;
69
+ teleport: boolean;
70
+ exitOnClickWrapper: boolean;
71
+ fullscreenClass: string;
72
+ pageOnly: boolean;
73
+ }, {}>;
2
74
  export default _default;